Initializing Job parameter with current month and date

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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

How is this job called, from a controlling prospective?
The controlling job, whether it be a shell script or a job sequence, you can do this while passing the parameter to this job.
In a shell you can use the commands like date and pass month mask for one and year mask for another. In a sequence job you can use OCONV with the right format for month and year.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ds_debasis
Participant
Posts: 17
Joined: Fri May 25, 2007 11:59 am

Post by ds_debasis »

DSguru2B wrote:How is this job called, from a controlling prospective?
The controlling job, whether it be a shell script or a job sequence, you can do this while passing the parameter to this job.
In a shell you can use the commands like date and pass month mask for one and year mask for another. In a sequence job you can use OCONV with the right format for month and year.
As it is in job level parameter, I cannot initialize it ( It does not support any function) .. Can I do it in before job subroutine shell script ? if so how I'll initialize the parameter in the datastage job.
sri1dhar
Charter Member
Charter Member
Posts: 54
Joined: Mon Nov 03, 2003 3:57 pm

Post by sri1dhar »

ds_debasis wrote:
DSguru2B wrote:How is this job called, from a controlling prospective?
The controlling job, whether it be a shell script or a job sequence, you can do this while passing the parameter to this job.
In a shell you can use the commands like date and pass month mask for one and year mask for another. In a sequence job you can use OCONV with the right format for month and year.
As it is in job level parameter, I cannot initialize it ( It does not support any function) .. Can I do it in before job subroutine shell script ? if so how I'll initialize the parameter in the datastage job.
Deb,

Read DSguru's response again. How are you running your job? Do you have a Job sequence that's calling your job or calling from a shell script or running from Director?

If you are using a controlling job such as a Job Sequence or shell script you can programatically derive current month & date and pass them as parameter values. If you are running manually from the Director then you may have to manually enter as you are doing now.

Hope this helps.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Instead of using job parameters you could use stage variables. Initialize them, and do not derive them further - that is, leave the derivation field empty.
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