Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Error during DB2 compilation SQLSTATE=42601

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Fri Jun 15, 2007 1:37 pm    Post subject: Error during DB2 compilation SQLSTATE=42601
Reply with quote

Hi I got the following error while compiling a DB2 program . What is the solution ?

An unexpected token "UNION SELECT
'Y' " was found following "FF_DT > CURRENT
DATE". Expected tokens may include: "<space>".
SQLSTATE=42601

AND
my query looks like this

SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-ONLY
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-COMP
AND CNTCT_EFF_DT > CURRENT DATE
Back to top
View user's profile Send private message

priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Tue Jun 19, 2007 8:00 pm    Post subject:
Reply with quote

i think declarion of WS-AID-CD-COMP was not done properly.
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us