Northern Illinois University

Information Technology Services

MVS Uploading and Downloading Via FTP

Uploading and downloading involves transferring files from a PC to the MVS mainframe (uploading) or from the MVS mainframe to a PC (downloading). The method recommended for uploading and downloading is via File Transfer Protocol (FTP) using either a direct Internet connection (through ethernet) or a PPP dial-in connection (through a modem and phone line).

General Requirements For Uploading and Downloading

ITS Customer Support supports the following types of FTP software: FTP which comes as part of the Windows operating system (versions 95 and above), WS_FTP for Windows, and Dartmouth's Fetch which runs on Macintosh computers.

If you intend to connect to the mainframe via a modem, you need PPP software as well as an FTP client. Windows 95 and above and MacOS 7.6 and higher have PPP software built-in.

Specific Requirements for Uploading

To upload a data or text file to MVS, the file must be in ASCII format. If, for example, you are using WordPerfect, use the "Text In/Out" feature to save the file as DOS TEXT.

(Note: For uploading SPSS portable files, use ASCII transfer; SAS transport files should be uploaded as binary files. For more help, contact the ITS Helpdesk at 1-815-753-8100).

Specific Requirements for Downloading

T download a file from MVS, the file must either be in Variable Block (VB) or Fixed Block (FB) Record Format (RECFM) and it must be cataloged on the mainframe.

Putting Your File in Variable Block Format

If your file is in Superwylbur edit format, changing the file to Variable Block format is very simple. The first step is to logon to Superwylbur and put the file into your default temporary by typing:

USE FROM filename on ACAxxx

where "filename" is the name of your file and ACAxxx is the disk on which it resides (e.g., ACA301). Once this is done the file can be resaved in Variable Block format by typing:

RESAVE VAR

Putting Your File in Fixed Block Format

If the file has a column width of 80 or less and you want to resave it in Fixed Block format, you first USE FROM the file as shown above and then resave by typing:

RESAVE CARD

If you wish to save the file under a different name, type:

SAVE INTO newname CARD

If the file has lines which contain more than 80 columns but no more than 255 columns, then type:

SAVE INTO newname LRECL=xx BLKSIZE=xxxx

where LRECL equals the maximum number of columns and the BLKSIZE is a multiple of the LRECL. For example, if you had a maximum of 120 columns in your dataset you would type:

SAVE INTO filename LRECL=120 BLKSIZE=6000

If the file has an LRECL greater than than 255 columns, then you must create a new file using SEQCOPY (see User's Guide To MVS Utilities or come in to ITS Customer Support for assistance).

Cataloging Your File

To catalog the file on MVS, simply type:

CAT filename ON ACAxxx

This catalogs the file so that FTP can access it when you start downloading.

Uploading and Downloading Methods

Establishing an FTP connection

To establish an FTP connection with the MVS mainframe from your PC type:

ftp mvs.cso.niu.edu

Once you are connected, enter your AccountID and password when prompted for them. Depending on your version of FTP, you may need to type the following command in order to correctly see the files stored under MVS:

remotedir

Uploading and Downloading Files

The way you upload and download files will depend on your FTP software. In general, if you are working from a prompt instead of a graphic-based FTP, you would use the following command to UPLOAD a file:

put filename

The uploaded file will be placed and cataloged on a temporary storage pack, so you will need to logon to Superwylbur and move your file to an ACA pack such as ACA301. To access your file once you have logged on to Superwylbur, type:

USE FROM filename ON CAT

Then save the file on Superwylbur as you normally would. NOTE: If the file has an LRECL > 255 then you must use SEQCOPY to copy the file. If you save a duplicate copy on a disk pack remember to scratch the file from the catalog to avoid confusion (as follows).

SCR filename ON CAT

Your FTP software may allow you to change the default setting on the MVS host with the QUOTE SITE command. For example, you can change the default volume (disk pack) that your file will be saved on from a storage pack to one of the ACA volumes by substituting the name of the volume you want to save to (e.g., ACA301) in the following command issued at your ftp prompt:

quote site vol=acaxxx

You can also use the QUOTE SITE command to change the default save format from Variable Block files with an LRECL of 255 and BLKSIZE of 6233. For example, uploading a SAS transport file requires a Fixed Block format with an LRECL of 80 and recommended BLKSIZE of 8000. To specify that these parameters, you would use the following:

quote site recfm=fb lrecl=80 blksize=8000

Very large datasets may require the default allocation to be increased. The default space allocation for a file uploaded to MVS is 10 tracks as the primary allocation and 5 tracks as the secondary allocation (which will be increased up to 15 times as needed). One way to estimate the space needs of your PC file is to divide the number of bytes in your PC file by 30,000 to get a rough approximation of the number of tracks that will be needed on the ACA volume. If your file requires more than 85 tracks, you will need to change the default space allocation. For example, the following command changes the primary allocation to 200 and the secondary to 10:

quote site primary=200 secondary=10

Once you are connected, you change your transfer method from ascii to binary or vice versa by typing either ASCII or BINARY. The command TYPE may tell you what the current transfer method is set to.

For downloading a file enter the following command:

get filename

You will be prompted for a new name for the file as it is stored on your PC. If the current name is fine just press Enter. NOTE: the filename will be truncated if necessary to conform to your PC's file naming conventions.

Other Useful FTP Commands

help - Displays a list of possible commands.
dir - Displays the directory of files under your mainframe account which are cataloged.
ldir - Displays the directory of files on your PC.
drive - Allows you to change the default drive on your PC.
lcd - Changes the directory on your PC.
lpwd - Displays the current directory to which your PC is currently set.
mget - Allows you to download multiple files using wildcards (e.g., "MGET *.txt" downloads all files with extension "txt").
mput - Allows you to upload multiple files using wildcards.

In order to quit FTP type:

quit