Working day of last month

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
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Working day of last month

Post by tsktsk123 »

Hi,

Can anyone help to understand if there is any function in datastage to get the working day of last month i.e. say the month end is 31-May-2008, then we need to see if the month end day falls on weekend if so we need to get the friday(30-May-2008) and pass it to the target. In this example 31-May-2008 is saturday, so we need to pass the 30-May-2008 to target as it's a friday.

I know we can implement it by using a time dimesion, i like to know if we can implement the same without using the time dimension.

I appreciate any help on this.

regards,
senthil kumar
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Sure, write a function that reads the Time dimension. :lol:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Dagnabbit, someday someone will listen Ken! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The simplest, easiest, most scalable and flexible solution seems to be avoided most of the time.

Why not write a function that has an internal array of all days for the last+next 500 years that lists all of the holidays? Another function that lists all of the work days? Another function that correlates all of the days to their last day of the month? Where does it end?

There is NO magic algorithm that gives all answers to all questions, unless folks want to argue about GUT/TOE.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How about using the RMM stage?
:lol:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rsomiset
Premium Member
Premium Member
Posts: 46
Joined: Fri Sep 21, 2007 7:16 pm

Post by rsomiset »

Hi Ray,
What does RMM stage do??
--
Raj
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you searched the forum for it? This post for instance?
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