Passing working Date to to JOB Parameter

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Camaj
Premium Member
Premium Member
Posts: 15
Joined: Wed Sep 15, 2004 9:24 am

Passing working Date to to JOB Parameter

Post 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 !
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Hi,

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

Regards
Amitava
Camaj
Premium Member
Premium Member
Posts: 15
Joined: Wed Sep 15, 2004 9:24 am

Post 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 !
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
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