SSH Reference Manual
structured files (STRUCT R). Additionally, the following two transfer modes are supported: transparent transfer of
records, and unstructured transfer of structured files.
The transparent transfer mode allows transferring records containing LF (“\n”) characters inside a record. These files
cause problems when being transferred in delimited record transfer mode as this character is used as end-of-record
delimiter. This problem does not occur in transparent transfer mode but this mode can effectively be used for transfers
from one NonStop server to another only (other SFTP implementations are not aware of the transparent mode
implementation).
The unstructured transfer mode uses the Guardian option 'unstructured access of structured files' when opening a
Guardian structured file. If the unstructured mode is enabled, SFTP and SFTPSERV read the structured file physically
rather than logically (record by record). This transfer mode corresponds to the FTP BINARY transfer of structured files
(STRUCT F). Files can only be read in unstructured transfer mode, i.e. if NonStop SFTP command ‘put’ is used or a
remote sftp client issues a ‘get’ command against SFTPSERV on NonStop.
The transfer mode is specified by adding one of the following three characters after the file name, separated by a comma
(no space allowed):
• D for delimited record transfer mode.
• T for transparent record transfer mode.
• U for unstructured transfer mode.
Examples:
1. A file named relseq1 needs to be read record by record, each transferred with the delimiter LF appended:
sftp> get relseq1,d
This is identical to
sftp> get relseq1
as transfer mode D is the default transfer mode.
2. An entry-sequenced file is to be transferred from a NonStop server to a Unix host:
sftp> put entryseq,u entryseq
The transfer mode and file attributes can be used at the same time; the transfer mode is appended to the file
name first, then file attributes:
<file>,<transfer-mode>,<file-attributes>
3. A key-sequenced file is transferred between NonStop systems:
sftp> put keyseq,t keyseq,t,k,541,128,128,16,4072
Transferring ASCII files
Both SFTP and SFTPOSS support transfers in ASCII mode. If ASCII mode is enabled, files will be automatically
converted according to the server's newline convention for ASCII files. If required, the server's newline convention can
be configured. Furthermore, if the target file is located in a Guardian subvolume, an edit file will be created
automatically, without having to specify the file code explicitly in the file name.
The following commands control this feature:
• ascii [dos|unix|mac]
changes to ASCII transfer mode and optionally sets the server's newline convention, where the meaning of the
newline convention specifier is as follows:
o dos: lines are terminated by a CR LF sequence ("\r\n")
o unix: lines are terminated by a LF ("\n")
o mac: lines are terminated by a CR ("\r")
HP NonStop SSH Reference Manual SSH and SFTP Client Reference • 235