z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Programming Considerations

z/OS DFSMS Using Data Sets
SC23-6855-00

For BSAM, BPAM, and QSAM your SYNAD routine is entered with the addressability (24- or 31-bit) of when you issued the macro that caused entry to SYNAD. This typically is a CHECK, GET, or PUT macro. DCB SYNAD identifies a routine that resides below the line (RMODE is 24). DCBE SYNAD identifies a routine that may reside above the line. If it resides above the line, then all macros that might detect an I/O error must be issued in 31-bit mode. If both the DCB and DCBE specify SYNAD, the DCBE routine will be used.

You can write a SYNAD routine to determine the cause and type of error that occurred by examining:

You can use the SYNADAF macro to perform this analysis automatically. This macro produces an error message. Your program can use a PUT, WRITE, or WTO macro to print the message.

Your SYNAD routine can act as an exit routine and return to its caller, or the SYNAD routine can continue in your main program with restrictions on the DCB. The SYNAD routine branches elsewhere in your program and, after the analysis is complete, you can return control to the operating system or close the data set. If you close the data set, you cannot use the temporary close (CLOSE TYPE=T) option in the SYNAD routine. To continue processing the same data set, you must first return control to the control program by a RETURN macro. The control program then transfers control to your processing program, subject to the conditions described below. Never attempt to reread or rewrite the record, because the system has already attempted to recover from the error.

You should not use the FEOV macro against the data set for which the SYNAD routine was entered, within the SYNAD routine.

Queued Access Methods

When you are using GET and PUT 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 a spooled data set, a subsystem data set, or output errors, except output errors on a real printer. If the EROPT and SYNAD fields are not complete, ABE is assumed.

Because EROPT applies to a physical block of data, and not to a logical record, use of SKP or ACC may result in incorrect assembly of spanned records.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014