Pass next day of a date to a job from job activity stage

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
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Pass next day of a date to a job from job activity stage

Post by dsusersaj »

Hi,

I have a requirement ,which is to pass a a date as well as the next day of the date(date+1) to the job thorugh activity stage in sequencer. I need to read 2 files with the current date (data date) and the next day as file timestamps.

I have found a way which I think is too much processing for a simple thing. Here is my solution.

In sequencer,

Job1(this will add 1 day to the data date using the function DateFromDaysSince and then write the date to a file) ====> Execute command stage( which will read this file and out put the date)===> Job2 (gets data date from sequencer parameter and the next day from Execute Command output)

Is there a simple way to do this?. I am not an expert in writing in shell scripts although did some research to get the next date from a parameter date passed to the script with no luck.



Thanks...
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Why you want to write the date in a file and read again. Instead you can use UserVariable activities.
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Post by dsusersaj »

vinothkumar wrote:Why you want to write the date in a file and read again. Instead you can use UserVariable activities.
I cannot use the date funtion DateFromDaysSince in the user activity varible stage. Otherwise I could have just done the date manipulation in the user activity varible stage and passed that value.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Where is the date coming from? Convert it (if required) to internal format using Iconv(), add 1 then convert it back to external format (if required) using Oconv().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dsusersaj
Premium Member
Premium Member
Posts: 160
Joined: Mon Dec 17, 2007 10:44 am

Post by dsusersaj »

ray.wurlod wrote:Where is the date coming from? Convert it (if required) to internal format using Iconv(), add 1 then convert it back to external format (if required) using Oconv(). ...
Thanks ..

This worked as per your suggestion.
Post Reply