Sequence job End of Quarter Date

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
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Sequence job End of Quarter Date

Post by jackson.eyton »

Does anyone know how I would go about getting the end of quarter date for the current quarter? We have some processes that need to run a loop, once for just end of month, twice for end of month if that is also the end of quarter, and three times if that end of month is also the end of the year. I made a post earlier about the end of month, I got that one down, end of year is also pretty straight forward. I am not too sure on the end of quarter date. I saw that I can get the quarter number using Oconv/Iconv but I can't wrap my head around how to use that for what I am needing. Any suggestions would be greatly appreciated.
-Me
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

ok, never mind again.... I really didn't think this one through, got it after lunch...

Q1: Oconv(Iconv(@YEAR:"03":"31","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q2: Oconv(Iconv(@YEAR:"06":"30","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q3: Oconv(Iconv(@YEAR:"09":"30","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
Q4: Oconv(Iconv(@YEAR:"12":"31","D-YMD[4,2,2]"), "D-YMD[4,2,2]")
-Me
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check out the supplied Transform called QUARTER.LAST
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jackson.eyton
Premium Member
Premium Member
Posts: 145
Joined: Thu Oct 26, 2017 10:43 am

Post by jackson.eyton »

Oconv(QUARTER.LAST(Oconv(@DATE, "DY[4]") : "Q" : Oconv(@DATE, "DQ")),"D-YMD[4,2,2]")


Interesting.......
-Me
Post Reply