Hi,
We've got a new install of ds 8.5 - in a trigger I have the above code so some jobs run on a Thursday. However they ran last night,.. Wednesday.
I though Monday was day one? So day four should be Thursday.
Running "date" on the unix box with the installion shows the correct day. Scheduling jobs to run on Thursday (with is today, day of posting),.. works.
I can do a quick fix by changing 4 to 5, but I don't understand it! Can anyone help please?
Thanks
Paul
oconv(data(), "DW") = 4 .. reads as Thursday?!
Moderators: chulett, rschirm, roy
You have a typo in your subject; it should be date().
Date conversion codes are documented in the DataStage BASIC Reference Guide and other places as well.
The "DW" conversion code description is "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."
It sounds like you fall into the latter part of the description.
You could switch to checking with "DWB" which is "Requests only the abbreviated day name. If NLS locales are enabled, uses the ABDAYS field in the NLS.LC.TIME file." Then you're dealing with day abbreviations rather than numbers.
Date conversion codes are documented in the DataStage BASIC Reference Guide and other places as well.
The "DW" conversion code description is "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."
It sounds like you fall into the latter part of the description.
You could switch to checking with "DWB" which is "Requests only the abbreviated day name. If NLS locales are enabled, uses the ABDAYS field in the NLS.LC.TIME file." Then you're dealing with day abbreviations rather than numbers.
Choose a job you love, and you will never have to work a day in your life. - Confucius
I was going to suggest switching to "DWA" and then checking for "THURSDAY" but basically the same suggestion, that way there's no confusion over what day of the week you are looking for.
I also seem to recall there may be a setting in the dsenv file that controls what day of the week is considered day 1?
I also seem to recall there may be a setting in the dsenv file that controls what day of the week is considered day 1?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks for that - the new install does indeed have NLSlocales enabled, previous install didn't.qt_ky wrote:The "DW" conversion code description is "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."
It sounds like you fall into the latter part of the description.