Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
CHECK—Wait for completion of a request (BDAM, BISAM, BPAM, and BSAM) z/OS DFSMS Macro Instructions for Data Sets SC23-6852-02 |
||||
The CHECK macro places the active task in the wait condition, if necessary, until the associated input or output operation is completed. The input or output operation is then tested for errors and exceptional conditions. If the operation completes successfully, control is returned to the instruction following the CHECK macro. If the operation does not complete successfully, the error analysis (SYNAD) routine or end-of-data (EODAD) routine is given control. If the appropriate routine is not provided, the task is abnormally terminated. These routines are discussed in the SYNAD and EODAD parameters of the DCB and DCBE macros. The following conditions are also handled for BPAM and BSAM only: When Reading: The end-of-data (EODAD) routine is given control if an input request is made after all the records are retrieved. Volume switching is automatic for a multivolume data set not opened for UPDAT. For a multivolume data set opened for UPDAT, the end-of-data routine is entered at the end of each volume. The system treats a striped data set as a single volume. When Writing:Additional space on the device is obtained when the current space is filled and more WRITE macros have been issued. When writing on a cartridge tape, CHECK ensures that the data has been transferred to the tape subsystem and not necessarily to tape. To ensure that all of the data is on the tape, issue either a CLOSE macro or a SYNCDEV macro with INQ=NO. However, SYNCDEV generally is not useful and gives poor performance. Without SYNCDEV, if any data fails to get on the tape, a subsequent CHECK macro or CLOSE macro will detect and handle the I/O error. You must issue a CHECK, WAIT, or EVENTS macro for each input and output operation. For BSAM and BPAM, the CHECK, WAIT, or EVENTS macros must be issued in the same order as the READ or WRITE macros were issued for the data set. For information on when you can use the WAIT or EVENTS macro, see z/OS DFSMS Using Data Sets. Processing PDSEs: If a PDSE member is open for update and in a storage class with "Guaranteed Synchronous Write" specified, a CHECK macro issued following a WRITE macro guarantees that the data is synchronized to DASD. Otherwise, synchronization is not guaranteed until CLOSE, or the STOW macro or the SYNCDEV macro is issued. Specifying "Guaranteed Synchronous Write" in the storage class produces the same result as issuing the SYNCDEV macro after every CHECK. On output, CHECK guarantees that the ECB is posted and that the data has been moved from your buffer into an internal system buffer, allowing your buffer to be available for reuse. Processing UNIX files: CHECK guarantees that the ECB is posted and that any output data has been moved from your buffer to an internal system buffer, allowing your buffer to be available for reuse. CHECK does not necessarily guarantee that the output data has been synchronized to the output file, unless PATHOPTS=OSYNC is specified. If PATHOPTS=OSYNC is specified, CHECK guarantees that the output data has been synchronized to the output file. Issuing the CLOSE or the SYNCDEV macro guarantees that all output data has been synchronized to the output file. Processing Compressed Format Data Sets: When processing a compressed format data set on output, CHECK guarantees that the ECB is posted and that the data has been moved from your buffer into an internal system buffer, allowing your buffer to be available for reuse. CHECK does not guarantee that the data is synchronized to DASD. Synchronization is not guaranteed until CLOSE or the SYNCDEV macro is issued. Specifying "Guaranteed Synchronous Write" in the storage class produces the same result as issuing the SYNCDEV macro after every CHECK. Data Conversion: You
can request conversion by coding LABEL=(,AL) or (,AUL) in the DD
statement, or by coding OPTCD=Q in the DCB macro or DCB subparameter
of the DD statement. If conversion is requested, the check routine
automatically converts BSAM records, as they are read, from one character
representation to another if the record format is F, FB, D, DB, or
U. Conversion occurs when the check routine determines that the input
buffer is full. Conversion is performed according to one of the following
techniques:
Refer to z/OS DFSMS Using Data Sets for a complete description of CCSID conversion and default character conversion. After you issue a CHECK macro when reading format D or DB blocks without BUFUFFEL, the length of the block is in the DCB LRECL field in the DCB. It will remain valid until the next CHECK macro. The CHECK macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses. The format of the CHECK macro is:
1 CCSID
may be supplied in the CCSID subparameter of a JOB, EXEC, or DD statement
or the tape label.
|
Copyright IBM Corporation 1990, 2014
|