IBM OS/390 User Manual

Page of 673
13.2.6.4 I/O Error Checking
When an input/output error occurs under MVS, a user-written synchronous error
routine (SYNAD) can be given control. You can use this routine to analyze
exceptional conditions or uncorrectable errors. The error can be skipped or
accepted, or processing can be terminated.
If an input/output error occurs during data transmission, standard error recovery
procedures, provided by the operating system, attempt to correct the error
before returning control to your program. An uncorrectable error usually causes
an abnormal termination of the task. However, if you specify in the DCB macro
the address of an error analysis routine, the routine receives control in the event
of an uncorrectable error.
You can write an SYNAD routine to determine the cause and type of error that
occurred by examining:
The contents of the general registers.
The data event control block.
The exceptional conditional code.
The standard status and sense indicators.
Use a special macro instruction, SYNADAF, to perform these functions
automatically. SYNADAF produces a descriptive error message that can be
printed by a subsequent PUT or WRITE macro.
Having completed the analysis, you can return control to the operating system or
close the erroneous data set and terminate processing. In no case can you
attempt to reread or rewrite the record because the system has already
attempted to recover from the error.
When you use GET/PUT macro instructions to process a sequential data set, the
operating system provides three automatic error options (EROPT) to be used if
there is no SYNAD routine, or if you want to return control to your program from
the SYNAD routine:
ACC - accept the erroneous block.
SKP - skip the erroneous block.
ABE - abnormally terminate the task.
These options are applicable only to data errors, because control errors result in
abnormal termination of the task. Data errors affect only the validity of a block of
data. Control errors affect information or operations necessary for continued
processing of the data set. These options are not applicable to output errors,
except printer output errors. When chained scheduling is used, the SKP option is
not available. If it is coded, it defaults to the ACC option. If you do not complete
the EROPT and SYNAD fields, the system assumes ABE.
13.2.6.5 LIOCS Card File Definition
The methods of processing cards files are the same in VSE and MVS. Figure 31
on page 295 compares the VSE DTFCD and the MVS DCB operands. Figure 32
on page 295 gives an example of the macros that process a card file under both
operating systems. Figure 33 on page 296 shows a short sample program.
294
VSE to OS/390 Migration Workbook