Ecxecuting Shell Script in Datastage Jop properties
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 38
- Joined: Mon Feb 27, 2006 10:34 pm
- Location: Chennai
- Contact:
Ecxecuting Shell Script in Datastage Jop properties
HI! All
I have a shell script Sample.sh,when i try to put this script in Exec Sh option in Job properties
iam getting an error
"cannot find Sample.sh
the script is working fine when i run from the particuar folder where the script resid
i tried to execute the script this way
home/staff/thussain/tausif/Sample.sh
when i trie running this scritp in datastage ,iam getting this error
Executed: /home/staff/thussain/tausif/Sample.sh
Reply=0
Output from command ====>
split: No such file or directory
find: cannot read dir ./sot.aOSN: Permission denied
find: cannot read dir ./sowHaOeQ: Permission denied
find: cannot read dir ./sosEaOve: Permission denied
Can any help me executing this script
I have a shell script Sample.sh,when i try to put this script in Exec Sh option in Job properties
iam getting an error
"cannot find Sample.sh
the script is working fine when i run from the particuar folder where the script resid
i tried to execute the script this way
home/staff/thussain/tausif/Sample.sh
when i trie running this scritp in datastage ,iam getting this error
Executed: /home/staff/thussain/tausif/Sample.sh
Reply=0
Output from command ====>
split: No such file or directory
find: cannot read dir ./sot.aOSN: Permission denied
find: cannot read dir ./sowHaOeQ: Permission denied
find: cannot read dir ./sosEaOve: Permission denied
Can any help me executing this script
Mohammed Tausif Hussain Sheikh
Cognizant technologies,Perungudi
Chennai
Cognizant technologies,Perungudi
Chennai
Never assume a CWD in scripts. The CWD of any script called from DataStage will be the directory where the project is installed. If you use an absolute path for all references or you change your working directory explicitly inside the script you will be OK
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Similarly, the executing DataStage job assumes that your script is in the project directory if it's not given as a pathname and it's not findable via the PATH environment variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
From the error shown it also means - the script is trying to read/use the directories mentioned int the error message. The user with which you logged in Datastage do not have permissions on directory.
Is the username with which you are loggin in DS and unix is same?
Have you tried executing this script from unix prompt first? It is always a good practice to execute any script on unix that is called from DS jobs.
Is the username with which you are loggin in DS and unix is same?
Have you tried executing this script from unix prompt first? It is always a good practice to execute any script on unix that is called from DS jobs.
Regards,
S. Kirtikumar.
S. Kirtikumar.
Good practice, yes - but don't make the mistake that just because it runs from the command prompt that it must work fine from a DataStage job! All of the above issues apply that could cause one way to work and the other to not.Kirtikumar wrote:It is always a good practice to execute any script on unix that is called from DS jobs.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The find command is having permissions problems. You should also verify that the user ID under which DataStage jobs execute have at least r-x permission to all directories in the pathname(s) to be searched.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Try this
Code: Select all
ksh "YOUR COMMAND, WITH ABSOLUTE PATH"