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
 
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 CICS EZASOKET CONNECT using DNS name ankit.jain CICS 1 Tue Jan 16, 2018 7:24 pm
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 1 Wed Dec 20, 2017 11:10 am
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts How to get complete URL from CICS Con... mbattu CICS 1 Tue Nov 14, 2017 11:59 pm
No new posts Integrating CICS applications craig2020 CICS 1 Sun Oct 29, 2017 6:49 pm

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