IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 DATOFWEEK function in Easytrieve 6.3


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mary Lewis

New User


Joined: 25 Dec 2007
Posts: 15
Location: Albany, NY

PostPosted: Thu Apr 24, 2008 11:31 pm
Reply with quote

icon_cry.gif 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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 12:28 am
Reply with quote

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
View user's profile Send private message
Mary Lewis

New User


Joined: 25 Dec 2007
Posts: 15
Location: Albany, NY

PostPosted: Fri Apr 25, 2008 12:37 am
Reply with quote

Yes, I tried defining the variables a 'W' and got the same result.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 12:44 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top