Page 1 of 1

getting the parameter of a job sequence from a shell sript

Posted: Thu Sep 21, 2006 6:01 am
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 :)

Posted: Thu Sep 21, 2006 2:57 pm
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.