dsimport return code in windows

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sunil_acc
Participant
Posts: 28
Joined: Thu Oct 20, 2005 5:49 am

dsimport return code in windows

Post by sunil_acc »

Hi,
i was looking for the return code of the dsimport commnad in windows command prompt. As i am always getting 0 as a return code. Even if lets say the dsx file to be imported has a wrong name there is a window pop up comes up (thats ideally a dsimport windows interface). But if you hit cancel to it, still the return code is 0.

Here is link on forum that discuss something abt the dsimport, but unfortunetly the code mentioned here too uses "ERRORLEVEL" windows command that is not giving correct result. Help out if you have tried something like this.

viewtopic.php?t=108090&highlight=dsimport
sunil_acc
Participant
Posts: 28
Joined: Thu Oct 20, 2005 5:49 am

Post by sunil_acc »

did antbody tried this

OR

know the solution!


thanks
--Sunil
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Guess not!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You are correct. ERRORLEVEL does not work. Not sure why. All the command line tools fail to set errors.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What happens if you capture file unit #2 (stderr in UNIX terminology)?

Code: Select all

dsjob -options project job 2> myfile.txt
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You are correct dsjob works. So not ALL the command line tools fail to set errors.
Mamu Kim
Post Reply