RFC 294 UNKNOWN FTP · DATA TRANSFER

The Use of "Set Data Type" Transaction in File Transfer Protocol

Clarifying how FTP's Set Data Type transaction should guide file conversion.

On rfc-editor.org ↗
PUBLISHED
January 1972
AUTHORS
A.K. Bhushan
STREAM
Legacy
BUILDS ON
RFC 265 — The File Transfer Protocol
DOI
10.17487/RFC0294

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                             25 January 1972
RFC 294                                        Abhay Bhushan, MIT
NIC 8304
Categories: D.4, D.5, and D.7
Updates: RFC 265


The Use of 'Set Data Type' Transaction in File Transfer Protocol
----------------------------------------------------------------


    As mentioned in RFC 265, the opcode of '00' is set aside for the
clarify the use of 'set data type' in file transfer operations.


    In many systems such as Multics at MIT, there is no provision to
identify the type of data (i.e., ASCII or numeric) stored in files.
The manner in which the data is handled is context dependent.  ASCII
characters are stored as four 9-bit characters per 36-bit word, right
justified with left most bit as zero.  As efficient conversion
programs exists in Multics for conversion of data from Multics' ASCII
into Network ASCII, it would be useful for a user to be able to
instruct the Multics server to convert data into Network ASCII in
retrieve operations.  It is suggested that the 'set data type'
transaction be used for this purpose.


    The 'set data type' transaction preceding a retrieve request
should be interpreted by a server to mean that the user wants to
receive his data in that form.  If the server is unable to convert the
data into the desired form, it should return a 'set data type' of


       [ This RFC was put into machine readable form for entry ]
       [ into the online RFC archives by BBN Corp. under the   ]
       [ direction of Alex McKenzie.                   12/96   ]

RFC 294                                        Abhay Bhushan, MIT

    The following examples should clarify the use of 'set data
type' transactions.

1.        USER                                             SERVER
          ----                                             ------
                    Set data type '02' (Network ASCII)
                    ------------------------------------->
                    Store File X
                    ------------------------------------->
                    File X (in Network ASCII)
                    ------------------------------------->
                    End of File
                    ------------------------------------->
                    Acknowledge
                    <-------------------------------------

                    Retrieve File X
                    ------------------------------------->
                    File X in Network ASCII
                    <-------------------------------------
                    End of File
                    <-------------------------------------

2.        USER                                             SERVER
          ----                                             ------
                    Set data type'03' (EBCDIC)
                    ------------------------------------->
                    Retrieve File Y
                    ------------------------------------->
                    Set data type '00' ("bit-stream")
                    <-------------------------------------
                    File Y as stored (no conversion)
                    <-------------------------------------
                    End of File
                    <-------------------------------------

                    Set data type '02' (Network ASCII)
                    ------------------------------------->
                    Retrieve File Z
                    ------------------------------------->
                    File Z in Network ASCII
                    <-------------------------------------
                    End of File
                    <-------------------------------------

ISO Plain Language

On this page
PROBLEMSome systems do not record a file's data type, so a server may not know how to convert stored data for a requester.
MECHANISMA user sends Set Data Type before a retrieve request to ask for the data in a chosen form; the server can report that it cannot convert it.
HOW IT WORKSRFC 294 explains how to use the transaction reserved by RFC 265 and gives examples of requested and refused conversions.

§1Files Without a Recorded Type

RFC 294 discusses systems such as Multics, where a file does not necessarily identify whether its contents are ASCII or numeric. The way the data is handled depends on the task using it.

The RFC says Multics has conversion programs that can change its stored ASCII into Network ASCII, and proposes using the Set Data Type transaction to request that conversion for retrieval.

A file may not say what kind of data it contains. The user can ask for the form needed by the receiving system.

§2Requesting a Data Type

A Set Data Type transaction before a retrieve request tells the server the form the user wants to receive. If the server cannot convert the data into that form, it should return a Set Data Type transaction to indicate that it cannot fulfill the request.

The RFC describes Network ASCII and EBCDIC as example data types in its exchanges.

The user names a preferred data form before asking for a file. The server can convert the data or reply that it cannot.

§3Examples of Conversion

One example asks the server to store and later retrieve a file as Network ASCII. Another asks for EBCDIC but shows the server replying with data type 00, meaning bit-stream, before sending the file as stored without conversion.

A later request in the example asks for Network ASCII for a different file.

The examples show a server honoring a requested form when it can. When it cannot convert, it can send the file in its stored form instead.