Page 1 of 1

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

Posted: Tue Jan 04, 2011 12:53 pm
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...

Posted: Tue Jan 04, 2011 1:18 pm
by vinothkumar
Why you want to write the date in a file and read again. Instead you can use UserVariable activities.

Posted: Tue Jan 04, 2011 1:24 pm
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.

Posted: Tue Jan 04, 2011 3:09 pm
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().

Posted: Tue Jan 04, 2011 3:55 pm
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.