My preferred method is to pre-compile the subroutine using the
XOPTS(CICS,NOLINKAGE) option. This allows you to do a CALL (both from batch
and from CICS) without providing the COMMAREA at all. This makes setting up
the CICS stuff *very slightly* more manual, but to me it's simpler to deal with.
The manual parts are:
Add the DFHEIBLK area to the linkage section, ie:
COPY DFHEIBLK REPLACING == EIBLK. == BY == dfheiblk global. ==.
Check if running under CICS, and if so execute the following:
EXEC CICS ADDRESS
EIB (ADDRESS OF DFHEIBLK)
END-EXEC
Note: The DFHEIBLK copybook is in the CICS SDFHCOB source library, so you need
to make sure that is in your SYSLIB concatenation for the compile.
Very simple. I use it quite a bit. I wish it were more obviously documented
in the CICS manuals, however. Seems like it's not a very well known option.
Frank
--
Frank Swarbrick
Applications Architect - Mainframe Applications Development
FirstBank Data Corporation
Lakewood, CO USA
P: 303-235-1403
F: 303-235-2075
On 6/10/2009 at 5:15 AM, in message
<listserv%[email protected]>, Jan MOEYERSONS
<[email protected]> wrote:
> On Fri, 5 Jun 2009 17:01:39 +0100, Andy Robertson
> <[email protected]> wrote:
>
>>AFAIK if a module uses EXEC CICS statements it cannot be CALLed, but must
>>be invoked
>>by EXEC CICS LINK or similar.
>>
> Not true.
>
> All you need to do is to provide for the COMMAREA that will have been added
> by the pre-compile of the CALLed module.
>
> Cheers,
>
> Jantje.
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>>>
The information contained in this electronic communication and any document
attached hereto or transmitted herewith is confidential and intended for the
exclusive use of the individual or entity named above. If the reader of this
message is not the intended recipient or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that any
examination, use, dissemination, distribution or copying of this communication
or any part thereof is strictly prohibited. If you have received this
communication in error, please immediately notify the sender by reply e-mail
and destroy this communication. Thank you.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html