IBM Support

How to determine location of Enterprise COBOL for z/OS, V5.1 Special Register variables ?

Question & Answer


Question

How can I determine location of Enterprise COBOL for z/OS, V5.1 Special Register variables ?

Answer

Available at PTF UK96988 and above the listings contain a Special Register Table (similar to the Base Locator Table) that provides the location information for all the COBOL Special Register variables.

Each entry in the Special Register Table consists of:

    1. A byte which represents the following info:
      • Special Register ID number [bits 0-4]
        ID = 1 represents RETURN-CODE register
      • Access Mode [bits 5-8]
        MODE = 0; Base Address = Top of Stack,
        MODE = 1; Base Addr = NORENT Static ,
        MODE = 2; Base Addr = 32-bit RENT static,
        MODE = 3; 24-bit NORENT static
    2. An offset to the Special Register.
The end of the Special Register Table is indicated by a null byte.
    Here is an example of Special Register Table:

                        Special Register Table
      0015B0  01              =X'1'      Table Version
      0015B1  00              =X'0'      Reserved
      0015B2  0008            =H'8'      Header length
      0015B4  00000006        =F'6'      Array byte length
      0015B8  12              =X'12'     Flags & info (element  1)
      0015B9  00000018        =X'18'     Offset to cells
      0015BD  00              =X'0'      Flags & info (end of array)
                         Special Register Table End



    The offset to the Special Register Table can be found in the second entry of the PPA3. Just like the Base Locator Table the offset is relative to the starting address of the PPA3:

                         PPA3:  Entry Point Constants
      0014D8  00000000        =F'0'      Flags
      0014DC  000000C0        =F'192'    A(Base_Locator_Table-PPA3)
      0014E0  000000D8        =F'216'    A(Special_Register_Table-PPA3)
      0014E0  00000184        =X'184'    A(User_Entry-CUEntry)
                         PPA3  End

    [{"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Compile","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"5.1","Edition":"Enterprise","Line of Business":{"code":"LOB17","label":"Mainframe TPS"}}]

    Document Information

    Modified date:
    08 August 2018

    UID

    swg21648048