Gen External Action Block source generate PS-EAB-PCB-PTR as a comment
search cancel

Gen External Action Block source generate PS-EAB-PCB-PTR as a comment

book

Article ID: 377285

calendar_today

Updated On:

Products

Gen - Host Encyclopedia Gen - Workstation Toolset Gen

Issue/Introduction

Gen 8.6 generated External Action Block(EAB) contains a definition for PS-EAB-PCB-PTR but it is commented out.
If wanting to access I/O PCB, should the PS-EAB-PCB-PTR lines be uncommented, or can PS-EAB-PCB-ADR be used instead?

          03  PS-EAB-DATA.
      *
               05 PS-EAB-PCB-CNT      PIC S9(9) COMP SYNC.
               05 PS-EAB-PCB-ENTRY          OCCURS 255.
                  07 PS-EAB-PCB-ADR   PIC S9(9) COMP SYNC.
      *           07 PS-EAB-PCB-PTR         REDEFINES
      *                             PS-EAB-PCB-ADR
      *                             POINTER.

Environment

Gen 8.6

Resolution

The Gen generator code has been doing this since the IEF 5.0 release.  The code is generated as comments because under most circumstances it will not be needed by an EAB.
 
For IMS applications, the IEF-RUNTIME-PARM1 variable maps to the IO-PCB, and the IEF-RUNTIME-PARM2 variable maps to the ALT-IO-PCB (refer to: create the calling procedure step or action block).
 
The only time the commented code might be needed is if the EAB needs to access DL/I Database PCBs.  In that case, then the code would need to be uncommented and coded similar to the following:
 
SET ADDRESS OF DB-PCB TO PS-EAB-PCB-PTR(3)
 
If access to the IO-PCB is needed, then use of the IEF-RUNTIME-PARM1 variable could work with no need to uncomment the code.  Otherwise, if preferred, uncomment the code and write code similar to the following:
 
SET ADDRESS OF IO-PCB TO PS-EAB-PCB-PTR(1)
SET ADDRESS OF ALT-IO-PCB TO PS-EAB-PCB-PTR(2)