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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Create a specific record/file based o... SYNCSORT 8
No new posts variable in library name within a PROC. JCL & VSAM 11
No new posts Extract ISPF table column headings CLIST & REXX 2
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:


Back to Top