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


Ending a Request

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

Suppose you determine that you do not want to complete a request that you initiated. For example, suppose you determine during the processing immediately following a GET that you do not want the record you just requested. You can use the ENDREQ macro to cancel the request. Using the ENDREQ macro has the following advantages:
  • Avoids checking an unwanted asynchronous request.
  • Writes any unwritten data or index buffers in use by the string.
  • Cancels the VSAM positioning on the data set for the RPL.

Recommendation: If you issue the ENDREQ macro, it is important that you check the ENDREQ return code to make sure it completes successfully. If an asynchronous request does not complete ENDREQ successfully, you must issue the CHECK macro. The data set cannot be closed until all asynchronous requests successfully complete either ENDREQ or CHECK. ENDREQ waits for the target RPL to post, so it should not be issued in an attempt to end a hung request.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014