Specifying the AIB mask

The application interface block (AIB) is used by your program to communicate with IMS™, when your application does not have a PCB address or the call function does not use a PCB.

The application program can use the returned PCB address, when available, to inspect the status code in the PCB and to obtain any other information needed by the application program. The AIB mask enables your program to interpret the control block defined. The AIB structure must be defined in working storage, on a fullword boundary, and initialized according to the order and byte length of the fields as shown in the following table. The table’s notes describe the contents of each field.

Table 1. AIB fields
Descriptor Byte Length DB/DC DBCTL DCCTL DB Batch TM Batch
AIB identifier 1 8 X X X X X
DFSAIB allocated length 2 4 X X X X X
Subfunction code 3 8 X X X X X
Start of changeResource name 1 4End of change Start of change8End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeResource name 2 5End of change Start of change8End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeReserved 6End of change Start of change8End of change Start of change End of change Start of change End of change Start of change End of change Start of change End of change Start of change End of change
Maximum output area length 7 4 X X X X X
Output area length used 8 4 X X X X X
Start of changeResource field 9End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeReserved 11End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Return code 12 4 X X X X X
Reason code 13 4 X X X X X
Start of changeError code extension 14End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of change End of change Start of change End of change
Start of changeResource address 1 15End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeResource address 2 16End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeResource address 3 17End of change Start of change4End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeUser defined token 18End of change Start of change16End of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change Start of changeXEnd of change
Start of changeReturn token 19End of change Start of change8End of change Start of changeXEnd of change Start of changeXEnd of change Start of change End of change Start of changeXEnd of change Start of change End of change
Start of changeReserved 20End of change Start of change16End of change Start of change End of change Start of change End of change Start of change End of change Start of change End of change Start of change End of change
AIB Identifier (AIBID)
This 8-byte field contains the AIB identifier. You must initialize AIBID in your application program to the value DFSAIBbb before you issue DL/I calls. This field is required. When the call is completed, the information returned in this field is unchanged.
DFSAIB Allocated Length (AIBLEN)
This field contains the actual 4-byte length of the AIB as defined by your program. You must initialize AIBLEN in your application program before you issue DL/I calls. The minimum length required is 128 bytes. When the call is completed, the information returned in this field is unchanged. This field is required.
Subfunction Code (AIBSFUNC)
This 8-byte field contains the subfunction code for those calls that use a subfunction. You must initialize AIBSFUNC in your application program before you issue DL/I calls. When the call is completed, the information returned in this field is unchanged.
Resource Name (AIBRSNM1)

This 8-byte field contains the name of a resource. The resource varies depending on the call. You must initialize AIBRSNM1 in your application program before you issue DL/I calls. When the call is complete, the information returned in this field is unchanged. This field is required.

For PCB related calls where the AIB is used to pass the PCB name instead of passing the PCB address in the call list, this field contains the PCB name. The PCB name for the I/O PCB is IOPCBbb. The PCB name for other types of PCBs is defined in the PCBNAME= parameter in PSBGEN.

Start of changeResource Name 2 (AIBRSNM2)End of change
Start of changeThis 8-byte field contains the name of a resource. The resource varies depending on the call. You must initialize AIBRSNM2 in your application program before you issue DL/I calls.End of change
Start of changeReservedEnd of change
Start of changeThis 8-byte field is reserved.End of change
Maximum Output Area Length (AIBOALEN)
This 4-byte field contains the length of the output area in bytes that was specified in the call list. You must initialize AIBOALEN in your application program for all calls that return data to the output area. When the call is completed, the information returned in this area is unchanged.
Used Output Area Length (AIBOAUSE)
This 4-byte field contains the length of the data returned by IMS for all calls that return data to the output area. When the call is completed this field contains the length of the I/O area used for this call.
Start of changeResource Field (AIBRSFLD)End of change
Start of changeThis 4-byte field contains a resource. The resource varies depending on the call. You must initialize AIBRSFLD in your application program before you issue DL/I calls.End of change
Start of changeReservedEnd of change
Start of changeThis 4-byte field is reserved.End of change
Return code (AIBRETRN)
When the call is completed, this 4-byte field contains the return code.
Reason Code (AIBREASN)
When the call is completed, this 4-byte field contains the reason code.
Error Code Extension (AIBERRXT)
This 4-byte field contains additional error information depending on the return code in AIBRETRN and the reason code in AIBREASN.
Start of changeResource Address 1 (AIBRSA1)End of change
Start of changeWhen the call is completed, this 4-byte field contains call-specific information. For PCB related calls where the AIB is used to pass the PCB name instead of passing the PCB address in the call list, this field returns the PCB address.End of change
Start of changeResource Address 2 (AIBRSA2)End of change
Start of changeWhen the call is completed, this 4-byte field contains call-specific information.End of change
Start of changeResource Address 3 (AIBRSA3)End of change
Start of changeWhen the call is completed, this 4-byte field contains call-specific information.End of change
Start of changeUser Defined Token (AIBUTKN)End of change
Start of changeThis 16-byte field contains a user defined token. The token varies depending on the call.End of change
AIB return token (AIBRTKN)
AIB return token. This 8-byte field contains a token returned by a DL/I call. The usage is specific to the DL/I call for which the token was returned.
Start of changeReservedEnd of change
Start of change

This 16-byte field is reserved.

End of change