Determine DayofWeek in Job Sequencer

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
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Determine DayofWeek in Job Sequencer

Post by vijayrc »

Hi,
I have a sequencer in which I have to notify by email a certain task. During Friday this should be sent to one set of receipients while it's run any other day, to another set of receipients...

I have a 'Nested Condition' Job Sequencing Activity to determine and branch out two different "Notification Activity" for emails.

I have @DAY = "Friday" Or "Fri" Or "FRIDAY" as the constraint in one and Otherwise in other ....[I just made this up,as I wasn't sure what is returned out of @DAY]. Tried manual and search here, but didn't help.

Any direction on what I'm missing here...!!
Thanks,
Vijay
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Vijay,

Where did you find @DAY?

You can use the ExecuteCommand stage to execute a unix command to find the Day and then use the output (Execute_Command_0.$CommandOutput) in the NestedCondition activity to find if it is Friday or not and then move on from there.

HTH
--Rich
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post by vijayrc »

richdhan wrote:Hi Vijay,

Where did you find @DAY?

You can use the ExecuteCommand stage to execute a unix command to find the Day and then use the output (Execute_Command_0.$CommandOutput) in the NestedCondition activity to find if it is Friday or not and then move on from there.

HTH
--Rich
Thanks Rich..I'll try it out.
The @DAY is found in the Nested Condition [Conditional] output link pull-down menu option using the System Variable.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OConv with the DWA conversion code will get you day of the week spelled out. So a routine that takes a passed in date and returns the following could be used to branch in your Sequence. Something like:

Code: Select all

Oconv(IConv(YourDate,"D-YMD"), "DWA")
You could then check for "FRIDAY" downstream of the routine.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And "DWB" gives the abbreviated form, for example "FRI".
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