IMS DB Delete CallIMSDB Replace(REPL) IMSDB Release(RLSE)
The Delete (DLET) call is used to remove a segment and its dependents from the database.
Segments on an IMS database can be removed by using the delete call DLET.
Before deleting any segment, the target segment must read first and held for update (GHU, GHN,GHNP).
DELT not allowed to delete key on a delete call.
IMS deletes the segment which has been held.
When a parent segment is deleted, all dependent segments are always deleted automatically.
This can be happen even if the application program is not sensitive to the dependent segments in the PCB of the PSB.
The Delete (DLET) call is used to remove/deletes a segment and its dependents from the database
CALL ‘CBLTDLI’ USING DLET db pcb/aib i/o area ssa
Lets discuss about individual parameters.
- Database Program Control Block
- Specifies the DB PCB for the DLET call.
- DB PCB will act as an input and output parameter.
- Known as Application Interface Block.
- Specifies the AIB for the call.
- AIB parameter is an input and output parameter.
- If AIB using in the DLET call, all the below fields must be initialized in the AIB - AIBID, AIBLEN, AIBRSNM1, AIBOALEN.
- Known as Input-Output Area.
- Specifies the I/O area in DLET Call.
- I/O Area parameter is an output parameter.
- If Replace calls completed successfully, IMS returns the requested segment in I/O area.
- If any path calls issued from the application program, the I/O area must be long enough to hold the longest path of concatenated segments.
- I/O area always contains left-justified segment data.
- The I/O area points to the first byte of this area.
- Known as Segment Search Arguments.
- Specifies to be used in the call.
- SSA parameter is an input parameter.
- The SSA supplies in the call to data areas in the application program where the SSA has been defined for the call.
- Up to 15 SSAs can be used in the parameter.
- SSA parameter is optional for the DLET call.
The DLET call must be preceded by one of the three Get Hold calls.
When you issue the DLET call, IMS deletes the held segment, along with all its physical dependents from the database, regardless of whether application program is sensitive to all of these segments.
IMS rejects the DLET call if the preceding call for the PCB was not a Get Hold, REPL, or DLET call.
If the DLET call is successful, the previously retrieved segment and all of its dependents are removed from the database and cannot be retrieved again.
If Get Hold call that precedes the DLET call is a path call and do not want to delete all the retrieved segments, application program must indicate to IMS which of the retrieved segments want deleted; to do this, specify an unqualified SSA for that segment.
Deleting a segment this way automatically deletes all dependents of the segment.
Only one SSA is allowed in the DLET call, and this is the only time a SSA is applicable in a DLET call.
No command codes apply to the DLET call.
If you use a command code in a DLET call, IMS disregards the command code.
IMSDB Replace(REPL) IMSDB Release(RLSE)