MFFTP Control Variables

You can use the following control variables to configure the MFFTP utility:

MFFTP_ABCODE=nnnn
If MFFTP has to abend, it defaults to a code of U0001. Use this variable to set a value in the range 1-4095.
MFFTP_ABEND=RC8
If MFFTP finds an error in the input stream or encounters an I/O error, the default action is to terminate with a user abend code U0001. Using this control variable instead stops the program immediately with a return code of 8.
MFFTP_CATALOG_CHARSET=xxx
By default, new datasets are cataloged with the servers character set. You can use this variable to override the character set. Acceptable values are:
  • A
  • ASC
  • ASCII
  • E
  • EBC
  • EBCDIC

If the specified character set does not match the server’s character set, you receive a warning message.

MFFTP_CHECK_221={Y | N}

When MFFTP processes a BYE or a QUIT command, the host FTP client should receive a message prefixed with 221. If no such message is received, this indicates a network or a similar failure.

If this variable is set to Y and the 221 message is not received, the return code is set to 4.

MFFTP_DISABLE_EOL={Y | N}
If set to Y, it enables the Variable Block (VB) file to be transferred from the Enterprise Server environment instead of the temporary end-of-line (eol) file.

The default value is N.

MFFTP_EXIT_EQUALS={N |Y}

By default, if MFFTP detects an error, it exits with a non-zero return code or abends with a U0001. See MFFTP_ABCODE for information about how to change the abend code.

If EXIT=nnnn is coded on the EXEC card PARM, setting this to Y causes MFFTP to return with a return code of nnnn.

MFFTP_CLIENT={FTP | USER}

Sets the FTP client to be invoked.

If this is not specified or is set to FTP, the host's default FTP client is used.

If USER is specified, you also need to specify MFFTP_USR_FTP_PGM, and point to a module that invokes an FTP client.

MFFTP_EPSV={N | Y}

Some FTP servers need to be sent the EPSV command after the USER command. The default is to keep the session as active.

Setting this to Y causes the server to enter into a passive FTP session. Use this if the server uses the IPv6 communications protocol. This enables FTP connections where the user is behind routers or firewalls, where connections over an active PORT/EPRT ftp session might not work.

MFFTP_FTP_DEBUG={1 | 2}

Inserts an FTP DEBUG command into the FTP command stream.

  • A value of 1 inserts the command as the first statement.
  • A value of 2 inserts the command after the logon credentials.
MFFTP_IN_LINE_CMD={N|Y}
Create the put/get command on one line rather than splitting across multiple lines. lftp requires the command on one line. The default value is N.
MFFTP_KEEP={N | Y | C}

If set to Y, all work files are kept at the end of the step unless MFFTP_KEEP_IP=N (see below) is also set, in which case the input work file is always deleted.

If set to C, the file is deleted if the return code from the FTP client is 0; otherwise the work files are kept.

