Following function codes are used for database updations.
ISRT - Inserting a segment
The ISRT call is used to add a segment occurrence to a database. It can be used either for loading a new database or for inserting a segment into an existing database.
DLET - Deleting a segment
The DLET call is used to delete a segment occurrence from the database. This has to be preceded by a successful Get-Hold call.
REPL - Replacing a segment
The REPL call is used to update the segment occurrence of the database. This has to be preceded by a successful Get-Hold call.
There are four general rules, needs to be followed before deleting or replacing any segment occurrence. They are.
The DLET or REPL call needs to be preceded by Get-Hold call, which brings the segment occurrence into the I/O area and also causes IMS to save information about the segment.
No other calls are allowed that reference the same PCB, in between the Get-Hold call and Delete or modify call.
No SSAs to be included, when issuing a call with the DLET or REPL function code. The only exception to this rule is a delete or replace call following a get-hold call that specifies one or more SSAs using the D command code. The D command code causes more than one segment to be brought into the I/O area with a single call.
The program is not allowed to modify the key field of the segment image in the I/O area.
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on IBMMainframer Community!