What is the function of RELEASE command in CICS? And why you need to use this command?
The main function of LOAD and RELEASE commands are to reduce the storage used. The main benefit is dynamically we can LOAD a program to memory and we can issue CALL statement to call that program.
Release a loaded program, table, or mapset.
RELEASE releases the program, table, or mapset previously loaded by a LOAD command. This means that the issuing task can no longer use the resource unless another LOAD is issued.
Note: RELEASE does not remove a program from storage. It reduces the RESCOUNT by 1 and when the count reaches zero, the storage occupied by the program can be released by CICS storage manager.
Get new content delivered directly to your inbox.
This command operates in the current application context. If the command is issued by a program that is running under a task for an application deployed on a platform, CICS searches first for the named program in the private program directory for the application. If the named program is not found there, CICS then searches the public program directory.
If the HOLD option is specified in the LOAD command, the loaded resource is not released at the end of the task. It can only be released by a RELEASE command. This RELEASE command may be issued by the task that loaded the resource or by any other task.
If the HOLD option is not specified in the LOAD command, the loaded resource is released at the end of the task. It may, however, be released before this by the task that loaded the resource issuing a RELEASE command.
PROGRAM(name) – specifies the identifier (1–8 characters) of a program, table, or mapset to be released.