transformer function

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
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

transformer function

Post by just4u_sharath »

IF i give a data(200012) in the format (yyyymm). can i get the starting date and ending of that respective month. In this case can i get the starting date of 2000year december month (ofcourse starting day for all months will be 1, but is there any function) and ending date of 200year december month( this will vary, may be 30,31,28, 29).
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

THe parallel job function library does'nt have anything to get the last day of month, given the year and month.
First day is easy, you can just hardcode that. For last day, you can either go with a basic function, with the price of sacrificing parallelism, or construct your own c code to do this.
It will be a small function that will take in the year and month, parse for year, then apply leap year check on it and then check for month and get the last day.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
just4u_sharath
Premium Member
Premium Member
Posts: 236
Joined: Sun Apr 01, 2007 7:41 am
Location: Michigan

transformer function

Post by just4u_sharath »

Thanks for the reply.
Can you please give me the specific function with which i can access the last day of month. i looked for it in documentation but i didnt find it. Please reply
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There isn't one. You have to write your own. Get the logic from MONTH.LAST Transform from the server job side of the fence.
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