View previous topic :: View next topic
|
Author |
Message |
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
I'm having trouble extracting DAYOFWEEK from a DB2 date into an
Easytrieve ws-day-of-week variable. It compiles fine, but on execution I get an SQLCODE of -301. Here is my code:
WS-5-BUS-DAY-DT S 10 A
WS-DAY-OF-WEEK S 4 B 0
SQL SELECT DAYOFWEEK(DATE(:WS-5-BUS-DAY-DT)) +
INTO :WS-DAY-OF-WEEK +
FROM SYSIBM.SYSDUMMY1
I need HELP!!! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Have you tried defining these
Code: |
WS-5-BUS-DAY-DT S 10 A
WS-DAY-OF-WEEK S 4 B 0
|
as "W" instead of "S"? |
|
Back to top |
|
|
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
Yes, I tried defining the variables a 'W' and got the same result. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Mary,
It may help if you post more of the code.
I'd suggest at least the SQL FILE definition and any other "ws-" host variables. |
|
Back to top |
|
|
|