z/OS DFSMS Access Method Services Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


User I/O Routines

z/OS DFSMS Access Method Services Commands
SC23-6846-01

User I/O routines enable a user to perform all I/O operations for a data set that would normally be handled by the access method services processor. This makes it possible, for instance, to control the command input stream by providing an I/O routine for SYSIN. Start of change The SYSIN I/O routine does not have to actually perform I/O, it can instead return command input placed in memory via the address of the retrieved record. End of change Standard linkage must be used and standard register convention must be followed. See Processor Invocation for an explanation of standard linkage.

A user I/O routine is invoked by access method services for all operations against the selected data sets. The identification of the data sets and their associated I/O routines is through the input/output list of the processor invocation parameter list (see Figure 1).

When writing a user I/O routine, the user must be aware of three things:

  1. The processor handles the user data set as if it were a non-VSAM data set that contains variable-length unblocked records (maximum record length is 32760 bytes) with a physical sequential organization. The processor does not test for the existence of the data set, except for the REPRO command with OUTDATASET.
  2. The user must know the data format so that the routine can be coded for the correct type of input and format the correct type of output.
  3. Each user routine must handle errors encountered for data sets it is managing and provide a return code to the processor in register 15. The processor uses the return code to determine what it is to do next.
The permissible return codes are:
Code
Meaning
0(0)
Operation successful.
4(4)
End of data for a GET operations.
8(8)
Error encountered during a GET/PUT operation, but continue processing.
12(C)
Error encountered during GET/PUT operation; do not allow any further calls (except CLOSE) to this routine.

Figure 1 shows the argument list used in communication between the user I/O routine and the access method services processor. The user I/O routine is invoked by the processor for OPEN, CLOSE, GET, and PUT routines.

Figure 1. Arguments Passed to and from a User I/O Routine
da5i2003

The type of operation to be done is indicated with IOFLAGS. The IOINFO field indicates, for OPEN and CLOSE operations, the data set name or ddname of the data set; for GET and PUT operations, the IOINFO field communicates the record length and address.

A user I/O routine for SYSPRINT receives control each time the processor issues a PUT against the SYSPRINT data set. If the PUT has been issued to print an IDC message, the unique message number is passed to the routine with IOFLAGS (see Figure 1). Each IDC message is in the form IDCsnnnI or IDCsnnnnI, where:
  • s is a code indicating the severity of the problem.
  • nnn or nnnn is the message number that is unique across all IDC messages.

The 2-byte message number passed with IOFLAGS is the nnn or nnnn portion of the message converted to binary. If the message is to be suppressed in TSO, the twos complement of the message number are passed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014