| How to FTP Files Using LIBRARY Views: |
| Introduction: This page explains how to FTP files using Libr LIBRARY Views. Library Views expose all sublibraries, and therefore all mebers, in a specific LIBR Library. |
| Sample Libr LIBRARY View: Assume the Admin has already created the following LIBR LIBRARY View and saved it under the name of LIB.FTPC |
| XFER = BEGIN TYPE = RCV TGT_AM = PAM TGT_TYPE = DISK TGT_FILE = PRD1 restrict acess only to PRD1 TGT_RECFM = F TGT_RECL = 80 TGT_DISP = SHR XFER = END |
| FTPing Files Using LIBRARY Views: To FTP files, we must first point to the desired sublibrary because members actually reside there. To do so, follow the following steps: 1) Move into the View subdirectory itself (i.e., CD /LIB) , then 2) Move into the desired sublibrary (i.e., CD MACLIB), then 3) FTP your file(s). Procedure: 1) Move into the View subdirectory itself: Line-mode clients: issue CD /LIB GUI clients: click on the LIB subdirectory Icon. Graphical clients automatically issue a DIR as soon as you click on a subdirectory icon. If you are using a line-mode client, as I am, and care to issue a DIR, then here is what you get back from the server: 2) Move into the Desired sublibrary subdirectory: Line-mode clients: issue CD sublibary where sublibrary is the actual sublibrary of interest. GUI clients: click on the desired sublibrary icon. Graphical clients automatically issue a DIR as soon as you click on a subdirectory icon. If you are using a line-mode client, as I am, and care to issue a DIR, then here is what you get back from the server: 3) FTP your file(s): You can now download and upload files as you wish. |
| ftp> dir x*.* 200 Command okay. 150 File status okay, about to open data connection. -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XECBTAB.A -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XMTEXAMP.A -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XPCC.A -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XPCCB.A -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XPOST.A -rw-rw-rw- 1 vse none 0 Aug 12 11:17 XWAIT.A 226 Closing data connection. ftp: 346 bytes received in 0.38Seconds 0.91Kbytes/sec. |
| ftp> ftp> CD MACLIB 250 Requested file action okay, completed. |
| ftp> dir 200 Command okay. 150 File status okay, about to open data connection. drw-rw-rw- 1 vse none 0 Aug 12 11:17 BASE drw-rw-rw- 1 vse none 0 Aug 12 11:17 BASED drw-rw-rw- 1 vse none 0 Aug 12 11:17 MACLIB drw-rw-rw- 1 vse none 0 Aug 12 11:17 MACLIBD 226 Closing data connection. ftp: 222 bytes received in 0.27Seconds 0.82Kbytes/sec. |
| ftp> ftp> cd /LIB 250 Requested file action okay, completed. |
| Shortcut: If you are using a line-mode client, then you can, if you wish, combine all steps in a single command. For example, you can issue: PUT client_file /LIB/SUBLIB/entry_name |