Releases a loaded program, table, or mapset previously loaded by a LOAD command from the main memory. If the HOLD option is specified in the LOAD command, the loaded resource is not released at the end of the task and can only be released by a RELEASE command. This RELEASE command may be issued by the resource loaded task or by any other task.

Syntax -

RELEASE PROGRAM(program-name)

Parameters -

PROGRAM(program-name) -

Program name is mandatory entry in RELEASE command. Program name specifies the identifier of a program, table or mapset to be released. Program name is of 8 characters length that includes alphanumeric characters.

Error Conditions -

Below are the list of error conditions may occur in combination. If more than one occurs, only the first is passed to the application program.

Error ConditionRESP2, Description & SolutionSystem Action
5 - An invalid attempt is made by the program to release itself.
Solution -A program can’t release itself. Modify program to resolve the error.

6 - The command is issued for a program that is not loaded.
Solution -RELEASE command issued to release loaded programs. Modify program to resolve the error.

7 - Either the command is issued for a program that was loaded without the HOLD option by another task or the program has been enabled as a global user exit.
Solution - A program loaded without hold option can release automatically and the program enabled as a global user exit can’t be released. Modify the program to remove the coding.

17 - The program is defined with RELOAD=YES.
Solution -Release the program by a FREEMAIN rather than a RELEASE command.

30 - The program manager domain is not yet initialized because a load request was made in a first stage PLT.
Solution -Contact the system administrator to resolve the error.
Task abnormally terminated
101 - A resource security check has failed on PROGRAM(program-name).
Solution -Application programmer doesn’t need to do anything. Contact system administrator team to check whether the appropriate access added for the user or group. It will resolve the problem.
Task abnormally terminated
1 - A program, table or mapset has no installed resource definition.
Solution -Contact system administrator to make the definition installed.

2 - A program, table or mapset is disabled.
Solution -Contact system administrator to make the definition enabled.

9 - The installed program definition is for a remote program.
Solution -Remote programs can’t be released with RELEASE command. Modify the program to include the local program name.
Task abnormally terminated