TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-101
#DEFINERESTORE Built-In Function
#DEFINERESTORE Built-In Function
Use #DEFINERESTORE to create or replace an active DEFINE, or replace the
working set, with the contents of a DEFINE previously saved with #DEFINESAVE.
option
is either of these:
REPLACE
specifies that if a DEFINE with the same name as the saved DEFINE exists,
the saved DEFINE is to replace the existing DEFINE. If no DEFINE with the
same name exists, an error occurs.
If you omit this option, and no other DEFINE exists with the same name, the
saved DEFINE is added; otherwise, an error occurs.
WORK
specifies that the saved DEFINE is to replace the working set; if the REPLACE
option is also present, it is ignored. If you omit this option, the presence or
absence of the REPLACE option governs restoration of the DEFINE.
buffer
is the name of a STRUCT containing a previously saved DEFINE. The definition of
the STRUCT, except for its length, is irrelevant.
Result
#DEFINERESTORE returns a space-separated list consisting of a numeric error code,
the name of the saved DEFINE, and a numeric consistency-check result. Error codes
are listed in Appendix B; zero indicates a successful operation. Consistency-check
numbers are shown in Table 8-7 on page 8-185; zero indicates no consistency errors.
Considerations
The buffer must contain a valid internal form of a DEFINE, as created by
#DEFINESAVE. If the buffer appears not to contain a valid DEFINE,
#DEFINERESTORE returns an error and does not restore the buffer contents.
If the buffer is to be restored as an active DEFINE and no error occurs, the
DEFINE is restored; if the error code is not zero, the DEFINE is not restored. In
either case, the working set and the background set remain unchanged.
If the buffer is to be restored to the working attribute set and the error code is
anything but 0, 2057, 2058, or 2059, the working set remains unchanged.
#DEFINERESTORE [ / option [ , option ] / ] buffer