Page 1 of 1

Determine DayofWeek in Job Sequencer

Posted: Tue Jan 29, 2008 8:50 am
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

Posted: Tue Jan 29, 2008 10:54 am
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

Posted: Tue Jan 29, 2008 5:06 pm
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.

Posted: Tue Jan 29, 2008 5:30 pm
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.

Posted: Tue Jan 29, 2008 9:45 pm
by ray.wurlod
And "DWB" gives the abbreviated form, for example "FRI".