Transferring files using QfileSvr.400

The QFileSvr.400 file system provides access to other file systems on a remote system.

The transfer of files in the "root", QOpenSys, QDLS, and QOPT file systems is supported. The transfer of files in the QSYS.LIB file systems is not supported.

You must use stream mode (MODE S) and file structure (STRUCT F). For example, in Figure 1, FILE.ABC is transferred to and from two different files systems on system AS012 using the QFileSvr.400 file system on system AS009.

After connecting to system AS009, the FTP client subcommands shown in Figure 2 perform the data transfers.

Note: The user ID and password on systems AS009 and AS012 must be the same.
Figure 1. QFileSvr.400 file system example

   ________________________________________________________________________ 
   |                                                                       | 
   |                                                                       | 
   |      Client                    System                 System          | 
   |      System                     AS009                  AS012          | 
   |     _________                 _________             __________        | 
   |    |         |               |         |            |         |       | 
   |    |         |      PUT      |         |            |  root,  |       | 
   |    |         |-------------->|         |            |QOpenSys |       | 
   |    |         |               |QFileSvr.|<---------->|         |       | 
   |    |         |      GET      |  400    |            |         |       | 
   |    |         |<--------------|         |            |  file   |       | 
   |    |         |               |         |            | system  |       | 
   |    |         |               |         |            |         |       | 
   |    |_________|               |_________|            |_________|       | 
   |                                                                       | 
   |                                                                       | 
   |_______________________________________________________________________|

  
Figure 2. Subcommands to transfer files using QFileSvr.400

   ________________________________________________________________________ 
   |                                                                       | 
   |                                                                       | 
   |   NAMEFMT  1                                                          | 
   |   LCD  /CLIENTDIR1                                                    | 
   |   CD  /QFileSvr.400/AS012/FLSDIR                                      | 
   |   PUT  FILE.ABC                                                       | 
   |   GET  FILE.ABC  /CLIENTDIR2/FILE.ABC                                 | 
   |   CD  /QFileSvr.400/AS012/QOpenSys/FLSDIR                             | 
   |   PUT  FILE.ABC                                                       | 
   |   GET  FILE.ABC   /CLIENTDIR2/FILE.ABC (REPLACE                       | 
   |   SYSCMD  RMVLNK  '/CLIENTDIR2/FILE.ABC'                              | 
   |   DELETE  /QFileSvr.400/AS012/FLSDIR/FILE.ABC                         | 
   |   DELETE  /QFileSvr.400/AS012/QOpenSys/FLSDIR/FILE.ABC                | 
   |   QUIT                                                                | 
   |                                                                       | 
   |                                                                       | 
   |_______________________________________________________________________|