cancel
Showing results for 
Search instead for 
Did you mean: 

Executing an OS command !!

Former Member
0 Kudos

Hi

Have anyone tried executing an OS command in UNIX(AIX) with SP12 File/FTP adapter ?

We have created a shell script , ve given execute permissions for all(chmod 777) and tried executing it using file adapter , but we dont see it working.

Ve referred to the weblog & few forum threads, but could'nt get to work

checked an SAP note , but all it talks abt is the way the implementation has been changed from SP13 . Does this mean it never works in SP12 ? pls let know

Regards

Saravana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sara

How r u calling the script from command line.I remember it has to be called something like

exec sh <FileName>

Check with Anand torgal for the exact syntax..It works in Sp12

Regards

Sriram V.

Former Member
0 Kudos

Hi Saravan,

If it is a shell scriprt then try this in file adapter..

sh <Complete directory Path>\ShellScriptName.sh %F

It works both on SP11 and SP12.

Regards

Anand

Former Member
0 Kudos

Thanks for the replies. I was trying with the way like u have mentioned, but then the problem seems to be with the shell command specified inside the .sh file

if i specify a cp or mv command it works . but when i specify a split command it does not work. Any ideas !!

My intention is to split the file ere.

Thanks

Saravana

Former Member
0 Kudos

Hi Saravan,

You can try writing a log to another file for each command in your shell script. Atleast you would know why exactly the command is failing.

Something similar to this inside your script itself..

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

Regards

Anand

Answers (0)