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

comparing table value with that of ws- variable


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Thu Jun 11, 2009 1:23 pm
Reply with quote

hi all

i need to write a query using cursor
in table there is a date date_input

i need to declare cursor, with filering criteria as where year(date_input) = year(ws-input-date)

ws-input-date is ws variable of input date in file, it is also in db2 format.

pls suggest how can i write this query.
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Thu Jun 11, 2009 3:49 pm
Reply with quote

Can you let us know what is the declaration of ws-input-date in cobol program
Back to top
View user's profile Send private message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Thu Jun 11, 2009 3:58 pm
Reply with quote

hey got it

we can use as

where YEAR(DATE_INPUT) = YEAR('WS-INPUT-DATE')
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top