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

Need help on COBOL CICS program.


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

New User


Joined: 11 Mar 2008
Posts: 9
Location: LA,USA

PostPosted: Fri Oct 15, 2010 7:20 am
Reply with quote

I have a common piece of code used in 4 programs which includes an EXEC CICS READ of a file and error handling of the same.

So i have copied this code in a member and compiled it as COPYCOB2 and used the COPYBOOK in Procedure division of 4 programs.

But when i Compile the COBOL CICS programs as COB2C, the code from Copy book is merged into program, BUT the CICS statements in the COPYBOOK are not recognized, it is throwing a COMPILER Error that EXEC CICS is not identified by COMPILER.


How to resolve this ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 15, 2010 7:37 am
Reply with quote

Does the compiler support the CICS option?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Oct 15, 2010 8:09 am
Reply with quote

If your compiler does NOT support the automatic translation of CICS API's, then you'll have to pre-translate the PROCEDURE DIVISION copybooks and store each translated copybook into a unique TRANSLATED COPYBOOK PDS.

Then, as part of the COMPILE step, add the above TRANSLATED COPYBOOK PDS to the SYSLIB concatenation and you're done.

No muss, no fuss.... icon_wink.gif

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 15, 2010 8:09 am
Reply with quote

what version cobol compiler are you using?
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top