Download OpenVMS Developer`s Guide to VMSINSTAL

Transcript
C
Product-Specific Callback Conventions
A callback is a recursive invocation of a specialized subroutine in VMSINSTAL.
Example C–1 in this appendix provides a product-specific callback procedure
used with the VMSINSTAL PRODUCT callback. (See Section 5.19 for more
information about the PRODUCT callback.)
Assume that NEWAID is the hypothetical base product for a product
group. NEWAID must provide a command procedure containing a callback
(INCREMENT), which increments quantities passed to it.
The command procedure should be named NEWAIDINSTALL.COM to reflect the
product name, followed by the word INSTALL. The command procedure should
be stored in SYS$UPDATE.
To enable another product to invoke the INCREMENT callback, it must include
the following line in its installation procedure:
$ VMI$CALLBACK PRODUCT NEWAIDINSTALL:INCREMENT PROD$INC _$ COUNTFILE.DAT VMI$ROOT:[SYSUPD] 2
In this example, NEWAIDINSTALL.COM parses the following parameters:
•
P1—INCREMENT
•
P2—PROD$INC
•
P3—COUNTFILE.DAT
•
P4—VMI$ROOT:[SYSUPD]
•
P5—2
•
P6—""
•
P7—""
•
P8—""
The parameter order for product-specific callbacks should follow those of standard
callbacks. Use a standard callback that is similar to the one you are designing as
a model for parameter order.
The following conventions must be adhered to when designing a product-specific
callback procedure:
•
The procedure must establish a Ctrl/Y handler that (eventually) invokes the
CONTROL_Y callback.
•
The procedure must establish an error handler that (eventually) exits with
the status that caused the handler to be invoked. Warnings are not trapped,
because they are routinely returned from other callbacks.
•
The first parameter to the procedure is the callback request code. Use a
GOTO statement with this parameter to branch to the appropriate callback.
C–1