Application programming for COBOL

Application programs in COBOL use the following format, parameters, and DL/I calls to communicate with the IMS™ Transaction Manager.

Format

Read syntax diagramSkip visual syntax diagram
>>-CALL--------------------------------------------------------->

>--+-'CBLTDLI'USING-+------------+-function-+--------------------+-+-->
   |                '-parmcount,-'          +-,i/o_pcb-+-------+-+ |   
   |                                        |          +-| A |-+ | |   
   |                                        |          '-| B |-' | |   
   |                                        '-,alt_pcb-+-------+-' |   
   |                                                   +-| A |-+   |   
   |                                                   '-| C |-'   |   
   +-'AIBTDLI'USING-+------------+-function--,-aib--+-------+------+   
   |                '-parmcount,-'                  +-| A |-+      |   
   |                                                +-| B |-+      |   
   |                                                '-| C |-'      |   
   '-'CEETDLI'USING-+------------+-function-+--------------------+-'   
                    '-parmcount,-'          +-,i/o_pcb-+-------+-+     
                                            |          +-| A |-+ |     
                                            |          '-| B |-' |     
                                            +-,alt_pcb-+-------+-+     
                                            |          +-| A |-+ |     
                                            |          '-| C |-' |     
                                            '-,aib-+-------+-----'     
                                                   +-| A |-+           
                                                   +-| B |-+           
                                                   '-| C |-'           

>--.-----------------------------------------------------------><

A

|--,i/o area-+----------------------------------+---------------|
             +-,mod_name------------------------+   
             +-,token---------------------------+   
             '-,options_list-+----------------+-'   
                             '-,feedback_area-'     

B

                             .-----------------------.   
                             V                       |   
|--,i/o_area_length,i/o_area---+-------------------+-+----------|
                               '-,area_length,area-'     

C

|--,destination_name-+----------------------------------+-------|
                     '-,options_list-+----------------+-'   
                                     '-,feedback_area-'     

Parameters

parmcount
Specifies the identifier of a usage binary (4) byte data item in user-defined storage that contains the number of parameters in the parameter list that follows parmcount.
function
Specifies the identifier of a usage display (4) byte data item, left-justified, in user-defined storage, which contains the call function to be used. The call function must be padded with blanks. For example, (GUbb) is a call function.
i/o pcb
Specifies the address of the I/O program communication block (PCB). The I/O PCB address is the first address passed on entry to the application program in the PCB list, given the following circumstances:
  • A program executing in DLI or database management batch (DBB) regions where CMPAT=YES is coded on the PSB.
  • Any program executing in batch message processing program (BMP), message processing program (MPP), or IMS Fast Path (IFP) regions regardless of the CMPAT= value.
alternate pcb
Specifies the identifier of the I/O PCB or alternate PCB group item from the PCB list that is passed to the application program on entry. This identifier is used for the call.
aib
Specifies the identifier of the group item that defines the application interface block (AIB) in user-defined storage.
i/o area
Specifies the identifier of a group item, table, or usage display data item that defines the I/O area to be used for the call. The I/O area must be large enough to contain the returned data.
i/o area length
Specifies the identifier of a usage binary (4) byte data item in user-defined storage that contains the I/O area length.
area length
Specifies the identifier of a usage binary (4) byte data item in user-defined storage that contains the length of the area immediately following it in the parameter list. Up to seven area length/area pairs can be specified.
area
Specifies the identifier of the group item that defines the area to be checkpointed. Up to seven area length/area pairs can be specified.
token
Specifies the identifier of a usage display (4) byte data item that contains a user token.
options list
Specifies the identifier of the group item that defines the user-defined storage that contains processing options used with the call.
feedback area
Specifies the identifier of the group item that defines the user-defined storage that receives information about options list processing errors.
mod name
Specifies the identifier of a usage display (8) byte data item in user-defined storage that contains the user-defined MOD name used with the call.
destination name
Specifies the identifier of a usage display (8) byte data item that contains the name of the logical terminal or transaction code to which messages resulting from the call are sent.

Example DL/I call formats

DL/I CEETDLI interface:
CALL 'CEETDLI' USING function, aib,i/o area.
DL/I AIBTDLI interface:
CALL 'AIBTDLI' USING function, aib,i/o area.
DL/I language-specific interface:
CALL 'CBLTDLI' USING function, i/o pcb, i/o area.