MFFTP_KEEP_IP={N | Y}
If set to N, the input work files are deleted at the end of the step, even if MFFTP_KEEP is set to Y.
MFFTP_LCD_SPLIT=number_of_characters
If MFFTP_USE_LCD=Y then you can use this variable as well. This variable specifies the maximum length of each lcd command. For example, if the path to the file is 120 characters and a value of 50 is used you will need to specify at least 3 lcd statements.
Note: You do not need to specify a value. MFTP automatically inserts the required number of lcd commands.
MFFTP_OUTPUT_LRECL=xxx
By default, the record size (LRECL) of the OUTPUT DD statement is 133-bytes. You can use this variable to change the record size to a maximum value of 512-bytes.
MFFTP_PREFIX={N | Y}
When set to Y, causes the server instance name to be used as a prefix to the temporary filenames.
MFFTP_PROCESS_TRAILS_ONGET={TRUE | FALSE}
Determines whether trailing spaces are processed during a GET command. The default is TRUE. Set to FALSE, in conjunction with the LOCSITE value TRAILINGBLANKS=FALSE, to ignore any trailing blank spaces.
Note: When set to FALSE, this option causes MFFTP to honor line breaks in LSEQ input records, and pad the resulting output records with spaces.
MFFTP_QUOTE_SITE={N | Y}[1]
Prepends the QUOTE subcommand to the SITE command. Default is Y.
MFFTP_RETCODE=n1,n2,n3,n4
Determines the return code (condition code) returned to JES. By default, the return codes indicate:
0
No problems encountered.
4
MFFTP received output from the host FTP client that suggested an error, for example an error message in the 5nn or 4nn series. One or more commands might have failed. The “pass” or “fail” defaults can be seen in the supplied code for the MFFTPURR module which you can modify, if necessary.
8
MFFTP did not receive any output from the host FTP client that started with a recognized message number. This usually occurs if the FTP client fails to connect to the FTP server.
16
Some other fatal error.
The above four codes represent n1, n2, n3 and n4 respectively. These may be modified so that, for example, a return code of 8 is always required (MFFTP_RETCODE=0,8,8,8).
Note: All four values must be coded.
MFFTP_SENDEOL={NONE | CR | LF | CRLF}
Specifies the end-of-line characters that are typically found on text files on distributed systems. As an enterprise server instance with Mainframe Subsystem Support (MSS) is emulating a mainframe, using GET scans for the specified characters and removes them, and using a PUT command appends the specified characters to each logical record.
MFFTP_SENDSITE={N | Y}[1]
Enables the issuing of the SITE command before a PUT or an MPUT command. Default is N.
MFFTP_SYSPRINT_LRECL=xxx
By default, the record size (LRECL) of the SYSPRINT DD statement is 133 bytes. You can use this variable to change the record size to a maximum value of 512 bytes.
MFFTP_TEMP_DIR=dir
Specifies an absolute directory path rather than the default data directory where MFFTP creates the temporary files. The directory must already exist and be accessible by the server instance.
Note: On UNIX, ensure that this is entered using the same case as the target directory.
MFFTP_TIME={N | C | L | B}
MFFTP makes a record of the time it starts and ends, and calculates the elapsed time. It also makes a record of the time the FTP client is running. To display these times, set this directive with the following values:
N
Default, indicates no display.
C
Console
L
Listing
B
Both console and listing
MFFTP_TRANSLATE_SAFETY={ON | OFF}
By default, when code page translation is requested (by using the TRAN option on the EXEC card), MFFTP checks that a “round trip” will not corrupt data. It does this by simulating a PUT of a 256 byte area containing x’00’ through x’ff’. It then takes the resulting output and simulates a GET with that data. If the tables are correct, the result from the GET should equal the original data. Use this variable to ignore any warnings if the data does not match.
Note: Use this variable with caution.
MFFTP_UFLAG={N | Y}
Some FTP clients need to have the -u flag set. It stops MFFTP from attempting auto-authentication during the initial connection.
MFFTP_USE_LCD={N|Y}
Can be use to insert the lcd command into the command stream to change the local current directory to the location where the file is being transferred or received to. This avoids long absolute paths and file names on the put/get command.
MFFTP_USE_LFTP_D_FLAG={N|Y}
Use the lftp -d flag to specify debugging output messages. This is required for lftp so that MFFTP can analyse the output messages to determine the appropriate return codes for the actions. The default value is N.
MFFTP_USE_O_REMOTE={N|Y}
Use the -o flag [-o rfile] for get and put commands. For example:
ftp put localfile.dat –o remotefile.dat
ftp get remotefile.dat –o localfile.dat
The default value is N.
MFFTP_USR_FTP_PGM=program-name
This is required if MFFTP_CLIENT is set to USER. Specifies the name of a user-supplied module that invokes the FTP client.
Note: On UNIX, ensure that this is entered using the same case as the module or MFFTP reports that it is unable to call the module.
MFFTP_USE_MV_RENAME={N|Y}
Replace rename with mv. The default value is N.
MFFTP_USE_RM_DEL={N|Y}
Replace del with rm, mdel with mrm. The default value is N.
MFFTP_VERBOSE_OUTPUT={ON | OFF}
Determines what is written to the print file. By default, MFFTP prints a lot of information, including the original input cards and any errors that were encountered with them. When set to OFF, MFFTP only prints the output from the FTP client and server.
MFFTPXIT [1]

Specifies the user exit program invoked from MFFTP for file transmission operations. This user exit reads a *.exit file containing FTP information for operations that transfer or change a file via the MFFTP Utility. See MFFTP User Exit for more information.