MFJCTLBP

MFJCTLBP is the JCL control block interface API which enables the retrieval of information related to the JCL control block or the DD control block parameters.

Syntax:

call 'MFJCTLBP' using ctlb-function
                      ctlb-retcode
                      [ctlb-exec-area|ctlb-dd-area]

Parameters:

ctlb-function
Function you can use with the control block API.
ctlb-retcode
Return code from the API.
ctlb-exec-area
This field holds information about the job which is being executed.
ctlb-dd-area
This field holds information about the data definition (dd).
Note: In order for this call to work, you need to set the ctlb-exec-version or ctlb-dd-version fields prior to the call.

Example:

To specify a data structure in the Working Storage section that includes mfjctlbc copybook fields:

WORKING-STORAGE SECTION.
copy 'mfjctlbc.cpy' replacing ==(TAG)== by ==ctlb==.
Call MFJCTLBP:
call 'MFJCTLBP' using ctlb-function
                      ctlb-retcode
                      ctlb-dd-area

Functions:

This section describes the functions you can use with the Control Block API.

The COBOL copybook mfjctlbp.cpy contains declarations of the list of functions that you can use to populate the function field (ctlb-function) when calling the API:

01  ctlb-function              pic  9(08) comp.
    88  ctlb-func-ctl-begin               value  01.
    88  ctlb-func-ctl-end                 value  02.
    88  ctlb-func-get-exec                value  10.
    88  ctlb-func-get-dd                  value  20.
    88  ctlb-func-get-dd-concat           value  21.
    88  ctlb-func-get-dd-first            value  30.
    88  ctlb-func-get-dd-next             value  31.
    88  ctlb-func-get-dd-end              value  32.
    88  ctlb-func-alloc-dd                value  40.
    88  ctlb-func-dealloc-dd              value  41.
    88  ctlb-func-delete-dd               value  42.
    88  ctlb-func-concat-add-first        value  50.
    88  ctlb-func-concat-add-next         value  51.
    88  ctlb-func-concat-alloc            value  52.

The following is a list of the function names and their corresponding codes and descriptions:

Function name Function code Description
ctlb-func-ctl-begin 01 Lock ES NSM for SSTM CICS.
ctlb-func-ctl-end 02 Unlock ES NSM for SSTM CICS.
ctlb-func-get-exec 10 Retrieves job information including job name, job number, userid, step/proc information, job class, MSGCLASS, programmer name, jes system. This function also retrieves the JCL exec information including program name, program alias name, return code, parm information.
ctlb-func-get-dd 20 Enables the user to retrieve the DD information including DDname, DSname, PDS member, PCname, DDnumber, DISP, GDG bias number, DS type, BLKSIZE, DSORG, LRECL, RECFM, CHARSET, DATACLAS, MGMTCLAS, STORCLAS, an so on.
ctlb-func-get-dd-concat 21 Retrieves DD information of the next concatenated DD.
ctlb-func-get-dd-first 30 Retrieves DD information of the first DD record.
ctlb-func-get-dd-next 31 Returns DD information of the next DD record.
ctlb-func-get-dd-end 32 This function is used when you have finished processing the DD information. It enables the API to recover the memory allocated to hold the DD information.
ctlb-func-alloc-dd 40 This function adds and allocates resources for a specific DD.
ctlb-func-dealloc-dd 41 This function deallocates resources for a specific DD.
ctlb-func-delete-dd 42 This function removes the DD records associated with ddname.
ctlb-func-concat-add-first 50 This function adds the first concatenated DD.
ctlb-func-concat-add-next 51 This function adds the subsequent concatenated DD.
ctlb-func-concat-alloc 52 This function allocates resources for the concatenated DD.