DSExecute
Moderators: chulett, rschirm, roy
DSExecute
With DataStage on a NT server.
I use the DSExecute command.
To run a shell script on a UNIX server.
DSExecute Command = rsh hpserv -l user test
shell script test = echo "end"
In the return of the command DSExecute
Output="Terminel handle"
I do not obtain the message return from test script " End "
Thanks
I use the DSExecute command.
To run a shell script on a UNIX server.
DSExecute Command = rsh hpserv -l user test
shell script test = echo "end"
In the return of the command DSExecute
Output="Terminel handle"
I do not obtain the message return from test script " End "
Thanks
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
You have to first test that the command works. I recommend wrapping it all in a single script local to the DataStage server. Avoid as much command line full syntax execution as possible, because you will have difficulty passing strings with quotes from DataStage to the command line.
Run the command line shell script that does the rsh logic. You must keep in mind that your telnet session has to happen from the DataStage server, as well as be done under the logic of the userid from which the job executes.
Once you have this working, the last piece in the puzzle will be the environment issues that separate a command line execution from a DataStage issuing the command line execution.
Good luck!
Run the command line shell script that does the rsh logic. You must keep in mind that your telnet session has to happen from the DataStage server, as well as be done under the logic of the userid from which the job executes.
Once you have this working, the last piece in the puzzle will be the environment issues that separate a command line execution from a DataStage issuing the command line execution.
Good luck!
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
To be more helpful, we would need to see the exact syntax of your call to DSExecute, along with prior statements that assign values to any variables used within the call, and subsequent statements that access values returned by subroutine arguments.
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.
you will also need a Call before the DSExecute.
I typically use the same invocation of DSExecute all the time:
First, test your command in unix. Then in your routine, paste the following lines for your invocation, with your tested command in the quotes (use escape chars for embedded quotes):
cmd = "rsh hpserv -l user test"
Call DSExecute("UNIX", cmd, output, systemreturncode)
ErrorCode = systemreturncode ;* optional to return value
I typically use the same invocation of DSExecute all the time:
First, test your command in unix. Then in your routine, paste the following lines for your invocation, with your tested command in the quotes (use escape chars for embedded quotes):
cmd = "rsh hpserv -l user test"
Call DSExecute("UNIX", cmd, output, systemreturncode)
ErrorCode = systemreturncode ;* optional to return value
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
Hi,
After all the replies from all the nice people,
a reply to your question
the command you run is rsh there for the only thing you will get is the output and return code of the rsh command itself and nothing from the scripts/commands or whar ever rsh runs.
If you need to get info on them try to transfer the things you want into files (simple redirection might not be so simple) once you have the data you need in files simply check them after rsh finishes.
IHTH (I Hope This Helps)
After all the replies from all the nice people,
a reply to your question
the command you run is rsh there for the only thing you will get is the output and return code of the rsh command itself and nothing from the scripts/commands or whar ever rsh runs.
If you need to get info on them try to transfer the things you want into files (simple redirection might not be so simple) once you have the data you need in files simply check them after rsh finishes.
IHTH (I Hope This Helps)
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org