Monday, August 9, 2010

Using FTP to Download Files from the IBM Mainframe to a PC

To download files from your IBM mainframe account to a PC, you must first make sure that the files are transferable. Some of your files may be stored on the IBM mainframe's minidisk as A0 mode. In order to transfer them, you must change the mode to A1. The instructions below explain how to check your files, change them all to A1 mode, and then transfer them to a PC.
Preparing Your Files to be Downloaded:
1. Log in to your account on the IBM mainframe. For instructions on how to log in, refer to:
2. Make sure the file you wish to copy is in your account by typing at the Ready prompt: filelist
You will see a list of your files and the minidisk on which they are stored.
[Optional:  If you wish to view a file, type browse in the CMD column in front of the filename. When you have finished viewing the file, press F3 to return to the filelist.]
3. Press F3 to return to the Ready prompt.
4. Then to change all your files to A1 mode, at the Ready prompt type:
rename * * A0 = = A1
5. Log out of your account by typing logout at the Ready prompt.

Downloading Your Files
1. On the PC, create a folder to store the files you will download from the IBM mainframe.
2. Click on the Start button and select Run
3. In the Open box, type: ftp vm.temple.edu and press Enter.
4. At the User prompt, enter your IBM mainframe username and press Enter.
5. At the Password prompt, enter your IBM mainframe password and press Enter.
Note: Once you access FTP (File Transfer Protocol), you can type help at the ftp> prompt to see a list of FTP commands. For a short description of a command's function, type help and the command such as help get.
6. At the ftp> prompt, type:
lcd folder
where folder is the full path of the folder that will store your IBM mainframe files. For example, if you created a folder called vmfiles on the Windows desktop, you would type:
lcd c:\windows\desktop\vmfiles
Then press Enter.
7. Optional: If you want to see a list of files in the drive you specified, type dir. Note that you can scroll up and down to view all the files in your account.
8. If you are not downloading a SAS transport file, continue to the next step. Otherwise, if you are downloading a SAS transport file, type binary.
Note: After you download a file as binary, you can return to the default setting (ascii text) by typing ascii.
9. You can now download individual files or groups of files from your IBM mainframe account to the folder you specified by using one of the following commands below.
Downloading a single file:
To download a single file, type:
get filename.filetype
For example, you might type get report.sas or get myfile.spss or get all.notebook depending on the name of your file. Note that there is a period between the filename and filetype.
Downloading multiple files:
To download more than one file, use the wildcard (*) character and the mget command. The wildcard character tells the system to transfer any file with the filetype specified in the command.
For example, if you have several files with the filetype or extension sas, you can transfer all of them by typing:
mget *.sas
Note: The mget command will prompt you to confirm the transfer of each file. If you want to turn off interactive prompting, type prompt and press Enter before issuing the mget command. To return to interactive prompting, just retype prompt.
10. To quit FTP, type quit and then press Enter.
 

No comments:

Post a Comment