Using IMS compatible calls-Changing Assembler language application programs


This section describes how to code IMS compatible calls and structures in an Assembler language application program. For more information, see and Using-ASAM-services-through-GSAM-replacement.

Entry and return

Use any name for the entry statement. When AR/CTL passes control to the application program, register 1 contains the address of a variable-length fullword parameter list. Each fullword in the list contains the address of a PCB. The last fullword in the list contains X'80' in the high-order byte. Save the contents of register 1 before overwriting them. Use standard MVS linkage conventions with forward and backward chaining.

Checkpoint I/O area

Define the checkpoint I/O area with the DS statement:

CHKPAREA DS 0CL12
CHKPID   DS CL8
CHKPPAD  DS CL4

ASAM I/O area

Define the ASAM I/O area with the DS statement:

ASAMAREA DS 0CL52
ASAMFLD1 DS CL4
ASAMFLD2 DS CL16
ASAMFLD3 DS CL32

Checkpoint PCB mask

Define only one checkpoint PCB mask per DSECT. Save the address of each PCB or the pointer to the list of PCB addresses. Then load the PCB address register with the PCB address before issuing the AR/CTL call.

CHKPPCB   DSECT
          DS    CL10    RESERVED
CHKPSTAT  DS    CL2     CHECKPOINT STATUS CODE
          DS    CL28    RESERVED

ASAM PCB mask

Save either the address of each PCB or the pointer to the list of PCB addresses. Then load the PCB address register with the PCB address before issuing the AR/CTL call.

ASAMPCB   DSECT
ASAMNAME  DS    CL8     ASAM PCB NAME
          DS    CL2     NOT USED
ASAMSTAT  DS    CL2     ASAM STATUS CODE
APROCOPT  DS    CL28    PROCESSING OPTION
          DS    F       RESERVED
          DS    CL8     NOT USED
ALENFLDS  DS    F       FIELD LENGTHS
          DS    F       NOT USED
ASAMRSA   DS    CL8     RECORD SEARCH ARGUMENT
AURECLEN  DS    F       UNDEFINED RECORD LENGTH

Call function codes

Define call function codes as constants with DC statement:

XRST     DC    CL4'XRST'
CHKP     DC    CL4'CHKP'
GU       DC    CL4'GU'
GN       DC    CL4'GN'
ISRT     DC    CL4'ISRT'

AR/CTL calls

The following shows how to code the AR/CTL calls:

CALL ASMTDLI,(function,parmlist...),VL

Call parameters

The following parameters are valid on the AR/CTL call:

ASMTDLI

Required. The name of the AR/CTL module to call for support functions. The module names are identical to those used in IMS for compatibility purposes.

function

Required. The address of the area that contains the four-byte function code that identifies the type of call.

parmlist

Required. A list of parameters that the application program passes to 

AR/CTL

 with the call. 

AR/CTL

 calls use the same parameter lists required by IMS. The parameters to include in the list depend on the call function. If the call requires more than one parameter, code them in the order listed.

VL

Required and valid for Assembler language only. Literal that marks the end of the parameter list.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*