Application Calls
get unique (GU)
The GU (get unique) call retrieves a specific segment or path of segments from a database. At the same time, the GU call establishes a position in a database from which additional segments can be processed in a forward direction.
get next (GN)
The GN (get next) call retrieves the next segment or path of segments from the database. The get next call normally moves forward in the hierarchy of a database from the current position but can be modified to start at an earlier position than the current position in the database through a command code. However, its normal function is to move forward from a given segment to the next required segment in a database.
get hold unique (GHU) and get hold next (GHN)
GHU (get hold unique) and GHN (get hold next) calls indicate the intent of the user to issue a subsequent delete or replace call. A GHU or GHN call must be issued to retrieve the segment before issuing a delete or replace call.
insert (ISRT)
The ISRT (insert) call inserts a segment or a path of segments into a database. It is used to initially load segments in databases and to add segments in existing databases.
To control where occurrences of a segment type are inserted into a database, the user normally defines a unique sequence field in each segment. When a unique sequence field is defined in a root segment type, the sequence field of each occurrence of the root segment type must contain a unique value (except for HDAM and PHDAM). When defined for a dependent segment type, the sequence field of each occurrence under a given physical parent usually contains a unique value. If no sequence field is defined, a new occurrence is inserted after the last existing one.
delete (DLET)
The DLET (delete) call deletes a segment from a database. When a segment is deleted from a DL/I database, its dependents, if any, are also deleted.
replace (REPL)
The REPL (replace) call replaces the data in the data portion of a segment or path of segments in a database. Sequence fields cannot be changed with a replace call.
System service calls:
In addition to the calls described previously, which are used to manipulate the data, there are a number of system service calls provided to allow the application to make use of other facilities provided by IMS.
APSB
Allocate PSB; allocates a PSB for an ODBA application program
CHKP (Basic)
Basic checkpoint; prepares for recovery
CHKP (Symbolic)
Symbolic checkpoint; prepares for recovery
GMSG
Get message; retrieves a message from the AO exit routine
ICMD
Issue command; issues an IMS command and retrieves the first command response segment
INIT
Initialize; application receives data availability and deadlock occurrence status codes
INQY
Inquiry; returns information and status codes about I/O or alternate PCB destination type, location, and session status
LOG
Log; writes a message to the system log
PCB
Specifies and schedules another PCB
RCMD
Retrieve command; retrieves the second and subsequent command response segments resulting from an ICMD call
ROLB
Roll back; eliminates database updates
ROLL
Roll; eliminates database updates; abend
ROLS
Roll back to SETS; backs out database changes to SETS points
SETS
Set synchronization point; establishes as many as nine intermediate sync (backout) points
SETU
SET unconditional
SYNC
Synchronization; releases locked resources
TERM
Terminate; releases a PSB so another can be scheduled; commits database changes
XRST
Extended restart; works with symbolic checkpoint to restart application program