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
 

 

comparing table value with that of ws- variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: comparing table value with that of ws- variable
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    Post subject:
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    Post subject: ISSUE RESOLVED
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm


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