getting the parameter of a job sequence from a shell sript

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cécile
Participant
Posts: 3
Joined: Tue Aug 22, 2006 2:59 am

getting the parameter of a job sequence from a shell sript

Post by cécile »

Hello,

I write a dsjob command to launch a sequence.

I assign 2 job parameter values with the dsjob command:

dsjob -server SERVER -user USER -password xxxxxx -run
-mode NORMAL
-param PRM_TRT_DT=2006-09-21
-param PRM_CD_AMONT=1
-jobstatus DEV_BIC job_SL0_DM_CAD_ALERT_Load

The pb is the following :
If the sequence has got the 2 parameters defined, then the run is OK.
But if the sequence has got only one parameter defined, then, the run is KO.

I need to write a single generic dsjob command script, that will be used to launch a great number of sequences of a complete application.

So Is there a way of getting the parameters defined in a sequence job , when I am in my shell script.

Thank you for your ideas :)
Cécile P.
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Stop thinking script, start thinking job sequence. A master control job sequence can be started from your script, and then manage the rest.

Once you're in that environment you can much more easily use the DataStage API. DSGetJobInfo() can be used to obtain a list of the parameter names associated with a job, and DSGetParamInfo() to return all kinds of information about any particular parameter.

This is not possible to do legitimately from a shell script, though I am sure that others will post techniques that "hack" the Repository. Beware that these techniques will cease to work in the next release, when the Repository is totally restructured.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply