Page 2 of 2

Posted: Sat Dec 09, 2006 7:49 pm
by chulett
To continue my example:

Code: Select all

Call DSExecute("UNIX",CmdString,SystemOutput,ReturnCode)
CmdString is the command to execute, SystemOutput is a variable that will capture any screen output, anything echoed from the command and ReturnCode is the variable which holds the exit code passed back by the command. Note that you can call those three local variables anything you like, these are just examples.

Check the ReturnCode for zero to see if the command executed without error. Write the contents of ScreenOutput to the job's log using DSLogInfo if that would help.

:!: Case is critical! SystemOutput and Systemoutput are two different variables.

Yes, you can do it all in one job.

Yes, that can mean the job will not have any active stages on the canvas. I would suggest you at least put an annotation on the canvas telling people what you are doing in the job and where you are doing it.

Posted: Sat Dec 09, 2006 9:04 pm
by kishoreramachandran
if the script i am executing is 1.sh then after the dsexecute statment I have to give
dsloginfo(systemOutput,1.sh)
.then I have to give the next dsexecute to run the next script .
if some scripts are not dependent on each other then can I create separate server job and do the same thing so that they can be run at the same time.am i correct .

Posted: Sat Dec 09, 2006 9:34 pm
by chulett
You don't have to give, but you could give:

Code: Select all

Call DSLogInfo(SystemOutput,"1.sh")
The second argument is the Calling Program Name and should be a literal, so put quotes around it. Check the online Help.

:!: When you do this 'for real' be much more careful with your spelling, or at least more so that you've done in these posts. It would be SystemOutput not systemOutput - actually use either spelling as long as it matches across all statements where you use the variable.
if some scripts are not dependent on each other then can I create separate server job and do the same thing so that they can be run at the same time.am i correct .

Yes, of course.