Performing I/O

When a GCS program needs an I/O operation performed, it uses a function called General I/O. The related macro, GENIO, provides six different functions that an unauthorized application can use to process virtual channel programs on any real or virtual I/O device except DASD and the virtual machine console:
  • Open Device (OPEN)

    This function identifies a task as owner of a particular I/O device. OPEN also requires the task to specify an exit. Whenever the task receives an I/O interrupt from the device, this specified exit gets control.

  • Close Device (CLOSE)

    This function ends a task's ownership of a specified device. Once closed, the device stops passing I/O interrupts to the specified exit.

  • Modify (MODIFY)

    This function requests that an active channel program be modified. An application first must modify the virtual channel program and then issue MODIFY.

  • Obtain Device Characteristics (CHAR)

    This parameter returns information about an I/O device's type, class, model, and features.

  • Start I/O (START)

    This function starts a virtual channel program on an open device. (The device may be either virtual or real.)

  • Halt I/O (HALT)

    This halts an operation on a given device, terminating any active I/O.

The GENIO macro also provides a function for authorized programs that want to process real channel programs on real devices:
  • Start real I/O (STARTR)

    This starts a real channel program on an open real device. (The device must be real.)