Compiler Directives

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
SailorHugh
Member
Posts: 1
Joined: Mon Jun 13, 2011 8:02 pm

Compiler Directives

Post by SailorHugh » Mon Jun 13, 2011 8:27 pm

I have 2 COBOL programs, PGM1 and PGM2, both to be compiled as CICS programs and batch programs. PGM1 will also call PGM2. Is there a means to direct the compiler to compile code EXEC CICS LINK('PGM2') COMMAREA(PGM2-LINK-AREA) END-EXEC if I am compiling PGM1 as a CICS program, or to compile CALL PGM-PGM2 USING PGM2-LINK-AREA if PGM1 is being compiled as a batch program? Keep in mind that once these programs leave the Development area, they will be compiled by idiots.
SailorHugh

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Jun 13, 2011 9:08 pm

actually, it sounds as if they are being developed by idiots.
if not idiots, people who know nothing of COBOL and CICS.

cobol compiler directives have nothing to do with the CICS API instructions that
are converted to COBOL by the CICS pre-compiler.

you mention that you want to use these programs both in cics and batch.
1. depends on the methodology employed by your site. Is it the old,
crap from the 80's where you need a batch version and a cics version?

2. most intelligent design (nothing to do with the idiot religious crap from the states)
involves separating the environment from the business logic.
does program a or b require any cics instructions? (queue reads, vsam reads?)
if not, which ever module that invokes program A, should invoke via a cobol call,
same for A calling B.
then you only have 1 run-module for each program.
kicker here is getting a copy of the run-module into both the CICS application loadlib and the batch application loadlib.
but, have no idea of your site standards/set-up.
what have others done in the past?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others