
Prefered method of file-transfering data using the MVS FTP
Client program
Topics
Definition of FTP & why it is used
The FTP (File Transfer Program) is used to transfer or copy files from
one computer to another. This narative specifically deals with transfering
data from the MVS Mainframe to another machine.
The only file type that can be processed by FTP on the Mainframe is
Physical Sequential datasets. This includes standard PS datasets, GDG
(generation data group datasets), and individual members of partitioned
datasets. Tape files can not be file transfered; (however Tape Mount Managed
datasets can).
The FTP MVS client propgram can also be used for issuing commands to
SQL-FTP
on one of the
SYBASE dataservers. SQL-FTP is a FTP server program, running on a machine
supporting a SYBASE datasever, that receives requests from an FTP client, but
issues those requests to a SYABSE database.
Suggested JCL for performing a File Transfer
//STEPNAME EXEC PGM=FTP,PARM='host.name (EXIT=8'
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
userid password
put 'NCSACS.MVS.SOURCE.DATA.FILE' unix.target.file
get 'NCSACS.MVS.TARGET.DATA.FILE' unix.source.file
quit
/*
or
//STEPNAME EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
host.name (EXIT=8
userid password
put 'NCSACS.MVS.SOURCE.DATA.FILE' unix.target.file
get 'NCSACS.MVS.TARGET.DATA.FILE' unix.source.file
quit
/*
FOR SAMPLE JCL USING SQL-FTP- please refer to the
SQL-FTP url
Explanations for the above JCL
You are encouraged to use a host name from the following list.
sybasedev.acs.ncsu.edu acsprod1.acs.ncsu.edu dras.acs.ncsu.edu acs-dds.acs.ncsu.edu sybase1.acs.ncsu.edu scc.sips.state.nc.us
FTP Notes
Notes:
- SYSIN can be a dataset, a member of a PDS, or inline (as above)
- SYSIN can be larger than FB 80 if the commands (Dataset names) are
longer than 80 bytes. (This is more of a problem for SQL-FTP)
- Hostnames must be used instead of IP addresses. IP addresses can and
will change.
- A return code of 8 (From the '(EXIT=8' ) will be generated if there
are any problems encountered in the transfer.
- Multiple files can be transfered with the same step, but any failure
will abort the whole attempt, not just the file in error. This
includes any rename commands at the end of the process. Therefore,
it is recommended that you place each discrete transfer in
a separate step to enhance restartability.
Last Modified September 15, 2006by Jim Wagner (jim_wagner@ncsu.edu)