hi all,
i am having some problem when i am calling a shell script form datastage.
i have a shell script which is in /home/devinput.
name of the shell script is "test.sh" now i am calling this shell script from job properties "before job subrutine".In "before job subrutine" drop down box i am selecting "ExecSH" and in the input value box i am giving the entire path with the shell script name "/home/devinput/test.sh" but this is not working .do i need to set some other parameter or do i need do my requrement in some other way?
thanks in advance
calling shell script form datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 132
- Joined: Wed Mar 01, 2006 11:12 pm
- Location: Pune
Re: calling shell script form datastage
This may be the problem of permission. For the script file you need to set the access rights i.e. chmode = 777 so that it can be accessed through the user id by which you have logged in to datastage.coehcl wrote:hi all,
i am having some problem when i am calling a shell script form datastage.
i have a shell script which is in /home/devinput.
name of the shell script is "test.sh" now i am calling this shell script from job properties "before job subrutine".In "before job subrutine" drop down box i am selecting "ExecSH" and in the input value box i am giving the entire path with the shell script name "/home/devinput/test.sh" but this is not working .do i need to set some other parameter or do i need do my requrement in some other way?
thanks in advance
SMB
Re: calling shell script form datastage
Thanks for the replay but i have already given all the permissoion to the shell script.baglasumit21 wrote:This may be the problem of permission. For the script file you need to set the access rights i.e. chmode = 777 so that it can be accessed through the user id by which you have logged in to datastage.coehcl wrote:hi all,
i am having some problem when i am calling a shell script form datastage.
i have a shell script which is in /home/devinput.
name of the shell script is "test.sh" now i am calling this shell script from job properties "before job subrutine".In "before job subrutine" drop down box i am selecting "ExecSH" and in the input value box i am giving the entire path with the shell script name "/home/devinput/test.sh" but this is not working .do i need to set some other parameter or do i need do my requrement in some other way?
thanks in advance
Does the script execute from command line ? Try giving
Code: Select all
sh /home/devinput/test.sh
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Make a step by step approach to the use.
Start with something like "ls >abc.txt" and continue step by step.
Remember the User on Unix directly may be different to the one in DataStage (most time dsadm).
Compare if it is both the same shell.
Maybe you have to execute a sh before.
By step-by-step you may get your right result.
Start with something like "ls >abc.txt" and continue step by step.
Remember the User on Unix directly may be different to the one in DataStage (most time dsadm).
Compare if it is both the same shell.
Maybe you have to execute a sh before.
By step-by-step you may get your right result.
Wolfgang Hürter
Amsterdam
Amsterdam
-
- Participant
- Posts: 73
- Joined: Wed Jun 28, 2006 3:27 pm
- Location: NJ
First of all check your shell script if its executing properly, I mean you getting desired output by using >sh filename.sh.
If your script is correct then change the mode of file by:
>chmod 777 filename.sh
After this open DS and select the Before or After job subroutine
In the input values write : cd ;#Directorypath#/filename.sh
Try to run and check it should be fine
Let me know if there is still problem
If your script is correct then change the mode of file by:
>chmod 777 filename.sh
After this open DS and select the Before or After job subroutine
In the input values write : cd ;#Directorypath#/filename.sh
Try to run and check it should be fine
Let me know if there is still problem
"Nobody is expert in Everything,
But Everybody is expert in Something."
But Everybody is expert in Something."