Skip to main content

3B. Syntax and Semantics

3B.1 Data Types​

The 'change data type' control transactions identifies the structure of data (data type and byte size) in succeeding data transactions. This transaction shall contain two more bytes in addition to the opcode byte. The first of these bytes shall convey a data type or code information and the second byte may convey the data byte size, where applicable. This information may be used to define the manner in which data is to be parsed, interpreted, reconfigured or stored. Change data type need be sent only when structure of data is changed from the preceding.

Although, a number of data types are defined, specific implementations may handle only limited data types or completely ignore the data type and byte size descriptors. Even if a host process does not "recognize" a data type, it must accept data (i.e., there is no such thing as a data type error.) These descriptors are provided only for convenience, and it is not essential that they be used. The standard default is to assume nothing about the information and treat it as a bit stream (binary data, byte size 1)[5] whose interpretation is left to a higher level process, or the user.

* It is, however, possible that this bit stream is treated like ASCII characters in specific instances such as transmitting a file to a line printer.

The following data type codes are currently assigned. Where a byte size is not implicit in data type, it may be provided by the second byte.

  Hex    Octal

00 000 1 Bit stream (standard default)

01 001 none Binary data bytes

02 002 8 Network ASCII characters

03 003 8 EBCDIC characters

04 004 36 DEC-packed ASCII (five 7-bit
characters, 36th bit 1 or 0)

05 005 8 Decimal numbers, net. ASCII

06 006 8 Octal numbers, net. ASCII

07 007 8 Hexadecimal numbers, net. ASCII

08 010

through through Reserved for standard assignment

4F 077

5A 100

through through Reserved for experimental use

FF 377

3B.2 Requests and Identifiers​

Retrieve, delete, name_from, rename_t, and append requests contain a pathname, following the op code, in the information field. A pathname may also follow the opcode in list_file_directory request.

A pathname must uniquely identify a file in the serving host. The syntax of pathnames and identifying information shall conform to serving host conventions, except that standard network ASCII (as defined in the TELNET protocol) shall be used.

The store request has a 4-byte (32 bits) 'allocate size' field followed by pathname. 'Allocate size' indicates the number of bits of storage to be allocated to the file. A size of zero indicates that server should use his default.

Retrieve request achieves the transfer of a copy of file specified in pathname, from serving to using host. The status and contents of file in serving host should be unaffected.

Store request achieves the transfer of a copy of file specified in pathname, from using to serving host. If file specified in pathname exists on serving hosts, then its contents shall be replaced by the contents of the file being transferred. A new file is created at the serving host, if the file specified in pathname does not exist.

Append request achieves the transfer of data from using to serving host. The transferred data is appended to file specified in pathname, at serving host.

Rename-from and rename-to requests cause the name of the file specified in pathname of rename_from to be changed to the name specified in pathname of rename_to. A rename_from must always be followed by a rename_to request.

Delete request causes file specified in pathname to be deleted from the serving host. If an extra level of protection is desired such as the query "Do you really wish to delete this file?", it is to be a local implementation in the using system. Such queries should not be transmitted over network connections.

Username and password identifiers contain the respective identifying information. Normally, the information will be supplied by the user of the file transfer service. These identifiers are normally sent at the start of connection.

3B.3 Error and Acknowledge Terminates​

The error transactions may have an error code indicated by the second descriptor byte. Transmission of an error message in text is also permitted. The following error codes are defined.

  Error Code (2nd descriptor byte)           Meaning
Hex Octal

00 000 Error condition indicated by computer
system (external to protocol)

01 001 Name syntax error

02 003 Access control violation

03 003 Abort

04 004 Allocate size too big

05 005 Allocate size overflow

06 006 Improper order for transactions

07 007 Opcode not implemented

08 010 File search failed

09 011 Error described in text message
(ASCII characters follow code)

At present, no completion codes are defined for acknowledge. It is assumed that acknowledge refers to the current request being fulfilled.