Previous Topic Next topic Print topic


Running the MFFTP Utility

The following is a sample JCL job that creates the FTP.DATA control dataset and populates it with some variables.

The file format is based on the IBM FTP.DATA format .

//SETUP01 JOB 'FTP.DATA',MSGCLASS=X,CLASS=A,MSGLEVEL=(1,1)
//*--------------------------------------------------------
//DEL     EXEC PGM=IEFBR14
//DEL1    DD DSN=FTP.DATA,SPACE=(TRK,1),DISP=(MOD,DELETE)
//*==========================================================
//*       FTP.DATA CONFIGURATION FILE
//*==========================================================
//DEFFTP   EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT1   DD *

;***********************************************************************
;                                                                      *
;   Name of File:             SEZAINST(FTCDATA)                        *
;                                                                      *
;   Descriptive Name:         FTP.DATA  (for FTP Client)               *
;                                                                      *
;   SMP/E Distribution Name:  EZAFTPAC                                 *
;                                                                      *
;   Copyright:    Licensed Materials - Property of IBM                 *
;                                                                      *
;                 "Restricted Materials of IBM"                        *
;                                                                      *
;                 5694-A01                                             *
;                                                                      *
;                 Copyright IBM Corp. 1977, 2011                       *
;                                                                      *
;                 US Government Users Restricted Rights -              *
;                 Use, duplication or disclosure restricted by         *
;                 GSA ADP Schedule Contract with IBM Corp.             *
;                                                                      *
;   Status:       CSV1R13                                              *
;                                                                      *
;                                                                      *
;   This FTP.DATA file is used to specify default file and disk        *
;   parameters used by the FTP client.                                 *
;                                                                      *
;   Note: For an example of an FTP.DATA file for the FTP server,       *
;   see the FTPSDATA example.                                          *
;                                                                      *
;   Syntax Rules for the FTP.DATA Configuration File:                  *
;                                                                      *
;   (a) All characters to the right of and including a ; will be       *
;       treated as a comment.                                          *
;                                                                      *
;   (b) Blanks and <end-of-line> are used to delimit tokens.           *
;                                                                      *
;   (c) The format for each statement is:                              *
;                                                                      *
;       parameter value                                                *
;                                                                      *
;                                                                      *
;   The FTP.DATA options are grouped into the following groups in      *
;   this sample FTP client FTP.DATA configuration data set:            *
;                                                                      *
;   0.  MFFTP settings
;   1.  Basic configuration options                                    *
;   2.  Unix System Services file options                              *
;   3.  Default attributes for MVS data set creation                   *
;   4.  MVS data set transfer options                                  *
;   5.  Code page conversion options                                   *
;   6.  DB2 (SQL) interface options                                    *
;   7.  Security options                                               *
;   8.  Timers                                                         *
;   9.  Return codes                                                   *
;   10. Checkpoint / Restart options                                   *
;   11. Socks server access                                            *
;   12. Debug (trace) options                                          *
;   13. Additional advanced options                                    *
;                                                                      *
;   For options that have a pre-selected set of values, a (D) indicates*
;   the default value for the option.                                  *
;                                                                      *
;   Options that can be changed via LOCSITE subcommands are identified *
;   with an (S).                                                       *
;                                                                      *
;***********************************************************************

; ---------------------------------------------------------------------
; MFFTP SETTINGS
; ---------------------------------------------------------------------

MFFTP_ABCODE 3085 ; SET DEFAULT ABEND CODE FOR MFFTP

MFFTP_OUTPUT_LRECL 120

MFFTP_PREFIX=Y
MFFTP_VERBOSE_OUTPUT ON
MFFTP_KEEP_IP Y
MFFTP_KEEP Y

; ---------------------------------------------------------------------
;
; 1. Basic FTP client configuration options
;
; ---------------------------------------------------------------------
;SUPPRESSIGNOREWARNINGS  FALSE   ; Suppress message EZYFT47I
                                     ; while processing remaining
                                     ; statements in this FTP.DATA
                                     ; TRUE - Yes
                                     ; FALSE (D) - No. EZYFT47I is
                                     ; issued to warn of ignored
                                     ; statements
 FILETYPE          SEQ           ; (S) Client mode of operation
                                     ; SEQ = transfer data sets or
                                     ;       files (D)
                                     ; SQL = submit queries to DB2
;SEQNUMSUPPORT FALSE             ; Support sequence numbers when input
                                     ; read from //INPUT DD file
                                     ; FALSE = (D) Do not support
                                     ;         sequence numbers.
                                     ;         EZYFS33I issued if
                                     ;         sequence numbers detected

; etcetera ......
/*                                     
//SYSUT2  DD DSN=FTP.DATA,SPACE=(TRK,1),UNIT=SYSDA,
//        DCB=(LRECL=80,RECFM=FB,DSORG=PS),DISP=(NEW,CATLG)
//


The following is a sample JCL job that executes MFFTP:

//MFFTP01  JOB 'MFFTP TEST',CLASS=A,MSGCLASS=A
//*
//* Upload an MVS dataset
//*
//STEP1 EXEC PGM=MFFTP,PARM='my.ftp.server'
//SYSOUT DD  SYSOUT=*
//OUTPUT DD  SYSOUT=*
//INPUT  DD *
anonymous/test
cd MFFTP_TEST
put MFI01.MFFTP.FBFILE.TOUPLD MFFTP01.txt
locsite recfm=fb lrecl=10
locstat
;
get +
MFFTP01.txt MFI01.FTPDATA.FBFILE (rep
MFFTP_VARS
quit
/*
//ENVVAR  DD *
MFFTP_CLIENT=FTP
MFFTP_KEEP=Y
MFFTP_TIME=L
/*
//*

When this JCL is submitted, assuming there are no errors, you should see messages in the console similar to the ones in When FTP is the Transport Client (MFFTP_CLIENT=FTP).

Previous Topic Next topic Print topic