Target environment exit

The target environment user exit is started when you set or switch the current target environment for a subproject. This user exit can be any script or executable file that exits with a return code.

You can set or switch the current target environment for a subproject by doing any of the following steps:
  • Assign a target environment as the current target environment to a new subproject during subproject creation.
    Note: This task can be done through the New z/OS UNIX Subproject Wizard.
  • Use the Target Environment properties page for the selected subproject to specify a target environment as the current target environment for that subproject.

When you set or switch the current target environment for a subproject, the new target environment name is passed to the external program as a parameter. Messages are displayed in the Remote Console to indicate which external program ran and if it succeeded or failed. A successful return code of 0 allows the target environment to be set as the current target environment for the subproject. If the user-specified external program cannot be located, a message that indicates the reason for the failure is displayed in the Remote Console view and the target environment is not set for the subproject.

When the target environment user exit runs, the exit might contain code that writes data to standard output. This output is displayed in the Remote Console view, regardless of the user exit return code.

You can set the target environment exit in the User Variables, Exits and Listeners preference page.