Transferring QSYS.LIB files

 

This topic discusses the FTP operations in the stream transfer mode and the image transfer mode for the QSYS.LIB file system.

Table 1 and Table 2 summarize FTP operations in stream transfer mode and in image transfer type for the QSYS.LIB file system. Keep the following points in mind when using these tables:

 

Compatible record length and file size

When you send data to a file that already exists, the record and file size of the receiving file must be compatible with the file being sent or a transfer error will occur. Both the record and file size of the receiving file must be greater than or equal to the source file record and file size. To determine if the existing file size is compatible, you need to consider the current number of records, the number of extensions allowed, and the maximum record size allowed. You can view this information by entering the Display File Description (DSPFD) command.

 

Automatic file creation on the i5/OS operating system

When receiving a file, the system automatically creates a physical file, if one does not already exist. However, it is suggested that you pre-create the file on the system.

 

Data type

When transferring data using TYPE I, the data is not converted. If the file does not exist, it is tagged with CCSID 65535 when it is created.

File pre-creation is advised when using the MGET and MPUT subcommands to transfer files with multiple members. When a file is not pre-created, FTP creates a file with a maximum record length equal to the longest record of the first member processed. If the record length of any other file member is longer, a data truncation error will occur when transferring that member. Pre-creating a file with a record size to accommodate all members will prevent this error.

Table 1. Stream transfer mode for QSYS.LIB file system
Library exists File exists Member exists Replace selected Compatible record length Compatible file size Result
Yes Yes Yes Yes Yes Yes Data written to member.
Yes Yes Yes No N/A N/A Transfer rejected and message sent.
Yes Yes No N/A No Yes File transfer completed, records truncated, and message returned.
Yes Yes No Yes No Yes File transfer completed, records truncated, and message returned.
Yes Yes No N/A Yes Yes Member created and data written to it.
Yes Yes No No N/A No Transfer rejected and message sent.
Yes No N/A N/A N/A N/A File created with record length equal to the maximum record length of the incoming file. Member created and data written to member.
No N/A N/A N/A N/A N/A Transfer rejected and message sent. Use the Create Library (CRTLIB) command to create a library on the remote system.

Table 2. Image transfer type for QSYS.LIB file system
Library exists File exists Member exists Replace selected Result
Yes Yes Yes Yes Data written to member.
Yes Yes Yes No Transfer rejected and message sent.
Yes Yes No N/A Member created and data
Yes No N/A N/A
No N/A N/A N/A

  • Receiving text files to QSYS.LIB
    The QSYS.LIB file system internally supports a record structure. Therefore, the i5/OS® File Transfer Protocol (FTP) converts files received on the System i™ platform into a record structure and converts files sent from the System i platform into the FTP file structure.

 

Parent topic:

Data transfer methods