Table22. Recommended Methods for Data Transfer
Transferbetween System Types Data type TransferType
1
, Mode
2
AS/400 toAS/400 Text EBCDIC, Stream
AS/400 toASCII Text ASCII, Stream
ASCII toAS/400 Text ASCII, Stream
ASCII toAS/400 to ASCII All data Binary,Stream
AS/400 toAS/400 Mixed data
3
Binary,Stream
AS/400 toAS/400 Mixed data
3
EBCDIC, Block
Notes:
1. The TYPE subcommand defines the way in which the data is to be represented.
2. The MODE subcommand specifies how the bits of data are to be transmitted.
3. See “Transferring Files that Contain Packed Decimal Data betweenAS/400 Systems”.
Transferring Files that Contain Packed Decimal Data betweenAS/400 Systems
There is no support in FTP for converting special numeric formats like packed
decimal or zoned decimal.
The transfer of packed decimal or zoned decimal data is supported between AS/400
systems when you use either a transfer type of TYPE I (BINARY) or TYPE E
(EBCDIC) with a transmission mode of BLOCK; these transfer types send the data
as is without any conversion. The results of any other transfer type are
unpredictable.
When transferring packed or zoned data in an externally-described QSYS.LIB file,
the target file should be pre-created in the same manner as the source file. This
restriction applies to data containing any special numeric format or when keyed
access is required.
When transferring data with a transfer type of binary, the record length of the target
file must be the same as the record length of the source file.
Before packed decimal or zoned decimal data can be transferred to or from other
system architectures (such as S/390 or UNIX), you must convert the data to
printable form.
Transferring Save Files
Save files must be sent as images and, therefore, require the FTP BINARY
subcommand to be run before the GET or PUT subcommands.
When transferring a save file using name format 0, the save file on the receiving
system must be pre-created. It is recommended that files are pre-created in other
situations as well for reasons of performance and integrity.
The transfer of a save file—because it is a file format peculiar to AS/400—can only
be made usable if the sending and receiving systems are both AS/400 systems.
However, a save file could be sent to a non-AS/400 system and stored there for
backup purposes. The save file could be transferred later to the AS/400 with FTP.

Transferring save files from VM to AS/400—Example:

The following example
shows how to transfer a save file from VM to an AS/400 for both NAMEFMT 0 and
1. The FTP session has already been initiated, the BINARY subcommand has been
issued, and NAMEFMT 0 has been specified.
Chapter7. File Transfer Protocol (FTP) Client 259