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
pp
Participant
Posts: 27
Joined: Tue Apr 03, 2007 8:50 pm

Date

Post by pp »

Is there an environment variable or any other way where we can get the current date as a parameter?
mallikarjuna36
Premium Member
Premium Member
Posts: 12
Joined: Mon Oct 22, 2007 7:58 am

Re: Date

Post by mallikarjuna36 »

yes.

study parallel extender PDF .

in that you can find this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you be more specific about your use of the term "parameter"? Is this a job parameter, or do you simply need the current date within your job design? Either is possible, but we'd prefer to answer the correct question.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pp
Participant
Posts: 27
Joined: Tue Apr 03, 2007 8:50 pm

Post by pp »

I have an input file name of which the date is a part.
An example file name is: abc102307
(102307 which is todays date.)

I know that we have date functions which we can use but that would be in the transformer. I would like to get the current date incorporated as a part of the filename before any processing starts.
So, I was thinking if we there was any environment variable which could accomplish this.

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

Post by ray.wurlod »

You can pick up the date from the @DATE system variable when assigning the job parameter value in your job sequence. You probably want to convert this to a "human readable" format in the assignment expression, for example

Code: Select all

Oconv(@DATE,"D-YMD[4,2,2]")
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