Specifying the AIB mask for ODBA applications

The following table describes the fields for specifying the application interface block (AIB) mask for ODBA applications.

The notes that follow describe the contents of each field.

Table 1. AIB fields for use of ODBA applications
AIB Fields Byte Length DB/DC IMS DB DCCTL DB Batch TM Batch
AIB identifier 8 X X X X X
DFSAIB allocated length 4 X X X X X
Subfunction code 8 X X X X X
Resource name #1 8 X X X X X
Resource name #2 8          
Reserved 1 8 X        
Maximum output area length 4 X X X X X
Output area length used 4 X X X X X
Reserved 2 12          
Return code 4 X X X X X
Reason code 4 X X X X X
Error code extension 4 X        
Resource address #1 4 X X X X X
Resource address #2 4          
Resource address #3 4          
AIB return token 8 X X   X  
Reserved 3

32

         
Reserved for ODBA 136          
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 264 bytes for ODBA. 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) #1

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.

Resource Name (AIBRSNM2) #2
Specify a 4-character ID of ODBA startup table DFSxxxx0, where xxxx is a 4-character ID.
Reserved 1
This 8-byte field is reserved.
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.
Reserved 2
This 12-byte field is reserved.
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.
Resource Address (AIBRSA1) #1
When 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.
Resource Address (AIBRSA2) #2
This 4-byte field is reserved for ODBA.
Resource Address (AIBRSA3) #3
This 4-byte token, returned on the APSB call, is required for subsequent DLI calls and the DPSB call related to this thread.
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.
Reserved 3

This 32-byte field is reserved.

Reserved for ODBA
This 136-byte field is reserved for ODBA.

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.

COBOL AIB Mask Example

       01  AIB.
           02 AIBRID             PIC x(8).
           02 AIBRLEN            PIC 9(9) USAGE BINARY.
           02 AIBRSFUNC          PIC x(8).
           02 AIBRSNM1           PIC x(8).
           02 AIBRSNM2           PIC x(8).
           02 AIBRSNM3           PIC x(8).
           02 AIBOALEN           PIC 9(9) USAGE BINARY.
           02 AIBOAUSE           PIC 9(9) USAGE BINARY.
           02 AIBRESV2           PIC x(12).
           02 AIBRETRN           PIC 9(9) USAGE BINARY.
           02 AIBREASN           PIC 9(9) USAGE BINARY.
           02 AIBERRXT           PIC 9(9) USAGE BINARY.
           02 AIBRESA1           USAGE POINTER.
           02 AIBRESA2           USAGE POINTER.
           02 AIBRESA3           USAGE POINTER.
           02 AIBRESV4           PIC x(40).
           02 AIBRSAVE     OCCURS 18 TIMES USAGE POINTER.
           02 AIBRTOKN     OCCURS 6 TIMES  USAGE POINTER.
           02 AIBRTOKC           PIC x(16).
           02 AIBRTOKV           PIC x(16).
           02 AIBRTOKA     OCCURS 2 TIMES PIC 9(9) USAGE BINARY.

Assembler AIB Mask Example

              DFSAIB   DSECT
              AIBID    DS    CL8'DFSAIB'
              AIBLEN   DS    F
              AIBSFUNC DS    CL8
              AIBRSNM1 DS    CL8
              AIBRSVM2 DS    CL8
              AIBRSNM3 DS    CL8
                       DS    2F
              AIBOALEN DS    F
              AIBOAUSE DS    F
                       DS    2F
                       DS    H
                       DS    H
              AIBRETRN DS    F
              AIBREASN DS    F
              AIBRRXT  DS    F
              AIBRSA1  DS    A
              AIBRSA2  DS    A
              AIBRSA3  DS    A
                       DS    10F
              AIBLL    EQU   *-DFSAIB
              AIBSAVE  DS    18F
              AIBTOKN  DS    6F
              AIBTOKC  DS    CL16
              AIBTOKV  DS    XL16
              AIBTOKA  DS    2F
              AIBAERL  EQU   *-DFSAIB