CICS and Assembler

122 views
Skip to first unread message

billl....@gmail.com

unread,
Sep 11, 2013, 6:34:24 PM9/11/13
to mainfr...@googlegroups.com
The example program found at ===> http://www.mainframes360.com/2010/11/learning-assembler-language.html, was written for Batch and is non-reentrant. Of course, the DCB must be removed to execute in CICS as a "CALLED" sub-program. The easiest method to run in CICS is to pass reentrant storage (this is a necessity in a Threadsafe/OpenAPI environment) from the caller as a parameter. If this were running in Batch, using the CICS DFHAFCD Macro (expands into 3 "load" instructions) can tell you (see below) whether the run-environment is CICS or Batch. With that, if Batch, then the storage allocated can be non-reentrant and defined to the program itself (known as program-storage) or always pass the reentrant storage as a parameter from the Caller and then it doesn't matter.
 
         DFHAFCD TYPE=LOCATE    R15 is the default
         LTR   15,15                             Valid address?
         BZ      BATCH                         No,  Batch environment
         CLC   =CL3'AFC',0(15)           Target literal found?
         BNE   BATCH                          No,  Batch environment
 
HTH....
 
Regards,
 
Bill (Grumpy Old Dinosaur)

Quasar Chunawala

unread,
Sep 20, 2013, 9:45:56 PM9/20/13
to mainfr...@googlegroups.com
Hi Bill,

Nice insight about DFHAFCD. I realize, that if the caller always passes re-entrant storage, then it really doesn't matter.

Apart from a programming course on MVS Assembler, I haven't done any Assembler. So, let me ask this - 

One - Can re-entrant storage be equated to LINKAGE in COBOL?
Two - I have a copy of Hank Murphy's book on Assembler. What are the other good books on the subject?

Thanks in advance,

--
You received this message because you are subscribed to the Google Groups "Mainframes 360" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mainframes36...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mainframes360/bb203852-77db-4602-a205-9a5ba5199a57%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Quasar Chunawala

unread,
Sep 21, 2013, 4:27:21 AM9/21/13
to mainfr...@googlegroups.com, Bill O'Boyle
Bill - Here's the cover of the book, "Assembler for COBOL programmers". I think, this should evoke some good memories!

Inline image 2

2013-09-21 06.59.36.jpg
Reply all
Reply to author
Forward
0 new messages