COBOL application programming
Application programs in COBOL use the following format, parameters, and DL/I calls to communicate with IMS databases.
Format
Note: All apostrophes (') can be replaced by quotation marks (") and can be done regardless of the
APOST/QUOTE compiler (or CICS® translator)
option.
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. If you define this field as COMP-5 rather than COMP, COMP-4, or BINARY, then it can contain the maximum possible values regardless of the COBOL TRUNC compiler option setting.
- function
- Specifies the identifier of a usage display (4) byte data item, left justified in user-defined storage that contains the call function to be used. The call function must be left-justified and padded with blanks (such as GUbb).
- db pcb
- Specifies the identifier of the database PCB group item from the PCB list that is passed to the application program on entry. This identifier will be used for the call.
- tp 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 will be 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 major group item, table, or usage display data item that defines the I/O area length in user-defined storage used for the call. The I/O area must be large enough to contain all of 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 (specified in binary). If you define this field as COMP-5 rather than COMP, COMP-4, or BINARY, then it can contain the maximum possible values regardless of the COBOL TRUNC compiler option setting.
- area length
- Specifies the identifier of a usage binary (4) byte data item in user-defined storage that contains the length (specified in binary) of the area immediately following it in the parameter list. Up to seven area lengths or area pairs can be specified. If you define this field as COMP-5 rather than COMP, COMP-4, or BINARY, then it can contain the maximum possible values regardless of the COBOL TRUNC compiler option setting.
- area
- Specifies the identifier of the group item that defines the user-defined storage to be checkpointed. Up to seven area lengths or area pairs can be specified.
- token
- Specifies the identifier of a usage display (4) byte data item in user-defined storage that contains a user token.
- stat function
- Specifies the identifier of a usage display (9) byte data item in user-defined storage that contains the stat function to be performed.
- ssa
- Specifies the identifier of a usage display data item in user-defined storage that contains the SSAs to be used for the call. Up to 15 SSAs can be specified, one of which is rootssa.
- rootssa
- Specifies the identifier of a usage display data item that defines the root segment search argument in user-defined storage.
- rsa
- Specifies the identifier of a usage display data item that contains the record search argument.
- psb name
- Specifies the identifier of a usage display (8) byte data item containing the PSB name to be used for the call.
- uibptr
- Specifies the identifier of the group item that defines the user interface block (UIB) that is used in user-defined storage.
- sysserve
- Specifies the identifier of a usage display (8) byte data item in user-defined storage to be used for the call.
Example of a DL/I call format
Using the DL/I CEETDLI interface:
CALL 'CEETDLI' USING function,db pcb,i/o area,ssa1.
Using the DL/I AIBTDLI interface:
CALL 'AIBTDLI' USING function,aib,i/o area,ssa1.
Using the DL/I language-specific interface:
CALL 'CBLTDLI' USING function,db pcb,i/o area,ssa1.