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:
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_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_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_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_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_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_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_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.