Library /sys$common/syshlp/TPUHELP.HLB  —  SET(RECORD_MODE)
  SET(RECORD_MODE)

  Sets the record_mode for a buffer, or for all new buffers created without
  an associated input file.  Record mode specifies the record format and
  record attributes for files written from the buffer.

  Syntax

     [keyword1 :=] SET (RECORD_MODE, {buffer | SYSTEM}, keyword2)

  Parameters

     buffer     The buffer whose output record mode should be changed.

     SYSTEM     A keyword indicating that all new buffers created with no
                input file shoud have the new record mode.

     keyword2   The keyword specifying the new record mode:

                    Keyword         Record Format   Record Attributes
                    -------------------------------------------------
                    VARIABLE_NONE   fab$c_var       0
                    VARIABLE_FTN    fab$c_var       fab$m_ftn
                    VARIABLE_CR     fab$c_var       fab$m_cr  (VMS default)
                    STREAM          fab$c_stm       fab$m_cr
                    STREAM_LF       fab$c_stmlf     fab$m_cr  (ULTRIX default)
                    STREAM_CR       fab$c_stmcr     fab$m_cr
                    SYSTEM_DEFAULT  fab$c_var       fab$m_cr
                    SYSTEM_DEFAULT  fab$c_stmlf     fab$m_cr
                    UNSPECIFIED     Use the record mode of the input file if
                                    supported, else use the current system
                                    default.  Valid only for buffers.

  Comments

     This built-in does not affect journal files, work files, or section
     files.  A buffer created with no input file gets the current system
     default record mode.  A buffer created with an input file gets the
     record mode from the input file if it is supported.  If not supported,
     the record mode is left unspecified, and the output file takes the
     input file record mode.

     This built-in optionally returns the previous record mode setting if
     any.

     Record modes are specific to file systems.  For example, STREAM_LF is
     the only valid record mode for buffers written to disks on ULTRIX
     systems.  Setting the record mode to a value not supported by your file
     system may result in your buffer being written to the disk in an
     unusable format.

  Examples

     SET (RECORD_MODE, my_buffer, STREAM_LF);

  Sets the record_mode of buffer my_buffer to stream_lf.  Writing my_buffer
  to a file creates a file with stream_lf record format and carriage return
  record attributes.

     SET (RECORD_MODE, SYSTEM, VARIABLE_CR);

  Sets the default record_mode for all new buffers create with no input
  file.  Files written from these buffer will have variable length record
  format and carriage return record attributes.  This record mode is not
  supported on ULTRIX systems.

  Related Topics

     WRITE_FILE
Close Help