Page 1 of 1

Passing working Date to to JOB Parameter

Posted: Tue Oct 12, 2004 12:24 pm
by Camaj
Bonjour,

First of all, I'm just want to precise, I'm a new in the DataStage and Unix world, mainly I'm an OLD MVS COBOL programmer. :shock:

I wrote a Parallel job that read in Daily input file from other system with the month and day as part of the name.

I created a input parameter (xx.xx.#PROCESS_DAY#*) to process and read that file from my UNIX system but I don't know how I can get and initialize this PARAMETER on the daily basis with the JOB or the Job Sequence.

Is somebody can help me !

Thank !

Posted: Tue Oct 12, 2004 2:28 pm
by gh_amitava
Hi,

You have to construct the file name with path in File stage. Check the online manual.

Regards
Amitava

Posted: Wed Oct 13, 2004 7:05 am
by Camaj
Bonjour Amitava,

Thank for your help.

I already do that, but since the file name I receive every day contain the month and day (xx.xx.#MONTHDAY#.xx) in the file name, I have to change the name every day.

So my question is how I can AUTOMATICALLY change this parameters before my job run on the daily basis with the scheduler.

Regrard !

Posted: Wed Oct 13, 2004 3:12 pm
by ray.wurlod
You write a simple job control (server) job that runs your parallel job, setting the required parameters. The code would include code such as

Code: Select all

* Generate current month and day with no delimiters
MonthDay = Oconv(@DATE, "DMD" : @VM : "MCN")

* hJob is the job handle assigned by a previous DSAttachJob() call
ParamName = "MONTHDAY"
ParamValue = MonthDay
ErrCode = DSSetParam(hJob, ParamName, ParamValue)

If ErrCode <> DSJE.NOERROR
Then
   * code for handling failure to set parameter
End