on 06-20-2005 3:39 PM
Hi,
I am trying to execute OS command on unix(XI box itself) through receiver file adapter. Receiver file adapter is creating the ouput file but OS command is not getting executed. I have a very simple shell script without any parameters. The shell script just re-names the file and is working fine on unix command prompt. Any idea as to what could be the problem or any way I can monitor the OS command execution.
Thanks
Anand
Hi, Anand.
i also got the similar problem with the OS command a few months ago.
What i've found was like the following.
1. In XI 3.0 SR1 without any patches or SPs, this function dosen't work.
2. With SP10 or above, this works and its behavior is exactly same as Runtime.exec(String command) method of Java.
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)
So, i recommend you to code some simple Java program with the Runtime.exec(String command) and try your script as the parameter of this method.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anand,
Did you ever get this figured out? I am wanting to send a file to a unix system and then run a script I wrote (that will process the file). It seems like you cannot run unix shell scripts through the FTP connection.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To run a command on the FTP Server you will need an FTP Server which actually supports the "SITE" command and then you need to get the file adapter to send this "QUOTE SITE" command. (no idea if this is possible)
I guess it is better to use a scriptable ftp server where you can trigger on the PUT.
If you ask me: dont use FTP to trigger jobs (or not at all).
Greetings
Bernd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
Thanks for the reply. we are on SP11.
In the OS command field for the receiver file adapter I gave my command with the full path name followed by
%f(%F). i.e /home/test/command.sh %f also tried with /home/test/command.sh %F. is there anything wrong with the syntax ?
My OS command resides on XI server itself and accesses XI directories.
Thanks
Anand
Hi Sridhar,
For testing purpose I just wrote script which will just rename the file without accepting any parameters. In the OS command I specified OS command with full path without any %f or %F. Later I tried with other options
i.e with %f and %F. but none of them seem to be working.
Thanks
Anand
Hi,
on some unix systems there's a "history file"
http://www.unix.org.ua/orelly/networking/puis/ch10_04.htm
maybe you can use this to see if the file adapter OS command is being executed at all?
ask someone from your basis team they should give you more details
Regards,
michal
Hi,
I have ran out of all answers for this question
If you want to rename a file, File adpater has been enhanced with a new feature of providing dynamic file names in SP12. Check it out at http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
Regards,
Sridhar
Have you tested your script with the same unix user that XI is executing the command?
For security reasons running shell scripts for unix users that do not need this feature is not allowed. Running self made scripts should be blocked because this way you could affect whole system. So as Michal wrote in his post you should consult your basis guys what are the permissions for user executing the script.
For any further investigation please provide file details - that is output of ls la command for scripts and for files created with XI.
Regards and pozdrawiam
-- Grzegorz Malewski
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.