Pascal application programming

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

Format

Read syntax diagramSkip visual syntax diagram
>>-+-PASTDLI--(--| A |--+-------------------------+-+--);------><
   |                    +-,VAR--db pcb--| B |-----+ |       
   |                    +-,VAR--tp pcb--+-------+-+ |       
   |                    |               +-| B |-+ | |       
   |                    |               '-| C |-' | |       
   |                    '-| D |-------------------' |       
   '-AIBTDLI--(--| A |--,--VAR--aib,--+-------+-----'       
                                      +-| B |-+             
                                      '-| C |-'             

A

|--+---------------------+--CONST--function---------------------|
   '-CONST--parmcount--,-'                    

B

|--,VAR i/o area--+----------------------+----------------------|
                  | .-,--------.         |   
                  | V          |         |   
                  +---,VAR ssa-+---------+   
                  +-,CONST token---------+   
                  +-,CONST stat function-+   
                  +-,VAR rsa-------------+   
                  '-,VAR rootssa---------'   

C

|--,VAR i/o area length,--VAR i/o area--+-------------------------------+--|
                                        | .-,-------------------------. |   
                                        | V                           | |   
                                        '---,VAR area length,VAR area-+-'   

D

|--,VAR psb name,--VAR uibptr--+---------------+----------------|
                               '-,VAR sysserve-'   

Parameters

parmcount
Specifies the name of a fixed binary (31) variable in user-defined storage that contains the number of parameters in the parameter list that follows parmcount.
function
Specifies the name of a character (4) variable, 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 name of a pointer variable that contains the address of the database PCB defined in the call procedure statement.
tp pcb
Specifies the name of a pointer variable that contains the address of the I/O PCB or alternate PCB defined in the call procedure statement.
aib
Specifies the name of the pointer variable that contains the address of the structure that defines the application interface block (AIB) in user-defined storage.
i/o area
Specifies the name of a pointer variable to a major structure, array, or character string that defines the I/O area 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 name of a fixed binary (31) variable in user-defined storage that contains the I/O area length.
area length
Specifies the name of a fixed binary (31) variable in user-defined storage that contains the length of the area immediately following it in the parameter list. Up to seven area lengths or area pairs can be specified.
area
Specifies the name of the pointer variable that contains the address of the structure that defines the user-defined storage to be checkpointed. Up to seven area lengths or area pairs can be specified.
token
Specifies the name of a character (4) variable in user-defined storage that contains a user token.
stat function
Specifies the name of a character (9) variable in user-defined storage that contains the stat function to be performed.
ssa
Specifies the name of a character variable 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 name of a character variable that defines the root segment search argument in user-defined storage.
rsa
Specifies the name of a character variable that contains the record search argument.
psb name
Specifies the name of a character (8) variable containing the PSB name to be used for the call.
uibptr
Specifies the name of a pointer variable that contains the address of the structure that defines the user interface block (UIB) that is used in user-defined storage.
sysserve
Specifies the name of a character (8) variable string in user-defined storage to be used for the call.

Example of a DL/I call format

Using the DL/I AIBTDLI interface:
AIBTDLI(CONST function,
  VAR aib,
  VAR i/o area,
  VAR ssa1);
Using the DL/I language-specific interface:
PASTDLI(CONST function,
  VAR db pcb,
  VAR i/o area,
  VAR ssa1);