RESET (Reset)

Free-Form Syntax RESET{(E)} {*NOKEY} {*ALL} name
Code Factor 1 Factor 2 Result Field Indicators
RESET (E) *NOKEY *ALL name (variable or record format) _ ER _

The RESET operation is used to restore a variable to the value held at the end of the *INIT phase. This value is called the reset value. If there is no *INZSR subroutine, the reset value is the same as the initial value (either the value specified by the INZ{(initial value)}, or the default value). If there is a *INZSR subroutine, the reset value is the value the variable holds when the *INZSR subroutine has completed.

The RESET operation can also be used to restore all the fields in a record format to their reset values.

See Figure 8 for more information on the *INIT phase.

Note:
For local variables in subprocedures, the reset value is the value of the variable when the subprocedure is first called, but before the calculations begin.

To handle RESET exceptions (program status code 123), either the operation code extender 'E' or an error indicator ER can be specified, but not both. For more information on error handling, see Program Exception/Errors.

For more information, see Initialization Operations.

See also:



[ Top of Page | Previous Page | Next Page | Contents | Index ]