Hi,
I have 2 jobs in sequence ,first job will execute daily and second job should execite if it is Saturday, how to implement in sequence? any built in function will help?
Thanks
Malli
find day of week
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
find day of week
MALLI
The function will return a number, 1-7 for Mon through Sun. Thus a query on this having a value = 6 will mean you are running on a Saturday.
Code: Select all
OCONV(@DATE,'DW')
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
Simple to test, write a datastage server function. I just did and it considers today, Tuesday, to be a 3. Thus in our installation Sunday is day 1. I had forgotten that this value can change. According to the UV/BASIC docs:
Requests only the day number within the week (1 through 7, where Sunday is 7). If NLS locales are enabled, uses the DAYS field in the NLS.LC.TIME file, where Sunday is 1.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Or you could use Oconv(@DATE, "DWA") to get the day name, or Oconv(@DATE, "DWB") to get the abbreviated day name. Then the numeric value does not really come into play.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.