Job parameter question

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ririr
Participant
Posts: 84
Joined: Sun Apr 04, 2004 8:59 pm

Job parameter question

Post by ririr »

I have the following DS job design. DRS stage type is used for reading and writing data between the Source and the Target

Source--------->Transformer-------------Target

Parameter BUSINESS_DATE (DATE) is passed as date to the job and is being used in the transformer to map to a target column EFFECTIVE_DATE (DATE).


I have the folowing code in the job control window of the job.

BusinessDay=Oconv(( @DATE ) , "D-YMD[4,2,2]")
ParamName = "BUSINESS_DATE"
ParamValue = BusinessDay
ErrCode = DSSetParam(hJob, ParamName, ParamValue)

The parameter value is not getting changed dynamically, the job still uses the default value of the BUSINESS_DATE parameter, which is a dummy date(01-01-1900).

Any help is appreciated
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

A job cannot change its own parameter values during runtime. The job control tab is used to control other jobs.

Search this forum, we've covered job control and job parameters ad nauseum. If you which to feed job parameters, use the controlling Sequence, Batch, or command line options under dsjob to feed in the appropriate values.

If you don't use job parameters, you can investigate macros for things like filenames, but in the case you suggest, you can use a Stage variable and for the initialization value use OCONV(@DATE,'D-YMD[4,2,2]'). Then use the Stage variable as the derivation.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply