Use Managed File Transfer for z/OS

Use this topic to help we use Managed File Transfer on your IBM MQ for z/OS® system.


Overview

Managed File Transfer for z/OS (MFT) uses the standard z/OS installation procedure. The easiest way of running MFT commands is to use JCL and the JZOS Java Launcher.

See JZOS Batch Launcher and Toolkit for further details.

If your JCL fails to process correctly, see Common MFT problems with JZOS.


Example JCL for IBM MQ Version 8.0 and later

Attention: For WebSphere MQ File Transfer Edition Version 7.0, the parameters begin with FTE_ instead of BFG_.
//JOHNDOEA JOB 1,MSGCLASS=H                
// JCLLIB ORDER=(SCEN.MFT.JCL)   (1) 
// INCLUDE MEMBER=BFGJCL8       (2)  
//     DD * (2A) 
. ${BFG_PROD}/bin/fteBatch createAgent  (3) 
export IBM_JAVA_OPTIONS="${BFG_JAVA_OPTIONS} ${BFG_LANG}"  (4) 
export JZOS_MAIN_ARGS="${BFG_MAIN_ARGS}" (4)
//MAINARGS DD *  
-agentName MYAGENT  (5) 
-f 
-agentQMgr MQPD 
-p MQPD 
/* 
where:

  • (1) is the location of included JCL statements
  • (2) Include the specified JCL member from the location in 1)
  • (2A) This extends the //STDENV - see below
  • (3) This is the command to be executed, without the leading fte prefix
  • (4) These lines are required, they set up information for JZOS
  • (5) The parameters to the command
  • The BFGJCL8 member (we can select your own name) invokes JZOS. This member has the STEPLIB and other JCL needed to run MFT.


Other JCL you need to include

You should include JCL for the IBM MQ for z/OS libraries, and if you are using the Db2® logger, the Db2 libraries.

For example:
//WMQFTE EXEC PGM=JVMLDM86,REGION=0M PARM='+T'  (1) 
//STEPLIB  DD DSN=SYS1.SIEALNKE,DISP=SHR        (2) 
//* MQ libraries 
//   DD DSN=MQM.V800.SCSQAUTH,DISP=SHR MQ Bindings  
//   DD DSN=MQM.V800.SCSQANLE,DISP=SHR MQ Bindings 
//   DD DSN=MQM.V800.SCSQLOAD,DISP=SHR MQ Bindings

//* DB2 libraries 
//   DD DISP=SHR,DSN=SYS2.DB2.V10.SDSNEXIT.DBCP 
//   DD DISP=SHR,DSN=SYS2.DB2.V10.SDSNLOAD 
//   DD DISP=SHR,DSN=SYS2.DB2.V10.SDSNLOD2 
//SYSOUT  DD SYSOUT=H 
//SYSPRINT DD SYSOUT=H 
//STDOUT  DD SYSOUT=H 
//STDERR  DD SYSOUT=H 

//STDENV  DD DSN=SCEN.MFT.JCL(BFGZENV8),DISP=SHR  (3) 
where:

  • (1) is the name of the JZOS program. Look in SYS1.SIEALNKE for the version on your system. Add ,PARM='+T' to give additional diagnostics.
  • (2) This is the data set with the JZOS program.
  • (3) This is the member name of a shell script. It defines parameters needed by MFT. See Shell script to define MFT.

    It can be any data set and member. It needs to be last in the file because the JCL job extends this. See 2A in Example JCL for IBM MQ Version 8.0 and later.


Shell script to define MFT

In the Other JCL you need to include example, the member BFGZENV8 is used. This is based on the JZOS profile.

We can use the same configuration file for MFT V8 and WebSphere MQ File Transfer Edition Version 7.0, with some minor changes. Remember that prior to MFT V8 the parameters begin with FTE. See Example file.

You need to know:

  • The location where Java is installed
  • The location of the IBM MQ for z/OS Java libraries
  • The location of the MFT files
  • A user ID needs to be in a specific group to be considered as an IBM MQ for z/OS administrator. You need the name of this group
  • If you are not using English for the messages, you need to know which language to specify.


Example file

# This is a shell script that configures 
# any environment variables for the Java JVM. 
# Variables must be exported to be seen by the launcher. 
# Use PARM='+T' and set -x to debug environment script problems 
set -x 
# . /etc/profile 
# 
# Java configuration (including MQ Java interface) 
# 
export _BPXK_AUTOCVT="ON" 
export JAVA_HOME="/java/java71_bit64_sr3_fp30/J7.1_64/" 
export PATH="/bin:${JAVA_HOME}/bin/classic/" 
LIBPATH="/lib:/usr/lib:${JAVA_HOME}/bin" 
LIBPATH="$LIBPATH:${JAVA_HOME}/bin/classic" 
LIBPATH=$LIBPATH:"/mqm/V8R0M0/java/lib/" 
export LIBPATH 

export BFG_JAVA_HOME="${JAVA_HOME}" 
export BFG_WTO="YES" 
export BFG_GROUP_NAME=MQADM
export BFG_PROD="/HMF8800/" 
export BFG_CONFIG="/u/johndoe/fteconfig" 
# export BFG_LANG=" -Duser.language=de " 
export BFG_LANG=" " 

____________________
where:

    export _BPXK_AUTOCVT="ON"
    Is required for Unicode conversion

    export JAVA_HOME="/java/java71_bit64/J7.1_64/"
    Is the location of the Java directory. Specify the name of the path for Java. This directory contains bin and other directories.

    export PATH="/bin:${JAVA_HOME}/bin/classic/"
    Sets up the path statement for Java executable statements

    LIBPATH="/lib:/usr/lib:${JAVA_HOME}/bin"
    Sets up the library path for the Java executable statements

    LIBPATH="$LIBPATH:${JAVA_HOME}/bin/classic"
    Adds more Java libraries to the LIBPATH statement.

    LIBPATH=$LIBPATH:"/mqm/V8R0M0/java/lib/"
    Adds IBM MQ for z/OS libraries in the library path. Specify the name of your IBM MQ for z/OS libraries in USS.

    export LIBPATH
    Makes the LIBPATH available to JZOS

    export BFG_JAVA_HOME="${JAVA_HOME}"
    Sets the BFG_JAVA_HOME to the value of JAVA_HOME specified above

    export BFG_WTO="YES"
    Set BFG_WTO to YES causes messages to be displayed on the joblog using WTO

    export BFG_GROUP_NAME=MQADM
    User IDs, which are a member of the specified group, are considered IBM MQ for z/OS administrators

    export BFG_PROD="/HMF8800/"
    Is the path where the MFT code is located

    export BFG_DATA="/u/johndoe/fteconfig"
    Is where the MFT configuration information is stored

    # export BFG_LANG=" -Duser.language=de "
    Is a commented out statement to define the language as German

    export BFG_LANG=" "
    Specifies the language as the default, English.

    The contents of the MFT product in /lib/messages/BFGNVMessages_*.properties lists the languages available. The default is to leave the value blank, which means that English is used.

For V7 specify:

export FTE_JAVA_HOME="${JAVA_HOME}" 
export FTE_WTO="YES" 
export FTE_GROUP_NAME=SCENU 
export FTE_PROD=""/HMF7100/"
export FTE_CONFIG="/u/johndoe/fteconfig" 
export BFG_LANG=" " 

Note that the /u/johndoe/fteconfig is different from the one in BFG_DATA