PROGRAM resources

PROGRAM resources control information for a program that is stored in the program library and used to process a transaction, or part of a transaction.

You can create PROGRAM definitions by using CEDA or DFHCSDUP, or by setting the appropriate system initialization parameters and allowing programs to be autoinstalled. See Autoinstalling programs, map sets, and partition sets for information about autoinstall for programs.

PROGRAM resources in CICS bundles

You can use a CICS® bundle to create, edit, and install a PROGRAM resource definition. If you create a PROGRAM resource in this way, you must use the CICS bundle to manage the lifecycle of that resource, and you cannot manage the resource independently. You can inquire on a PROGRAM resource that is dynamically generated by a CICS bundle, by using the EXEC CICS INQUIRE PROGRAM or CEMT INQUIRE PROGRAM command. However, you cannot issue SET or DISCARD commands against a PROGRAM resource that is dynamically generated by a CICS bundle. You must issue the commands against the BUNDLE resource, and CICS applies them to the PROGRAM resource.

For more information about defining resources in CICS bundles, see Defining CICS bundles.

PROGRAM resources as application entry points

The PROGRAM resource can be defined as an application entry point. For more information about how to define the entry point, see Defining application entry points in the CICS Explorer product documentation.

Programs that are declared as an application entry point must have a unique PROGRAM resource name in your environment. To enable these programs to be called from outside the application, they must be public resources. When you make an application available that contains an application entry point for a private PROGRAM resource, the PROGRAM resource that is named as the application entry point changes from a private resource to a public resource. Only one instance of a public resource with a particular name can exist in a CICS region. The PROGRAM resource therefore cannot have the same name as a public program that is installed in the CICS region, or the same name as a public program that is defined as an application entry point by a different installed application. However, multiple versions of the same PROGRAM resource defined as an application entry point can be installed for multiple versions of the same application, because CICS manages the promotion of PROGRAM resources to public status for the versions of an application.

Private PROGRAM resources for applications

For supported resource types, a CICS resource is private if the resource is defined in a CICS bundle that is packaged and installed as part of an application, either as part of the application bundle, or as part of the application binding. When you create a CICS resource in this way, the resource is not available to any other application or version installed on the platform, and it is not available to other applications in the CICS region. It can be used only by the version of the application where the resource is defined. These resources are known as private resources.

The PROGRAM resource is supported as a private resource for an application version. A program that is auto-installed by a task for an application that is deployed on a platform is also private to that version of the application.

Only one copy of each version of each program is loaded in CICS storage. Before loading a private program, CICS checks whether that version of the program has already been loaded from the same data set (PDS or PDSE) with a matching PROGRAM resource definition. If so, CICS uses the existing copy. The following rules therefore apply when you are reusing PROGRAM resource names:
  • Multiple applications that are intended to share the same program loaded from the same PDS or PDSE must use the same attributes in the PROGRAM resource definition.
  • If multiple applications use the same name for different program resources, each application must load the programs from a different data set (PDS or PDSE).
If you specify RELOAD=YES in the PROGRAM resource definition for a private program, its behavior for program loading changes to be the same as for a public program. A program control link, load, or XCTL request brings a fresh copy of the program into storage. RELOAD(YES) programs cannot be reused, and they cannot be shared by multiple applications. Each of the program copies must be removed from storage explicitly, using a storage control FREEMAIN request, when it is no longer required and before the task terminates.

For more information about private resources, see Characteristics of bundled resources.