When a load module is deleted because of the $DEL LOADMOD command,
the $T LOADMOD,REFRESH command, or a second LOADMOD initialization
statement for the same module, JES2 searches the load module for a
$ENTRY macro with the name $$$$DEL. If the module is found, JES2 calls
it as the first step in the delete processing for the module.
If the load module is deleted by the $T LOADMOD,REFRESH command,
JES2 processes the following steps:
- Load new copy of module into storage and verify it is valid.
- Call the $$$$DEL routine for the old module.
- Replace any exit routine addresses that point into the old module
with corresponding addresses in the new load module. If no corresponding
routine is found in the new module, the routine address is nullified
(the routine is not called).
- Replace dynamic tables that point into the old module with corresponding
tables in the new module.
- Delete any dynamic tables that still point to the old module.
- Connect any dynamic tables in the new module that have not been
connected yet.
- Call the $$$$LOAD routine for the new module.
- Attempt to delete the old module from storage.
Note: The $T LOADMOD,REFRESH command can be issued
for an LPA module that is not altered. The new and the old modules
are at the same address with two LMTs representing the two modules
correspondingly. In this case, the $$$$LOAD and $$$$DEL routines are
called.
Environment: $$$$DEL is called in the JES2
main task limited environment (JES2 initialization) and the JES2 main
task environment.
Recovery: $ESTAE recovery is in effect. However,
the $$$$DEL routine should not depend on JES2
for recovery. You should provide your own recovery within your $$$$DEL
routine.
Point of processing: As the first step in
the processes of deleting a module, before any tables have been unplugged
or routine addresses cleared.
Register contents when $$$$DEL gets control:
- R0
- Not applicable
- R1
- Address of a parameter list mapped by $CSVPARM
- R2-R10
- Not applicable
- R11
- Address of the HCT
- R12
- Not applicable
- R13
- Address of current PCE (may be initialization PCE)
- R14
- Return address
- R15
- Entry address
$CSVPARM (pointed to by register 1 on entry) contains the
following bits:
- CSVPID
- Eye catcher ('CSVP')
- CSVPSIZE
- Size of parameter list
- CSVPVER
- Current version of base section (1)
- CSVPTYPE
- Routine identifier
- CSVPDEL
- Indicates $$$$DEL routine
- CSVPLMT
- Address of LMT being deleted
- CSVPMIT
- Address of module/MIT being deleted
- CSVPLCND
- Reason for delete:
- CSVPDCJS
- JES2 performing delete
- CSVPDCIN
- LOADMOD init statement
- CSVPDCDL
- $DEL LOADMOD command
- CSVPDCRL
- $T LOADMOD,REFRESH command
- CSVPDCTR
- $PJES2 processing
- CSVPDCSC
- Secondary call
- CSVPDIND
- Call flags:
- CSVPDSND
- Second call after a RC 4/8
- CSVPDFRC
- Module being force deleted
- CSVPDFRE
- Storage for module has been freed
- CSVPDNEW
- Address of LMT for new module that was loaded (for the $T LOAD,REFRESH
command)
Register contents when $$$$DEL passes control
back to JES2:
- R0-R1
- Not applicable (ignored)
- R2-R13
- Not applicable (unchanged)
- R14
- Not applicable (ignored)
- R15
- Return code (ignored if this is a force delete)
Return code processing: Return codes from
the $$$$DEL routine are ignored if the module is being force deleted
(CSVPDFRC bit on). Otherwise the following processing occurs based
on the return code:
- CSVPDROK (0)
- Continue deletion normally. This routine will not be called
again.
- CSVPDRNN (4)
- Do not delete the module now. JES2 will delete dynamic tables
and exit routines without freeing the storage. $$$$DEL will be called
again if all users of the module are gone (with CSVPDSND set). If
the second call give a return code 4, $$$$DEL will be called again
at about a five minute interval. However, if needed, JES2 can make
a force delete call prior to the timer expiring.
- CSVPDRND (8)
- Process the same as RC=4 except that JES2 will not call the
$$$$DEL routine again except for the following two cases:
- A force delete of the module is required because of a JES2 termination
or an LPA deletion.
- A JES2 hot start and the load module is in CSA or LPA. In this
case, any processing for this module on a hot start is allowed though
this is a call to the $$$$DEL routine. Normal return code processing
occurs.