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.
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
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.