Using the SET PROGRAM OPERATION command to experiment with application context

To enable a task to be measured as part of an application, you can set the OPERATION field from the application context on the PROGRAM resource. The SET PROGRAM OPERATION command is not cataloged and is not reinstated on a warm restart of CICS®. The command is supported so that you can experiment with application context, but it is not intended for production use.

The SET PROGRAM OPERATION command declares the PROGRAM resource to be an application entry point. At run time, the application context is copied from the PROGRAM resource into the association data of the task, when the task runs the PROGRAM. This process enables the task to be measured as a part of the application.

  • You can use the EXEC CICS SET PROGRAM OPERATION command if the PROGRAM resource is not already set as an entry point, or if the program was previously set as an entry point by an EXEC CICS SET PROGRAM SPI command.
  • As with all other SET PROGRAM command parameters, you cannot use the OPERATION option if the PROGRAM resource was created from the installation of a BUNDLE resource.
  • You cannot use the OPERATION option if the PROGRAM resource is set as an entry point by using a BUNDLE modify verb.
  • You cannot use the OPERATION option on a PROGRAM resource that has a name beginning "DFH". DFH programs cannot be discarded, therefore you could not prevent the PROGRAM resource from being identified by CICS as an entry point, without recycling CICS.
  • You cannot use the OPERATION option for a PROGRAM resource that is a remote resource, a map set, or a partition set.
  • Programs that are defined as an application entry point must have a unique PROGRAM resource name in your environment. You cannot name a PROGRAM resource as an application entry point if it has the same name as any public program that is installed in the CICS region, or the same name as a program that is defined as an application entry point by an installed application.

Conditions when an application context is set onto a task

When a PROGRAM resource is defined as an application entry point, the application context is set onto a task when any of the following conditions occur:
  • A CICS transaction that specifies the name of the PROGRAM resource runs (the context is set before the nominated resource runs).
  • A program issues an EXEC CICS LINK command to the PROGRAM resource.
  • A program issues an EXEC CICS XCTL command to the PROGRAM resource.
  • A Java™ program issues a Program.link() command to the PROGRAM resource.
  • A Java program issues a Program.xctl() command to the PROGRAM resource.

Restrictions

  • The application context is set on a task for a program defined as an application entry point, only if that program runs locally. If the program runs remotely, the request is passed to the remote CICS region, and it is on the remote CICS region that the context is set, if the resource is also flagged as an application entry point on that CICS region.
  • Context is not set on a task, for a COBOL program that makes a dynamic call to another program (that is, if the EXEC CICS LINK call is bypassed).