RESETW: Reset workmod

RESETW resets a workmod to its initial state. All items are deleted. Options are reset to the options current for the dialog and the processing intent must be respecified. The workmod token is not changed.

If a workmod has been changed without being saved or loaded, it cannot be reset without specifying PROTECT=NO.

The syntax of the RESETW call is:

FUNC=RESETW
Specifies that a workmod be reset to its original state.
VERSION=1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Specifies the version of the parameter list to be used. The default value is VERSION=1.
RETCODE=retcode — RX-type address or register (2-12)
Specifies the location of a fullword integer that is to receive the return code returned by the binder.
RSNCODE=rsncode — RX-type address or register (2-12)
Specifies the location of a 4-byte hexadecimal string that is to receive the reason code returned by the binder
WORKMOD=workmod — RX-type address or register (2-12)
Specifies the location of an 8-byte area that contains the workmod token for this request.
INTENT={BIND | ACCESS}
Specifies the range of binder services that can be requested for this workmod. The possible arguments are as follows:
BIND
Specifies that the processing intent for this workmod is bind. The workmod will be bound, and all binder functions can be requested.
ACCESS
Specifies that the processing intent for this workmod is access. The workmod will not be bound, and no services that alter the size or structure of the program module can be requested. See Processing intents for a list of the services that are not allowable.
The argument for INTENT can be abbreviated as B or A.
PROTECT={YES | NO}
Specifying PROTECT=NO allows the binder to reset a workmod that has been altered but not yet saved or loaded. The argument for PROTECT can be abbreviated as Y or N. YES is the default.

Processing notes

The binder is sensitive to the state of the DCB pointed to by the DCBPTR in an INCLUDE call. The DCB must not be closed and reopened while the binder accesses the corresponding data set during a dialog. Once it is opened initially for an INCLUDE call, it must remain open until after the binder's ENDD call takes place.

Note that if you do alter your DCB as described above, using RESETW (or DELETEW followed by CREATEW) is not enough to reaccess your data set at a later time during the same binder dialog. This only causes the data set's information to remain with the dialog, and such information is no longer valid once the DCB is closed. An attempt to reuse the altered DCB in the same binder dialog might produce unpredictable results. To avoid this, end your dialog (ENDD) and start a new one (STARTD).

Return and reason codes

The common binder API reason codes are shown in Table 1.

Return Code Reason Code Explanation
00 00000000 Normal completion. Workmod has been reset.
08 83002624 Unexpected error from SIGCLEAN.
12 83000709 The workmod was in an altered state, but PROTECT=YES was specified or defaulted. RESETW request rejected.

Parameter list

If your program does not use the IEWBIND macro, place the address of the RESETW parameter list in general purpose register 1.

Table 1. RESETW parameter list
       
PARMLIST DS 0F  
  DC A(RESETW) Function code
  DC A(RETCODE) Return code
  DC A(RSNCODE) Reason code
  DC A(WORKMOD) Workmod token
  DC A(INTENT) Processing intent
  DC A(PROTECT+X'80000000') Protection flag and end-of-list indicator
RESETW DC H'19' RESETW function code
  DC H'version' Interface version number
INTENT DC CL1'A' Processing intent

  'A' = Access
  'B' = Bind

PROTECT DC CL1'Y' Protection flag

  'Y' = Yes
  'N' = No