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:
[symbol] | IEWBIND | FUNC=RESETW [,VERSION=version] |
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).
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. |
If your program does not use the IEWBIND macro, place the address of the RESETW parameter list in general purpose register 1.
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 |
PROTECT | DC | CL1'Y' | Protection flag 'Y' = Yes |