The ftyp command defines whether SAM files on the local host are to be processed as text or binary files.
The ftyp command applies only to SAM files of the DMS file system. PAM files are still treated as binary files, and ISAM files as text files. POSIX files are not affected by this restriction.
If preceded by the quote site command, this command can also be issued at the FTP server(see "FTP servers in BS2000").
ftyp |
text | binary | textbin |
The default has changed since previous FTP versions, because the transfer cannot be restarted with ftyp=text (for further details, see the chapter “Frequently asked questions (FAQ)”).
text
SAM files on the local host are to be processed as text files.
With this setting, tabs (X’05’ in EBCDIC) are converted to a corresponding number of blanks when writing to a file (tab stops 1, 9, 17 ...), and newline characters (X’15’ in EBCDIC) cause a line feed (record change).
When reading, newline characters (X’15’) are added to each record read (see the “C library functions for POSIX applications” manual).
binary
SAM files on the local host are to be processed as binary files.
With this setting, data is transferred unchanged when writing to a file. No conversion of tabs (X’05’) and newline characters (X’15’) occurs. When reading, no newline characters (X’15’) are added.
This setting enables SAM files of fixed, variable and undefined record lengths to be written and read.
For records of fixed length, the last record is padded with binary zeros (if necessary).If this is not desirable, variable length records should be used.
textbin
SAM files on the local host are to be processed as binary text files.
With this setting, tabs (X’05’ in EBCDIC) are not converted to blanks when writing to a file, but newline characters (X’15’ in EBCDIC) do result in a line feed (record change).When reading, a new line character (X’15’) is added to each record read.
This setting is defined after FTP is started.
Example
The file processing type is set to binary.
ftyp binary
ftyp set to binary.
The file file1 is created without conversion of the tab and newline characters.
get file2 file1