Job sequencer problem

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:suggested @DAY usage
8)
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

:oops:

I'm still peeking on the options available to get done with issue.
My bad to keep this post in the WORKAROUND status. Will try your's way(using routine) and the one Ray pointed out( @DAY=@DAY+1).

Till then, its UNRESOLVED to me!! :o

Will keep you posted.

Regards,
Kumarjit.
Pain is the best teacher, but very few attend his class..
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

Correct me if I'm wrong Ray.
If today is March 31st, 2015, i.e., the last day of the current month,then:

@DATE=03/31/2015
@DAY=31

Now @DATE+1 will return me 04/01/2015 as its is similar to adding days to a date, but shouldn't the expression @DAY+1 return me 32 instead of 1, as I'm simply adding 1 to the numerical day count?

As @DAY is the numerical day value extracted from @DATE, will @DAY+1 translate in a similar way from @DATE+1 value?

Regards.
Kumarjit.
Pain is the best teacher, but very few attend his class..
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

qt_ky wrote:Try using the User Variables stage.
Could you please clarify how the User Variable stage caters?

Regards,
Kumarjit.
Pain is the best teacher, but very few attend his class..
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Doesn't @DATE give the current date in an internal format? You could add 1 to that number, convert the result to a normal looking date format, then check the day part of it, if it's equal to 1...
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... which is what @DAY is already doing for you!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I guess I misled you with @DAY + 1. Ignore that.
Use Oconv(@DATE + 1, "DD") = 1
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