cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with shell script

Former Member
0 Kudos

Hi,

I have an issue with the file adapter in OS Command execution , i'm trying to this shell script:

-


#!/bin/sh

HOST='x.x.x.x'

USER='xxxx'

PASSWD='xxxxx'

FILEPARTY='partyOut.dat'

FILEPOSTAL='postalOut.dat'

FILETEL='telephoneOut.dat'

FILEMAIL='emailOut.dat'

ftp -n $HOST > /sapinstall/XI/ftp.log 2> /sapinstall/ftp.err << END_SCRIPT

quote USER $USER

quote PASS $PASSWD

bin

cd /ilytics/data/incremental/input/

put $FILEPARTY

put $FILEPOSTAL

put $FILETEL

put $FILEMAIL

quit

END_SCRIPT

exit 0

-


when i execute this script directly from the command prompt works fine , but when i execute from XI File adapter in parameter "execute OS after message process" can't make the upload ...

The shell is on the XI side , the user for the connection have all permissions , i need make special configurations for this kind of scripts????,

regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Also, i want to tell you one more thing. Even if its executed and if ftp fails, you wont see that any where in XI.

Its better to use some other softwares like Control-M which have total control and alert handling in case of these FTP transactions.

XI command line thing can be used for simple commands like chmod etc etc to give sufficient permissions for the file.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Khrisna ,

the blog says about windows , but i'm working on AIX OS , and send an error "?Invalid command" , how can i debug in UNIX?

regards

moorthy
Active Contributor
0 Kudos

Hi,

Ypu are executing the shell script in the XI system right ?

You can check this blog to help u to debug-

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

Rgds,

Krishna

Former Member
0 Kudos

Is correct , in the script's code i've wrote an output in case an error occurs or not , in the XI file system i can't see the output file (because im sure the shell was executed) but the lines to upload the files are not working ,

i've tested from the prompt XI command line ,

regards

Former Member
0 Kudos

did u try executing from command prompt of XI system(not your laptop/desktop)?

also, did u give full path to the shell script. I just wanna make sure that XI is able to reach that shell script.