Environment variables for MFT on z/OS
If you are running commands direct from the USS environment, or your own JCL scripts, after customization and configuration you must set a number of environment variables before running the configuration and administration scripts provided by Managed File Transfer. You must set these variables for each user and in each environment that the scripts will be invoked from.
To avoid conflicts with other products, we can choose to create a .wmqfterc script in your home directory. The .wmqfterc script is then invoked by each of the Managed File Transfer scripts and we can use this script to provide custom environment settings for Managed File Transfer.
There is also one optional environment variable, BFG_WTO, that we can set to send messages to the operator log when running agents from JCL.
The following is an example .profile that correctly configures the environment variables for Managed File Transfer:
Table 1. Required z/OS environment variables Environment variable Value BFG_JAVA_HOME The location of your Java™ installation. For more information about the levels of Java supported, see IBM MQ system requirements. BFG_DATA The location of the data directory for Managed File Transfer for z/OS®. This is the path to DATA_DIR. STEPLIB Must include the following IBM MQ data sets: If you want to run the database logger component on a z/OS system, STEPLIB must also include the following Db2® data sets in the order shown:
- SCSQAUTH
- SCSQANLE
- SCSQLOAD
- SDSNEXIT
- SDSNLOD2
- SDSNLOAD
LIBPATH Must include the location of your IBM MQJava libraries in z/OS UNIX System Services space (for IBM MQ Version 8.0, the default is /mqm/V8R0M0/java/lib). LIBPATH=/mqm/V8R0M0/java/lib:$LIBPATH STEPLIB=MQM.V800.SCSQAUTH:MQM.V800.SCSQANLE:MQM.V800.SCSQLOAD PATH=/u/fteuser/bin:/u/fteuser/J7.0/bin:/bin:/usr/bin:/u/fteuser/extras/bin:/bin:$PATH BFG_JAVA_HOME=/u/fteuser/J7.0 BFG_DATA=/u/fteuser/DATA_DIR export PATH LIBPATH STEPLIB BFG_JAVA_HOME BFG_DATAOptionally, we can also set the following environment variables:
Table 2. Optional z/OS environment variable Environment variable Value BFG_WTO One of the following values will enable BFG_WTO : One of the following values will disable BFG_WTO. These values are not case sensitive.
- YES
- ON
- TRUE
- NULL
- NO
- OFF
- FALSE
Enables z/OS logging. By default, this environment variable is disabled.
Messages that are written to the agent event log are also written to the z/OS operator log facility, which allows easier access for automation products when you run an agent from JCL. The routing code is Programmer Information (11) and the descriptor code is Informational (12).
BFG_GROUP_NAME The mqm file group is typically associated with Managed File Transfer configuration data files and commands. Consequently, all users who are members of the mqm group can access, and make changes to the Managed File Transfer configuration. For more information, see File system permissions for MFT in IBM MQ.
For a z/OS system, a file group is a USS filesystem entity, and the mqm file group is not necessarily defined. We can define an alternative, existing z/OS USS filesystem group for Managed File Transfer configuration data files by using the BFG_GROUP_NAME environment variable. For example, at the USS shell prompt:export BFG_GROUP_NAME=FTEGBwhich defines group FTEGB to be associated with any subsequently created configuration files for the current USS session.We can set BFG_GROUP_NAME to a blank value, or remove it.
If you run the fteMigrateAgent command on a z/OS system with the BFG_GROUP_NAME environment variable set to a non-blank value, the command checks to see whether the user is a member of the group named by the BFG_GROUP_NAME variable. If the user is not in the named group, the command might report the error message BFGCL0502E: You are not authorized to perform the requested operation. and fail to run. For details on the criteria the user must meet to successfully run that command, see fteMigrateAgent: migrate an FTE V7.0 agent to MQ V7.5 or later.