Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

MTS_$SET_ATTR                     Domain/OS                      MTS_$SET_ATTR


NAME
     mts_$set_attr - set a magtape descriptor attribute

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/mts.h>

     void mts_$set_attr(
          mts_$handle_t &mt_handle,
          mts_$attr_t &mt_attribute,
          void &attribute_value,
          status_$t *status)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/mts.ins.pas';

     procedure mts_$set_attr(
          in mt_handle: mts_$handle_t;
          in mt_attribute: mts_$attr_t;
          in attribute_value: univ mts_$attr_value_t;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/mts.ins.ftn'

           integer*2 nchar
           parameter (nchar = 32)

           integer*4 mt_handle, status, attribute_value
           integer*2 mt_attribute, i2_value
           logical l_value
           character c_value*(nchar)

           equivalence (i2_value, attribute_value)
           equivalence (l_value, attribute_value)
           equivalence (c_value, attribute_value)

           call mts_$set_attr(mt_handle, mt_attribute,
          &                   attribute_value, status)

DESCRIPTION
     Mts_$set_attr sets the value of the attribute specified by mt_attribute
     to attribute_value, in the magtape descriptor file on mt_handle.  The
     attribute values set by mts_$set_attr do not take effect until the
     descriptor file is closed.

     mt_handle
          A handle for an open magtape descriptor file.

     mt_attribute
          An enumerated value that specifies the attribute to set.  Choose one
          of the following values:

          mts_$ascii_nl_a
               This attribute is a Boolean value that specifies how ASCII new-
               lines are handled during tape I/O.  If true, newlines are
               stripped on writes and added on reads.  If false, newlines are
               left alone.  The default is true.

          mts_$block_length_a
               This attribute is the file block length in bytes.  The default
               value is 2048.

          mts_$buffer_offset_a
               This attribute is the buffer offset in bytes for files on
               ANSI-labeled volumes.  The default value is 0.

          mts_$close_vol_a
               This attribute is a Boolean value that specifies whether the
               tape volume should be closed when an open stream to the
               descriptor file is closed.  If true, the tape volume is closed
               when the stream is closed.  If false, the tape volume is not
               closed when the stream is closed.  The default is true.

          mts_$create_date_a
               This attribute is a string that specifies a file creation date
               on an ANSI-labeled volume.  The value associated with
               mts_$create_date_a is a new creation date string for the
               volume.  A valid date string is an array of 19 ASCII characters
               with the format "YEAR/MONTH/DAY HOUR:MINUTE:SECOND", where YEAR
               is a 4-digit decimal integer, and MONTH, DAY, HOUR, MINUTE, and
               SECOND are all 2-digit decimal integers with the appropriate
               ranges.  The default file creation date is "-auto" padded out
               with spaces to 19 characters, which uses the system date for
               the ANSI file creation date field.

          mts_$exp_date_a
               This attribute is a string that specifies a file expiration
               date on a labeled volume.  A valid date string is an array of
               19 characters with the format
               "YEAR/MONTH/DAY HOUR:MINUTE:SECOND", where YEAR is a 4-digit
               decimal integer, and MONTH, DAY, HOUR, MINUTE, and SECOND are
               all 2-digit decimal integers with the appropriate ranges.  The
               default file creation date is "-auto" padded out with spaces to
               19 characters, which writes spaces into the ANSI file expira-
               tion date field.

          mts_$file_id_a
               This attribute is a file identifier string on an ANSI-labeled
               volume.  The value associated with mts_$file_id_a is an array
               of 17 characters associated with a file on the tape.  The
               default file identifier is blank.

          mts_$file_section_a
               This attribute is the file section number on an ANSI-labeled
               volume.  The default file section number is 1.

          mts_$file_sequence_a
               This attribute is the file sequence number.  The default value
               is 1.  If the volume is labeled, then the value
               mts_$current_file_seq specifies the current file, and the value
               mts_$end_file_seq specifies a new file at the end of the
               volume.

          mts_$file_set_id_a
               This attribute is a file set identifier string on an ANSI-
               labeled volume.  A file set identifier is an array of six char-
               acters, associated with all files in a file set.  The default
               file set identifier is blank.

          mts_$generation_a
               This attribute is a file generation number on an ANSI-labeled
               volume.  The default is 0.

          mts_$generation_version_a
               This attribute is the file generation version number on an
               ANSI-labeled volume.  The default is 0.

          mts_$file_access_a
               This attribute is a file accessibility value on an ANSI-labeled
               volume.  The file accessibility is a single-character value.
               The default is a blank.

          mts_$labeled_a
               This attribute is a Boolean value that specifies whether a
               volume is labeled in accordance with ANSI X3.27.  If true, the
               volume is labeled.  If false, the volume is not labeled.  The
               default is true.

          mts_$owner_id_a
               This attribute is the volume owner identification string on
               ANSI-labeled volumes.  The volume owner identification is an
               array of 14 characters.  The default is "-auto" padded out with
               spaces to 14 characters, which uses the log-in name of the cal-
               ling process' owner for the ANSI volume owner ID field.

          mts_$record_format_a
               This attribute specifies a record format for a volume.  It can
               take one of the following single-character values:

               `D'  The volume contains variable-length records.

               `F'  The volume contains fixed-length records.

               `S'  The volume contains spanned records.

               `U'  The volumes record format is undefined.

               The default is `D' for variable length records.

          mts_$record_length_a
               This attribute is the maximum record length in bytes.  The
               default is 2048.

          mts_$reopen_vol_a
               This attribute is a Boolean value that specifies whether the
               volume should be opened at the current tape position.  If true,
               the volume is reopened at the current tape position.  If false,
               the tape is rewound to the beginning of the volume when opened.
               The default is false.

          mts_$save_vol_pos_a
               This attribute is a Boolean value that specifies whether the
               tape should be rewound when the volume is closed.  If true, the
               tape is not moved when the volume is closed.  If false, the
               tape is rewound to the beginning of the volume when the volume
               is closed.  The default is false.

          mts_$system_code_a
               This attribute is the system code string for an ANSI-labeled
               volume.  The system code is an array of 13 characters.  The
               default is blank.

          mts_$system_use_a
               This attribute is the system use string for an ANSI-labeled
               volume.  The system use is an array of 35 characters.  The
               default is blank.

          mts_$unit_a
               This attribute is the unit number on a tape drive.  It is used
               to select one drive from a multiple-drive device.  The default
               is 0.

          mts_$vol_access_a
               This attribute specifies volume accessibility on an ANSI-
               labeled volume.  The volume accessibility is a single-character
               value.  The default is a blank.

          mts_$vol_device_a
               This attribute specifies a device type.  The device type is one
               of the following values of the enumerated type mts_$device_t:

               mts_$ct
                    The device is a cartridge tape drive.

               mts_$mt
                    The device is a free tape device.

          mts_$vol_id_a
               This attribute is the volume identification string on an ANSI-
               labeled volume.  The volume identification is an array of six
               characters.  The default is "-auto" padded out with spaces to
               six characters, which currently just writes spaces in the ANSI
               volume ID field.

     attribute_value
          The value to assign the attribute specified by mt_attribute.

     status
          The completion status.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026