on 10-30-2008 7:43 PM
Hi All,
I am trying to execute a perl script from the File Sender Channel(NFS), OS command Before Message Processing. The script works fine if i run it from the shell. But when PI calls the script, the script does not get executed. The audit logs mention that the OS command has been called.
I tried using:
1) /<fullpath>perlScript.pl /<fullpath>filename.dat
2) perl /<fullpath>perlScript.pl /<fullpath>filename.dat
Both these commands work fine when i execute them on the shell.
I am on solaris and PI 7.0. The permission for the perl script and input files are all 777.
FYI.. i am using this perl script to transpose a complex file and make it # delimited file.
I have already read the blogs for OS command and executed some sample scenarios successfully.
I tried to call a shell script that does the same functionality as the perl script. Even that does not work.
Also, wrote a shell script to call the perl script inside it. No luck.
eg:
touch /fullpath>/create_before.dat
perl /<fullpath>perlScript.pl /<fullpath>filename.dat
touch /<fullpath>/create_after.dat
In this case, the create_before.dat and create_after.dat is getting created but the perl is not called. I know this because i cant see the output files of the perl script.
Regards,
Balaji
Edited by: Balaji M on Oct 30, 2008 2:36 PM
try to set the path for perl bin folder in the beginning of script..
-> set %PATH% = %PATH%;<location of perl bin folder>;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The problem is fixed. The shell or perl both have logic to transpose a non industry starndard file to the delimited file which PI can use an FCC to pick up.
This was the fix:
we need to mention the shell the script is going to be run in.
In the shell script we mentioned --> *#!/usr/bin/bash* as the first line
normally, when we use the command -- which bash on the unix command prompt, it tells us the path for the bash used.
another option --> #!/usr/bin/ksh
again, on the command prompt -- which ksh command will tell us what ksh is being used.
If the script is a simple one that does copy or move commands, i believe we need not use the commands above. But is a good practice to have them in the script.
Regards,
Balaji
Edited by: Balaji M on Nov 3, 2008 4:38 PM
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.