compiling and executing jobs from command prompt
Moderators: chulett, rschirm, roy
compiling and executing jobs from command prompt
Hi,
we are passing file name has parameter and running the job in unix environment(shell)
my $DShome is /edw/devel/apps/home/dsadm/Ascential/DataStage/DSEngine/bin
when i executed the job it shows "Status code = 0? "
i need to chage file name alone for a single jon for about 30 times so written a batch file.
please give me idea how to comiple the job from command prompt itself
my code is
dsjob -run -param File=edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_1.dat nau_dev_7 CopyOfSampleFile2
expecting ur help in this regard
we are passing file name has parameter and running the job in unix environment(shell)
my $DShome is /edw/devel/apps/home/dsadm/Ascential/DataStage/DSEngine/bin
when i executed the job it shows "Status code = 0? "
i need to chage file name alone for a single jon for about 30 times so written a batch file.
please give me idea how to comiple the job from command prompt itself
my code is
dsjob -run -param File=edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_1.dat nau_dev_7 CopyOfSampleFile2
expecting ur help in this regard
Re: compiling and executing jobs from command prompt
There is no way to compile the jobs from the command line. But there is an option to reset the job though.pras wrote: please give me idea how to comiple the job from command prompt itself
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
You don't need to recompile the your job if you are just passing different parameters each time.
If your job gets aborted due to some reason you can reset it and then run.
I don't see any problem with your code, do you get any errors?
You can get a lot of code samples here if you do a search.
If your job gets aborted due to some reason you can reset it and then run.
Code: Select all
dsjob -run -mode RESET ProjectName JobName
You can get a lot of code samples here if you do a search.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
hi when i tried running with reset mode i am getting the below error
Status code = -2?DSJE_BADSTATE
and says error running job
my code is
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_1.dat nau_dev_7 CopyOfSampleFile2
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_10.dat nau_dev_7 CopyOfSampleFile2
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_11.dat nau_dev_7 CopyOfSampleFile2
when i try running individually its working fine even with our rest mode
please advice me
Status code = -2?DSJE_BADSTATE
and says error running job
my code is
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_1.dat nau_dev_7 CopyOfSampleFile2
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_10.dat nau_dev_7 CopyOfSampleFile2
dsjob -run -mode RESET -param File=/edw/devel/apps/home/dsadm/nau_dev_7/NetappU/FlatFileLoad/NAU_DataMart_Out_20070109222531_11.dat nau_dev_7 CopyOfSampleFile2
when i try running individually its working fine even with our rest mode
please advice me
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes.
Stop being impatient.
Don't shout.
DSXchange is an all volunteer site, no-one gets paid (apart from the webmaster). Folks post as and when they can. If you want urgent answers, sign up for premium service from your support provider and learn how much "urgent" really costs.
I thought narasihma's contributions were clear and to the point.
With a tiny bit more experience with DataStage, you will learn that a running job (irrespective of run mode) can not be run a second time, unless it is a multi-instance job with a different invocation ID.
I will respond with the rest of the answer tomorrow morning (my time).
Stop being impatient.
Don't shout.
DSXchange is an all volunteer site, no-one gets paid (apart from the webmaster). Folks post as and when they can. If you want urgent answers, sign up for premium service from your support provider and learn how much "urgent" really costs.
I thought narasihma's contributions were clear and to the point.
With a tiny bit more experience with DataStage, you will learn that a running job (irrespective of run mode) can not be run a second time, unless it is a multi-instance job with a different invocation ID.
I will respond with the rest of the answer tomorrow morning (my time).
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.
All caps is usually a sign of shouting. As Ray explained, it is an All Volunteer site. Putting comments like "ANY SUGGESTIONS" only rubs the posters the wrong way and hence Ray's reaction. Be patient, your quests will be answered. And dont be frightened of Ray, he is a pretty cool guy and you will get to learn a lot from him. So stick around.
Regards,
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
You need to look into what Ray wanted to convey to you.
Search the forum for "Status code = -2" you sould get a solution.
Found an explainationby Craig
Search the forum for "Status code = -2" you sould get a solution.
Found an explainationby Craig
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
Finding answers is simple, all you need to do is come up with the correct questions.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The "bad state" means that the job is not in a runnable state.
If attempting to run it in reset mode returns this status, it suggests that the job was not even in a resettable state. This can mean that the job is currently running, has not been compiled, or perhaps is crashed. Determine the job status (using dsjob -jobinfo projectname jobname command).
You can only legally run a job once (unless it is a multi-instance job with separate invocation IDs, which effectively makes them separate jobs); your post suggests that you attempted to effect three reset runs. If the job was already running (whether in normal, validate or reset mode), you should expect these all to return DSJE.BADSTATE.
As for "impatient" - you waited less than 30 minutes before complaining that no-one had answered your post. This was out of hours in my time zone - I was having dinner at the time. Others probably had their own reasons for not being logged in at a time that suited your demands.
If you want urgent support, sign up for premium service with your support provider, and learn the true cost of "urgent"!
And you complained in all caps which, as was mentioned by DSGuru2B, is "shouting" and poor netiquette.
That, combined with your impatience, was offensive. That is why I imposed a personal "time penalty" on the rest of this response.
If attempting to run it in reset mode returns this status, it suggests that the job was not even in a resettable state. This can mean that the job is currently running, has not been compiled, or perhaps is crashed. Determine the job status (using dsjob -jobinfo projectname jobname command).
You can only legally run a job once (unless it is a multi-instance job with separate invocation IDs, which effectively makes them separate jobs); your post suggests that you attempted to effect three reset runs. If the job was already running (whether in normal, validate or reset mode), you should expect these all to return DSJE.BADSTATE.
As for "impatient" - you waited less than 30 minutes before complaining that no-one had answered your post. This was out of hours in my time zone - I was having dinner at the time. Others probably had their own reasons for not being logged in at a time that suited your demands.
If you want urgent support, sign up for premium service with your support provider, and learn the true cost of "urgent"!
And you complained in all caps which, as was mentioned by DSGuru2B, is "shouting" and poor netiquette.
That, combined with your impatience, was offensive. That is why I imposed a personal "time penalty" on the rest of this response.
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.