Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ punch(4) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctlx, ioctl, gtty, stty

open, openx, creat

write, writex



PUNCH(4,F)                  AIX Technical Reference                  PUNCH(4,F)



-------------------------------------------------------------------------------
punch



PURPOSE

Supports the IBM virtual card punch driver.

SYNOPSIS

# include <sys/devinfo.h>
# include <sys/b370/crp.h>

DESCRIPTION

While punch cards are obsolete in a UNIX environment, some VM software provides
extensive file transfer and communication facilities using the concept of
"virtual cards".  To interface to this mechanism, AIX/370 provides a driver for
a virtual card punch device.

The special files used to write from the card punch are of the form /dev/pun#,
where # is the device unit number.  They are unique to AIX/370.

The card punch can only be opened for writing.  The record size of each card is
determined by the buffer size specified to the write system call.  When the
device is closed, a corresponding close is issued to the VM punch device.

A few IOCTL operations are available besides the standard IOCTYPE and IOCINFO
commands.  They are of the form:

        ioctl(fd, cmd, arg)
        char *arg;

The commands are:

    #define SPsettag       1        /* set tag text */
    #define SPpurge        2        /* purge any previous records */
    #define SPto           3        /* set "TO userid" option */
    #define SPclass        4        /* set spool file class */
    #define SPcopy         5        /* set number of copies */
    #define SPform         6        /* set form identifier */
    #define SPdist         7        /* set distcode       */
    #define SPfname        8        /* set file name text */

ERROR CONDITIONS

In addition to the errors listed in "ioctlx, ioctl, gtty, stty," "open, openx,
creat," and "write, writex," system calls to this device can fail in the
following circumstances:





Processed November 7, 1990        PUNCH(4,F)                                  1





PUNCH(4,F)                  AIX Technical Reference                  PUNCH(4,F)



ENXIO     Attempt to read from the punch.

ENXIO     The punch is not currently closed.

EIO       The I/O to the punch failed during the operation.

RELATED INFORMATION

In this book: "ioctlx, ioctl, gtty, stty," "open, openx, creat," and "write,
writex."













































Processed November 7, 1990        PUNCH(4,F)                                  2



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