Re: Single Source CICS/Batch
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 18:40:11 -0700
William M. Klein<wmklein@xxxxxxxxxxxxxxxxx> 10/30/06 4:53 PM >>>
I thought that there was documentation on how to create a "separatelycompiled"
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 MOSTLYfrom
memory (possibly erroneous). You probably should start by reading thehttp://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg31/3.1.1.2
information at:
use
1) Make certain the subprogram has
DFHEIBLK and DFHCOMMAREA
as the first two parameters in Linkage Section (even though you will NOT
them in the batch version). (If you don't translate the subprogram sourcecode,
this MAY not be required.)
I'd like to make, not a correction exactly, but an observation or two:
1) As you say, if you do not translate the subprogram then you definitely
don't need (or want) to include DFHEIBLK and DFHCOMMAREA as the first two
parameters.
2) Even if you do translate it there's what I consider to be a better
option. Use the NOLINKAGE translate option "PROCESS XOPTS(CICS,NOLINKAGE)".
In order to make this work you have to do a few additional things:
- define DFHEIBLK yourself by putting "COPY DFHEIBLK" (or "COPY DFHEIBLC")
in the LINKAGE SECTION.
- explicitly establish linkage to both the EIB and the commarea:
EXEC CICS ADDRESS
EIB (ADDRESS OF EIBLK)
COMMAREA (ADDRESS OF COMMAREA)
END-EXEC
By doing all of the above you can call the routine under CICS as you would
under batch, ie.
CALL PROGRAM-NAME USING PARM1, PARM2
Of course you'll only want to do that if you know you are executing under
CICS.
Again, none of the above is necessary if the COBOL subroutine does not need
to execute any CICS statements.
By the by, I have a COBOL program that works under CICS TS for VSE that will
tell you if you are running under CICS or not. Not sure if it would work
with MVS, but I can post it if someone wants it.
Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.
- Follow-Ups:
- Re: Single Source CICS/Batch
- From: William M. Klein
- Re: Single Source CICS/Batch
- References:
- Single Source CICS/Batch
- From: Vanroy - Cleymans
- Re: Single Source CICS/Batch
- From: Robert Jones
- Re: Single Source CICS/Batch
- From: William M. Klein
- Single Source CICS/Batch
- Prev by Date: Re: Tab delimiter
- Next by Date: Re: Single Source CICS/Batch
- Previous by thread: Re: Single Source CICS/Batch
- Next by thread: Re: Single Source CICS/Batch
- Index(es):
Relevant Pages
|