Chapter 9. Input/Output Processing

Revision History
Revision V7.1-00323 November 2023
Revision V7.0-00324 June 2022
Revision V7.0-00223 March 2022
Revision V7.0-00124 November 2021
Revision V6.3-01208 April 2020
Revision V6.3-01120 December 2019
Revision V6.3-00704 February 2019
Revision V6.3-00626 October 2018
Revision V6.3-00529 June 2018
  • In “Write”, replicate UTF-8 bullets from the command section, add information about concatenation, remove some VMS-specific text

Revision V6.3-00423 March 2018
  • In “IOERROR”, change strexpr to expr; add more information about $DEVICE.

  • In “WRITE Command”, Updated the WRITE /LISTEN entry to reflect the removal of GT.M's listen queue size limitation.

Revision V6.3-00312 December 2017
Revision V6.3-00120 March 2017
Revision V6.2-00127 February 2015
  • In “Socket Device Examples”, specified that the ZSHOW "D" command reports available information on both the local and remote sides of a TCP socket and enhanced the downloadable example to include more debugging information.

  • Updated “WRITE Command” for WRITE /PASS, WRITE /ACCEPT, and WRITE /TLS.

  • In “OPEN Deviceparameters” and “USE Deviceparameters”, added “IKEY”,“KEY”, “OKEY” keywords.

  • In “REWIND”, specified that when $PRINCIPAL identifies a device that supports REWIND, the REWIND or INREWIND device parameters perform a REWIND of the input and OUTREWIND performs a REWIND of the output.

  • In “DESTROY”, added the behavior of a sequential disk device CLOSEd with the NODESTROY.

  • In “READ/WRITE Operations”, specified that WRITE works at the current file position, whether attained with APPEND, REWIND or SEEK.

  • In “TRUNCATE”, specified that the TRUNCATE device parameter on a USE $PRINCIPAL command works on a stdout device when the device supports the action.

  • In “DESTROY”, moved the reference to the behavior of sequential disk devices CLOSEd with NODESTROY to “Open”.

Revision V6.1-00028 August 2014
Revision V6.0-00324 February 2014
Revision V6.0-00121 March 2013

In “EXCEPTION”, added a note about the handling of non-fatal errors.

Revision V6.0-00019 November 2012

This chapter describes the following topics which relate to input and output processing:

  • Input/Output Intrinsic Special Variables, and their Maintenance.

    GT.M provides several intrinsic special variables that allow processes to examine, and in some cases change, certain aspects of the input/output (I/O) processing. The focus in this chapter is how GT.M handles the standard ones, such as $IO, $X, $Y, and those that are GT.M-specific (for example, $ZA, $ZB).

  • Input/Output Devices

    Each device type supported by GT.M responds to a particular subset of deviceparameters, while ignoring others. Devices may be programmed in a device-specific manner, or in a device-independent manner. This chapter discusses each device type, and provides tables of their deviceparameters.

  • Input/Output Commands and their Deviceparameters

    GT.M bases its I/O processing on a simple character stream model. GT.M does not use any pre-declared formats. This chapter describes the GT.M I/O commands OPEN, USE, READ, WRITE, and CLOSE.

OPEN, USE, and CLOSE commands accept deviceparameters, which are keywords that permit a GT.M program to control the device state. Some deviceparameters require arguments. The current ANSI standard for GT.M does not define the deviceparameters for all devices. This chapter includes descriptions of the GT.M deviceparameters in the sections describing each command.

[Note]Note

The term "device" can refer to an entity manipulated by application code using Open, Use, Close, Read and Write commands as well as a device from the perspective of the operating system. We endeavor herein to always make it clear from the context which meaning is intended.

loading table of contents...