Transferring Files to and from OS/390
FTP USAGE OF UCSB's OS/390 COMPUTER1. FTP
File Transfer Protocol (FTP) is a set of basic rules (protocol) that allows two computers to exchange files over a TCP/IP network. FTP is the official file transfer software of the Internet and is therefore supported by most computers.
In order to use FTP, the user must have client software and understand its use. The examples shown here use generic ftp commands. The commands for some clients may be different.
2. WHO CAN USE THE OS/390 FTP SERVER?
To use FTP services on our OS/390 system, one must usually be defined as a Complete user. Once a connection is opened to the FTP server, you will be prompted for your userid and password. If you already have a Complete userid and password then you have the necessary authorization to use the FTP server.
Individuals who have no need for normal Complete services, but who wish to use FTP, can request that a "RACF" account be opened. This account and associated password will allow one to use FTP on our OS/390 system. Call the IS&C administrative office at extension 2261 to request that a RACF account be opened.
As with any TCP/IP service, connectivity with the campus Internet is required.
The use of FTP requires software on both the 'client' and 'server' sides. The individual wishing to use FTP services on the Computer Center's OS/390 server should already have an appropriate version of FTP installed on the local system and should be familiar with it. IS&C does not provide support for the client software.
If you experience problems accessing the OS/390 FTP Server, please call the Sandy Benson at extension 5261 for assistance.
Once you have succeeded in connecting to the OS/390 FTP server and have questions regarding file structure, access permission or OS/390 dataset conventions, please contact the Information Systems Technical Support Group at email@example.com.
4. CONNECTING TO THE SERVER
If you are using Fetch 3.0.3 (Macintosh) to FTP files to or from OS/390, first configure Fetch as follows:
EXAMPLE: Download the file AM2P.BJCUN.SALCHG from OS/390 to your workstation after logging on.
- get 'AM2P.BJCUN.SALCHG' (localname - including path)
EXAMPLE: Download the member AM2P.SSHU.LIB(FILE15) from OS/390 to your workstation location logging on.
- get 'AM2P.SSHU.LIB(FILE15)' (localname - including path)
Note: You can only download one member of a library at a time from our OS/390 system. The FTP server does not know how to handle multiple member names nor can it download a whole library.
6. DISCONNECTING FROM THE SERVER
You issue the following command to disconnect from the UCSB Computer Center's OS/390 system:
7. ON-LINE HELP FOR FTP SERVER
The Help command provides information on the FTP server. The syntax of the help command is:
- help <section-title> (valid section-titles are: AECF, DEFAULT, HINTS, INTRO, LOG, NEWS, PATH and SPACE)
- help <command name> (any FTP command may be used, see section 8E)x
The following are some useful help commands:
HELP (without operand), HELP HELP, HELP INTRO, HELP PATH, HELP DEFAULT, HELP SPACE, and HELP SITE
8. UPLOADING FILES TO OS/390
Uploading files to OS/390 is much more complex than downloading. If you are not going to upload files, please skip this entire section.
8A. DATA SET NAMING CONVENTION
When uploading files to OS/390, it is important to know the dataset naming conventions. When creating a dataset on OS/390, the following conventions must be used:
(1) For personal datasets:
where userID = user logon name
a, b or c = any text up to 8 characters (only 'a' is required)
Examples: AM2P.BJCUN.MYFILE.LETTERS AM2P.SHSCH.PERSONAL
(2) For datasets used by another application: am1p.systemcode.a.b.c
where systemcode = code for application system using the dataset
a, b or c = any text up to 8 characters (only 'a' is required)
8B. SIMPLE EXAMPLE
Upload a local file from the workstation to the OS/390 server and store it as AM2P.BJCUN.SALCHG after connecting to the server.
- send (localname - including path) 'AM2P.BJCUN.SALCHG'
In order to upload a member into a specified library on the OS/390 system, you have to enclose the member name with a pair of parentheses and preceed it with the name of the library.
- send (localname - including path) 'AM2P.BJCUN.LIB(MEMBER)'
8C. SENDING FTP COMMANDS TO THE FTP SERVER
(1) Why Send a Command to the FTP Server?
Some reasons for sending a command to the FTP server are: 1) get on-line help on FTP commands and FTP server implementation; 2) obtain the status of the FTP server; and 3) supply host-dependent parameters to the FTP server.
(2) How to Send a Command to the FTP Server:
- quote <command> (Note: some software requires the word quote, and other software does not)
(3) Sending a Command to the FTP Server to Change the Default Parameter setting for SPACE, LRECL, and BLKSIZE
Space (PRIMARY and SECONDARY), LRECL (Logical record length), RECFM (Record format), BLKSIZE (blocksize) and the maximum file size allowed to be uploaded are important characteristics of a dataset and determine how a dataset will be stored on OS/390. These parameters must be defined by the user before a dataset is stored on OS/390. Fortunately, the FTP server has defined default values for all these parameters. Therefore, the user does not need to do so. The following are the DEFAULT parameter values set by the FTP server:
PRIMARY = 15 (tracks)
SECONDARY = 75 (tracks)
LRECL = 80 (Logical record length = 80 bytes)
BLKSIZE = 27920 (Block size = 27920 bytes)
RECFM = FB (Record format = fixed block)
The maximum file size which can be uploaded to our OS/390 system when using the default parameter settings is 63.6 MB.
You have to send the FTP command SITE to the server to override the default values if you need to make changes, Although the default parameters should work fine for most normal datasets.
8D. EXAMPLES OF MORE COMPLEX UPLOADS
If the characteristic parameters of a dataset are different from the default parameters, then you have to send one or more FTP commands to the server to change the default value for SPACE, LRECL, BLKSIZE, RECFM, or all of them. Two examples are given below to explain how to upload 1) a very large dataset, and 2) how to upload a dataset with different characteristics.
EXAMPLE 1: Upload a very large dataset to the OS/390 system. The size of this file is 64.8 MB. More disk space should be allocated before uploading a very large file, otherwise the file transfer will fail and may cause other unexpected problems.
(1) Using the default LRECL and BLKSIZE, 55.8 KB can be stored on each track
(2) Estimate the number of tracks needed for uploading the file - 64.8 MB / 55.8 KB/track = 1161 tracks
(3) Determine the primary and secondary quantities. The maximum number of extents including both the primary and the secondaries allowed to be allocated to a data set is 16 (one primary extent and 15 secondary extents), therefore, each extent, either primary or secondary, to be allocated could have - 1161/16 = 73 tracks per extent. However, it is be better to allocate most of the space needed in the primary extent to optimize the transfer. To allocate this large file, send the following command:
- quote site primary = 750
- quote site secondary = 200
EXAMPLE 2: Upload the dataset, AM1P.AP.INVDATA, to OS/390 with the following characteristics:
LRECL = 86 bytes
BLKSIZE = 6192 bytes
RECFM = FB (same as the default setting)
File size = 6 tracks (much less than the maximum file size- 63.6 MB)
There is no need to change the parameters PRIMARY, SECONDARY and RECFM since the file size is much less than the maximum size (63.6 MB), and the RECFM is the same as the default. The default values for LRECL and BLKSIZE need to be changed by sending the following FTP command to the FTP server:
- quote site blksize=6192 lrecl=86
8E. FTP commands supported by the OS/390 FTP R2 Server at the UCSB Computer Center.
Table 1. FTP Commands Supported by OS/390 R2 FTP Server
9. FURTHER INFORMATION
If you need further information or assistance with FTP commands on OS/390, contact Terry Malosh (extension 3521).
For assistance or further information please contact firstname.lastname@example.org .
Last Modified: DEH,02/20/04