Asynchronous processing of the ARCHRCAL and ARCHBACK
macros is provided by the ASYNC parameter. This parameter is to be
used in conjunction with a
no-wait or
wait request:
- no-wait
- Sends a request to DFSMShsm and returns control to the user
as soon as the request is queued. The user is not notified of the
request processing other than a completion message, if the user is
logged onto TSO at the time the request ends.
- wait
- Sends a request to DFSMShsm and does not receive control back
until the request has completed. In the return notification, a return
code and reason code indicate whether the processing was successful.
The ASYNC=YES parameter allows you, as a program
submitter, a way to send requests to DFSMShsm and immediately receive
control back so that you can do other things while DFSMShsm is processing
your request. DFSMShsm notifies you when the request is complete and
returns a return code and reason code.
Before ASYNC=YES will successfully run in your requesting user
program, you, as a program submitter, must perform the following tasks:
- Ensure that the requesting user program is an authorized program
because protected CSA storage is used to communicate the request.
- Specify the ASYNC=YES option and the WAIT=YES option when you
code the requested user macro.
- Save the ECB address that is returned in register 1 and do not
free this area until the ECB is posted. When the request is queued
in CSA, control is returned to the requester. Register 1 contains
the address of an ECB that is posted when the request is finished.
For certain errors during an asynchronous request, register 1 contains
zero indicating that an ECB is not passed. Check the return and reason
codes under these conditions.
- After the ECB has been posted, issue the ARCFMWE user macro to
free the CSA storage used in this method by specifying the saved ECB
address. Upon return from the ARCFMWE macro, the return code is in
register 15 and a reason code is in register 0.