Compiler Directives
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 1
- Joined: Mon Jun 13, 2011 8:02 pm
Compiler Directives
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
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 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?
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.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page