The SET_PROGRAM call

Use SET_PROGRAM to set selected attributes in the definition of a specified program.

SET_PROGRAM

DFHPGISX [CALL,]
      [CLEAR,]
      [IN,
      FUNCTION(SET_PROGRAM),
      {PROGRAM_NAME(name8 | string | 'string')|
      PROGRAM_TOKEN(name4)},]
      [AVAIL_STATUS(DISABLED|ENABLED),]
      [CEDF_STATUS(CEDF|NOCEDF),]
      [EXECUTION_KEY(CICS|USER),]
      [EXECUTION_SET(DPLSUBSET|FULLAPI),]
      [PROGRAM_ATTRIBUTE(RELOAD|RESIDENT|REUSABLE|TRANSIENT),]
      [PROGRAM_TYPE(PRIVATE|SHARED|TYPE_ANY),]
      [PROGRAM_USAGE(APPLICATION|NUCLEUS),]
      [REQUIRED_AMODE(24|31|AMODE_ANY|64),]
      [REQUIRED_RMODE(24|RMODE_ANY),]]
      [OUT,
      RESPONSE(name1 | *),
      REASON(name1 | *)]

This command is threadsafe.

AVAIL_STATUS(DISABLED|ENABLED)
Specifies whether the program can be used (ENABLED) or not (DISABLED).
CEDF_STATUS(CEDF|NOCEDF)
Specifies whether, when the program is running under the control of the CICS® execution diagnostic facility (EDF), EDF diagnostic screens are displayed.
EXECUTION_KEY(CICS|USER)
Specifies the key in which CICS is to give control to the program. The key determines whether the program can modify CICS-key storage.
CICS
CICS gives control to the program in CICS key. The program is loaded into a CICS dynamic storage area (DSA) above or below the 16 MB line; that is, the CDSA or ECDSA, depending on its residency mode (RMODE) attribute, as defined to the linkage-editor.
USER
CICS gives control to the program in user key. The program is loaded into a user DSA above or below the 16 MB line; that is, the UDSA or EUDSA, depending on its residency mode (RMODE) attribute, as defined to the linkage-editor.
Note: If the program has been link-edited as reentrant with AMODE(31),RMODE(ANY), the EXECUTION_KEY option is ignored, and it is loaded into the extended read-only DSA (ERDSA). For details of the type of storage allocated for the ERDSA, see RENTPGM system initialization parameter.
EXECUTION_SET(DPLSUBSET|FULLAPI)
Specifies whether CICS is to link to and run the program as if it were running in a remote CICS region.
Note: EXECUTION_SET applies only to local program definitions. Its purpose is to test programs in a local CICS environment as if they were running as DPL programs.
DPLSUBSET
CICS links to and runs the program with the API restrictions of a remote DPL program. The program can use only a subset of the CICS API.
FULLAPI
CICS links to and runs the program without the API restrictions of a remote DPL program. The program can use the full CICS API.
PROGRAM_ATTRIBUTE(RELOAD|RESIDENT|REUSABLE|TRANSIENT)
Specifies the residency status of the program; that is, when its storage is to be released.
RELOAD
The program is not reusable, and therefore several copies might be loaded. A copy is removed from storage when a RELEASE_PROGRAM call (for that copy) is issued.
RESIDENT
At any one time there will be no more than a single copy of the program in storage, and this will not be removed unless deleted. RESIDENT programs must be at least quasi-reentrant. Any program of PROGRAM_TYPE SHARED is RESIDENT by default.
REUSABLE
Similar to RESIDENT, except that CICS can remove a REUSABLE program that is not in use from storage, for storage optimization reasons.
TRANSIENT
Similar to RESIDENT, except that a TRANSIENT program is removed from storage as soon as its user count drops to zero.
PROGRAM_NAME(name8 | string | 'string')
Specifies the name of the program whose attributes are to be changed.
name8
The name of a location that contains an 8-byte program name.
string
A string of characters that name the program.
'string'
A string of characters in quotation marks. The string length is set to 8 by padding with blanks or truncating.
PROGRAM_TOKEN(name4)
Specifies a token that identifies the program.
name4
The name of a location that contains a 4-byte token that was obtained from a previous INQUIRE_PROGRAM, INQUIRE_CURRENT_PROGRAM, START_BROWSE_PROGRAM, or GET_NEXT_PROGRAM call.
PROGRAM_TYPE(PRIVATE|SHARED|TYPE_ANY)
Specifies where the program is to be loaded from.
PRIVATE
The program is in the DFHRPL or dynamic LIBRARY concatenation. A PRIVATE program need not be reentrant, and is given only limited protection against unauthorized overwriting. The degree of protection depends on the type of dynamic storage area into which the program is loaded (see the description of the PROGRAM_TYPE option of the DEFINE_PROGRAM call).
SHARED
The program is located in the link pack area (LPA), is reentrant, and is protected.
TYPE_ANY
Either the copy in the DFHRPL or a dynamic LIBRARY concatenation, or the LPA copy of the program can be used, though preference is given to the LPA copy.
PROGRAM_USAGE(APPLICATION|NUCLEUS)
Specifies whether the program is used as a CICS nucleus program, or as a user application program.
REQUIRED_AMODE(24|31|AMODE_ANY|64)
Specifies the addressing mode of the program. If, during subsequent processing, no copy of the program that meets the defined addressing requirement can be found, an exception occurs.
Note:
  1. AMODE_ANY and 31 have identical meanings for this function.
  2. You cannot use this option to override the link-edited addressing mode of the program.
REQUIRED_RMODE(24|AMODE_ANY)
Specifies the residency mode of the program (that is, whether it is to be loaded above or below the 16MB line). If, during subsequent processing, no copy of the program that meets the defined residency requirement can be found, an exception occurs.
Note: You cannot use this option to override the link-edited residency mode of the program.

RESPONSE and REASON values for SET_PROGRAM

RESPONSE REASON
OK None
EXCEPTION CEDF_STATUS_NOT_FOR_MAPSET
  CEDF_STATUS_NOT_FOR_PTNSET
  CEDF_STATUS_NOT_FOR_REMOTE
  EXEC_KEY_NOT_FOR_MAPSET
  EXEC_KEY_NOT_FOR_PTNSET
  EXEC_KEY_NOT_FOR_REMOTE
  EXEC_SET_NOT_FOR_MAPSET
  EXEC_SET_NOT_FOR_PTNSET
  EXEC_SET_NOT_FOR_REMOTE
  INCOMPATIBLE_BUNDLE_SET
  PROGRAM_NOT_DEFINED_TO_LD
  PROGRAM_NOT_DEFINED_TO_PG
DISASTER ABEND
  CATALOG_ERROR
  CATALOG_NOT_OPERATIONAL
  LOCK_ERROR
INVALID INVALID_MODE_COMBINATION
  INVALID_PROGRAM_NAME
  INVALID_PROGRAM_TOKEN
  INVALID_TYPE_ATTRIB_COMBIN
KERNERROR None
PURGED None