Extracting info from the consol
Posted: Thu Apr 12, 2007 11:27 am
Hi
If I run the command below in Unix
./bin/dsjob -lparams <projname> <dsjobname> > Somefile.txt
Parameters gets copied to the Somefile.txt but status of the command shown separately on the consol.
For unsuccessful command I get following output :
Status code = 0
ERROR: Failed to open job
For successful command as well we get
Status code = 0
So I would like to capture ERROR in my script so as to find out which job could not provide params
it has.
If the output of the command above if I assign it to the variable in a script, these details are
not retained in that variable. Can someone guide me how to capture this ERROR so I can mention some
xyz job is unable to provide parameters?
If I run the command below in Unix
./bin/dsjob -lparams <projname> <dsjobname> > Somefile.txt
Parameters gets copied to the Somefile.txt but status of the command shown separately on the consol.
For unsuccessful command I get following output :
Status code = 0
ERROR: Failed to open job
For successful command as well we get
Status code = 0
So I would like to capture ERROR in my script so as to find out which job could not provide params
it has.
If the output of the command above if I assign it to the variable in a script, these details are
not retained in that variable. Can someone guide me how to capture this ERROR so I can mention some
xyz job is unable to provide parameters?