Re: Single Source CICS/Batch



I thought that there was documentation on how to create a "separately compiled"
program to be called (usually dynamically) by both a CICS and non-CICS main
program, but so far I can't find it. Therefore, the following is MOSTLY from
memory (possibly erroneous). You probably should start by reading the
information at:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg31/3.1.1.2

1) Make certain the subprogram has
DFHEIBLK and DFHCOMMAREA
as the first two parameters in Linkage Section (even though you will NOT use
them in the batch version). (If you don't translate the subprogram source code,
this MAY not be required.)

2) do NOT use any EXEC CICS statements in the subprogram (or it won't work under
non-CICS). Do not use any "native COBOL I/O" (OPEN, READ, WRITE, etc) or it will
have problems under CICS.

3) Under LE, I do NOT think you need to separately "link-edit" a version for
CICS and non-CICS, but you did need to under VS COBOL II.

4) To use dynamic call under CICS, use
CALL identifier (syntax)
rather than
CALL "literal" syntax)

5) You can make this a statically called subroutine - but then change will need
to be "coordinated" manually.

--
Bill Klein
wmklein <at> ix.netcom.com


.



Relevant Pages

  • Re: Single Source CICS/Batch
    ... Make certain the subprogram has ... do NOT use any EXEC CICS statements in the subprogram (or it won't work ... for CICS and non-CICS, but you did need to under VS COBOL II. ... CALL identifier (syntax) ...
    (comp.lang.cobol)
  • Re: Diffence between two CICS READ ; FILE & DATASET
    ... > I am a newbie in CICS COBOL. ... I came across two possible syntax to read ... if you specify the "NOHANDLE" keyword. ...
    (comp.lang.cobol)
  • Re: Diffence between two CICS READ ; FILE & DATASET
    ... I am a newbie in CICS COBOL. ... I came across two possible syntax to read ... At some point in the past IBM changed the syntax of EXEC CICS READ and recommended using FILE for all future READ commands, but they still had to support the DATASET keyword in order to allow older CICS programs to compile and execute without any source code changes. ...
    (comp.lang.cobol)
  • Re: Diffence between two CICS READ ; FILE & DATASET
    ... zum Thema Diffence between two CICS READ; ... I came across two possible syntax to read ... and the other takes the fields USRRECC and CURRUSR. ...
    (comp.lang.cobol)
  • Diffence between two CICS READ ; FILE & DATASET
    ... I am a newbie in CICS COBOL. ... I came across two possible syntax to read ... a file from a CICS program. ... EXEC CICS ...
    (comp.lang.cobol)