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 CICS to Webservices safexc CICS 1 Sun Jan 22, 2017 5:49 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am


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