IMS Calls

Database Calls

The general format for an IMS database call is:
 
CALL 'CBLTDLI' USING dli-function, pcb-mask, io-area, ssa, ...
 
COBOL programs or
 
CALL PLITDLI(num-parms,dli-function, pcb-mask, io-area, ssa, ...)
 
for PL/1 programs. The dli-function field can contain any of the following values:

The pcb-mask contains database name (8 characters), segment level number (2 characters), status code (2 characters), processing options (4 characters), 4 characters reserved space (binary), segment name (8 characters), length of key feedback area (4 characters binary), number of sensitive segments (4 characters binary), and a variable length key feedback area.

The io-area is the field into which the database segment will be read or from which it will be written and needs to be big enough to contain the biggest segment that you intend to use with the call.

Segment Search Arguments are used with some database calls to identify the segment or segments to be processed. Segment search arguments can be either unqualified (where a nine character field holds an eight character segment name followed by a blank) to process any segment of the specified type, or qualified to more closely identify the exact segment(s) that are being processed. A qualified ssa contains an eight character segment name followed by optional command codes, an open parenthesis, an eight character field name, a two character comparison (EQ, GE, LE, GT, LT, NE and the special character equivalents), then a variable length field to be compared against which is terminated by a closing parenthesis.

Command codes that can be used with a qualified ssa are:
C use the complete concatenation key to search a segment
D path call
F get the first occurrence of the segment under its parent
L get the last occurrence of the segment under its parent
N specifies that this segment is not to be replaced when segments are replaced after a get hold call
P set parentage at this level
Q enqueue the segment so no one else can change it until you are finished with it
U limit the search for this segment on which position is to be established
V hold position on this segment
- place holder where a command field is provided but not required.

Data Communication Calls

The general format for an IMS data communications call is:
 
CALL 'CBLTDLI' USING dli-function, io-pcb or alternate-pcb, io-area, mod-name, destination name
 
COBOL programs or
 
CALL PLITDLI(num-parms,dli-function, io-pcb or alternate-pcb, io-area, mod-name, destination name)
 
for PL/1 programs. The mod-name and destination-name fields are optional. The dli-function field can contain any of the following values:

The io-pcb contains logical terminal name (8 characters), 2 characters reserved, status code (2 characters), current date (4 characters packed decimal YYYYDDD), current time (4 characters packed decimal HHMMSST), sequence number (4 characters), descriptor name (8 characters binary), and user id (8 characters). The alternate-pcb contains only the first three of these fields.

The io-area contains message length (2 characters binary), 2 characters reserved (the second may contain device dependent codes for output only), translation code (1 to 8 characters input io calls only), and a variable length text field.

The mod-name is an optional field that contains the name of the MOD to which the program sends the output message.

The destination-name is an optional field that contains the name of the logical terminal.

Service Calls

The following system service calls can also be used with IMS programs:

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate