Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 DATOFWEEK function in Easytrieve 6.3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: DB2 DATOFWEEK function in Easytrieve 6.3
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

Site Director


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

PostPosted: Fri Apr 25, 2008 12:28 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Apr 25, 2008 12:44 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us