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
 

 

An error during CICS precompilation

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

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Tue May 29, 2007 2:11 pm    Post subject: An error during CICS precompilation
Reply with quote

Hi I treid executing a CICS proigram in unix. I got an error saying that
An unexpected token "UNION
" was found following "FF_DT > CURRENT DATE". Expected
tokens may include: "<space>". SQLSTATE=42601

Can anybody please help me in solving this problem ?

This is the piece of code whare I am getting error.

EXEC SQL
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-ONLY
AND COMP_CD IS NULL
AND PRICGRP_CD IS NULL
AND CUST_NBR IS NULL
AND CNTCT_PURP_CD = :WS-PURPOSE-CD-IDP
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 COMP_CD = :WS-COMP-CD
AND PRICGRP_CD IS NULL
AND CUST_NBR IS NULL
AND CNTCT_PURP_CD = :WS-PURPOSE-CODE
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD = :WS-AID-CD-PRICE
AND COMP_CD IS NULL
AND PRICGRP_CD = :WS-PRICGRP-CD
AND CUST_NBR IS NULL
AND CNTCT_PURP_CD = :WS-PURPOSE-CD-IDP
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD IS NULL
AND COMP_CD IS NULL
AND PRICGRP_CD IS NULL
AND CUST_NBR = :WS-CUST-NBR
AND CNTCT_PURP_CD = :WS-PURPOSE-CD-IDP
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD IS NULL
AND COMP_CD IS NULL
AND PRICGRP_CD IS NULL
AND CUST_NBR IS NULL
AND DHL_CUST_ID = :WS-CSTMR-ID
AND DHL_TRF_ID = :WS-TARIFF-AG
AND CNTCT_PURP_CD = :WS-PURPOSE-CODE
AND CNTCT_EFF_DT > CURRENT DATE
UNION
SELECT 'Y'
INTO :WS-FUTURE-EXIST-SW
FROM CON01_CUST_CNTCT
WHERE
AID_CD IS NULL
AND COMP_CD IS NULL
AND PRICGRP_CD IS NULL
AND CUST_NBR IS NULL
AND DHL_CUST_ID IS NULL
AND DHL_TRF_ID = :WS-TARIFF-AG
AND CNTCT_PURP_CD = :WS-PURPOSE-CODE
AND CNTCT_EFF_DT > CURRENT DATE
END-EXEC.
Back to top
View user's profile Send private message

pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue May 29, 2007 3:12 pm    Post subject:
Reply with quote

Can union be used without cursor .. in embedded sql?
Back to top
View user's profile Send private message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Tue May 29, 2007 3:42 pm    Post subject: Re: An error during CICS precompilation
Reply with quote

The same program is compiled in mainframe
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue May 29, 2007 3:48 pm    Post subject: Re: An error during CICS precompilation
Reply with quote

dineshsjce wrote:
The same program is compiled in mainframe


UNION will retrieve more than one row more often than not.

How can you handle more than one row without using cursor icon_idea.gif

hope i have been able to put my point across... icon_rolleyes.gif

so even if the program compiles .. i think it will abend at run time....

Correct me if i am wrong icon_arrow.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 3 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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