Using IMS compatible calls
This section describes how to code IMS compatible calls and structures in a PL/I application program.
For more information, see Using-AR-CTL-format-checkpoint-restart-calls and Using-the-ASAM-services-through-GSAM-replacement.
Entry and return | The entry statement must appear as the first executable statement in the program. When AR/CTL passes control to the application program, it passes the addresses, in the form of pointers, to each of the PCBs. The entry statement must list the pointers to the PCBs—not the PCB names: ANYNAME: PROCEDURE (CHKPPCB,ASAMPCB1,ASAMPCB2, ...) OPTIONS (MAIN); ... RETURN; |
---|---|
Checkpoint I/O area | The easiest way to define the checkpoint I/O area is as a fixed-length character string and then pass the name of the string to AR/CTL as the call parameter: DECLARE 1 CHKPAREA, 2 CHKPID CHAR(8), 2 CHKPPAD CHAR(4); |
You can define the checkpoint I/O area as a major structure, a connected array, or an adjustable character string, and then pass the pointer variable that points to that definition. You can also define the checkpoint I/O area as a minor structure if you use a pointer to the minor structure as the parameter. Do not use a character string with the VARYING attribute. If you use substructures or elements of an array, use the DEFINED or BASED attribute.
ASAM I/O area | The easiest way to define the ASAM I/O area is as a fixed-length character string, and then pass the name of the string to AR/CTL as the call parameter: DECLARE 1 ASAMAREA, 2 ASAMFLD1 CHAR(4), 2 ASAMFLD2 CHAR(16), 2 ASAMFLD3 CHAR(32); | ||||||||
---|---|---|---|---|---|---|---|---|---|
Checkpoint PCB mask | Define the checkpoint PCB mask as a level 1 declaration: DECLARE CHKPPCB_PTR POINTER; DECLARE 1 CHKPPCB_NAME BASED (CHKPPCB_PTR), 2 CHKP_FILL1 CHAR(28), 2 CHKP_STATUS CHAR(2), 2 CHKP_FILL2 CHAR(28); | ||||||||
ASAM PCB mask | Define the ASAM PCB as a level 1 declaration: DECLARE ASAMPCB_PTR POINTER; DECLARE 1 ASAMPCB_NAME BASED (ASAMPCB_PTR), 2 ASAMPCB_NAME CHAR(8), 2 ASAM_FILL1 CHAR(2), 2 ASAM_STATUS CHAR(2), 2 PROCOPT CHAR(4), 2 ASAM_RESERVE1 FIXED BIN(31,0), 2 ASAM_FILL2 CHAR(8), 2 LEN_FLDS FIXED BIN(31,0), 2 ASAM_FILL3 FIXED BIN(31,0), 2 RSA CHAR(8), 2 UREC_LEN FIXED BIN(31,0); | ||||||||
Call function codes | Define call function codes with declarations: DCL FUNC_XRST CHAR(4) INIT('XRST'); DCL FUNC_CHKP CHAR(4) INIT('CHKP'); DCL FUNC_GU CHAR(4) INIT('GU '); DCL FUNC_GN CHAR(4) INIT('GN '); DCL FUNC_ISRT CHAR(4) INIT('ISRT'); | ||||||||
AR/CTL calls | The following shows how to code AR/CTL call: CALL PLITDLI (parmcount, function, parmlist...); | ||||||||
Call Parameters | The following parameters are valid on the AR/CTL call:
|
Define the user areas to save in the checkpoint request or CHKP call as part of a structure. The user area cannot be part of a major structure or a stand-alone value. The length field must be declared as a 31-byte fixed binary field, as shown in the following example:
3 ULENGTH FIXED BIN(31) INIT(500);