2-12 OVERFLOWING AND UNDERFLOWING I/O STATEMENTS  
 ************************************************

 I/O statements (read, write...) transfer data from a file to some variable 
 list, or from a variable list to a file.

 Generally each I/O statement transfers one record, the exceptions (in
 standard FORTRAN) are formatted and list-directed statements which can
 transfer additional records.


 Reading (on VMS)
 ----------------
 If you read only a part of a record, the rest is ignored - the next read
 statement will read from the beginning of the next record. 

 If you try to read more data than a record contains then:

        INPUT TYPE      RESULT
        ----------      ----------------------------------------
        Formatted       All(?) record is read as if it contained 
                        only space characters
        Unformatted     An error condition occurs


 Writing (on VMS)
 ----------------
 If you try to write to a record more data than it can contain (see next
 section) an error condition occurs.

 If you write to a FIXED LENGTH RECORD less data than is required to 
 fill it then:

        RECORD TYPE     RESULT
        -----------     --------------------------------
        Formatted       The record is filled with spaces
        Unformatted     The record is filled with zeros


 Maximum and default record lengths (on VMS)
 -------------------------------------------
 Other important properties of files are the maximum record length allowed
 and the default maximum record length.

 Records(segments) size maximum values on VMS are:

        FILE ORGANIZATION       FORMATTED       UNFORMATTED
                                (bytes)         (longwords)
        -----------------       ---------       -----------
        Sequential               32766           8191
        Sequential on tape       9999            2499


 Default maximum record(segment) size values on VMS are:

        RECORD TYPE     default maximum value
        -----------     ---------------------------------------------
        Fixed           none, you should specify the value explicitly
        Segmented       2048 longwords
        Other           133 bytes


Return to contents page