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

Date validation SQL giving compilation error


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

New User


Joined: 01 Jun 2006
Posts: 23
Location: Sinagpore

PostPosted: Wed Sep 13, 2006 2:12 pm
Reply with quote

Hi

I want to validate date in cobol-db2 program. Iam using below SQL to do the validation.

select * from sysibm.sysdummy1 where current date = :ws-date

Its giving compilation error. Can any one provide the correct SQL

Tnx in advance

cheers

venkat
Back to top
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Sep 13, 2006 3:08 pm
Reply with quote

can you try using select current_date into :ws-date from sysibm.sysdummy1 where current_date = :ws-date.

I think the problem is because the cobol pgm expects the select statement to have the Into clause
Back to top
View user's profile Send private message
venkatm99

New User


Joined: 01 Jun 2006
Posts: 23
Location: Sinagpore

PostPosted: Wed Sep 13, 2006 3:24 pm
Reply with quote

No compilation errors now

tnx

cheers

venkat
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top