HP OpenVMS Systems Documentation

Content starts here

POLYCENTER Software Installation Utility Developer's Guide

Previous Contents Index

SOFTWARE Statement

The SOFTWARE statement signals a software dependency on the specified product: the specified product must be installed prior to (or concurrently with) the installation of the product that contains the SOFTWARE statement. Upon successful installation, the SOFTWARE statement causes a permanent software reference to be recorded in the product database.

One of three situations may occur when a product with a SOFTWARE statement is installed:

  • If the referenced product is already installed, the software dependency is satisfied, so no action is performed on the referenced product.
  • If the referenced product is not installed, but a product kit for it is available in the source directory, the referenced product is implicitly installed to satisfy the software dependency.
  • If the referenced product is not installed and the source directory does not contain a product kit for it, then an error message is displayed advising the user to terminate the installation process.
    If a referenced product is not available, Hewlett-Packard recommends that users accept the default prompt and terminate the operation.

If you intend only to check whether a certain software product is installed on the system and alert the user if it is not, use the SOFTWARE function.

You use the SOFTWARE statement for the following purposes:

  • To specify a software product that should be installed on the system to satisfy a software product dependency. For example, if Product A has a dependency on Product B, install Product B before installing Product A.
  • To specify that a software product that is a part of a platform (product suite) is to be included in the platform product installation.
  • To satisfy a special use of the MODULE statement when the following conditions are met:
    • The product updates (with a MODULE statement) a library that is supplied by the referenced product
    • Both products could be installed concurrently

    Because it provides a library that another product updates, the referenced product must be installed first. The SOFTWARE statement forces the referenced product to be installed first when the products are installed together in one operation. (If the products were to be installed separately, you could use the SOFTWARE function to make sure that the referenced product was already installed.)
    For example, installing the OpenVMS platform product results in the installation of the OpenVMS operating system and, optionally, selected layered products such as DECwindows Motif. DECwindows Motif updates HELPLIB.HLB, which is originally provided by OpenVMS. Therefore, DECwindows Motif must use a statement such as

    software HP AXPVMS VMS ;
    in its product description file to explicitly reference the OpenVMS operating system and guarantee that OpenVMS is installed before DECwindows Motif.

If two products reference each other (creating a circular reference list), the utility issues an error message.

If you use the component option, the utility creates a copy of the referenced product when you use the PRODUCT COPY command.

If the operation executes in batch mode and a referenced product is not available, the operation terminates.

Software Function

The SOFTWARE function tests for the presence of a product. You can also specify the version of the product that must be present.

You can use different options to determine whether the specified product:

  • Is currently installed
  • Will be installed on successful completion of the operation
  • Has a product kit in the source directory

The SOFTWARE function, unlike the SOFTWARE statement, does not create a permanent software reference to another product and does not force the installation of the other product.

By default, the SOFTWARE function tests the state the product will be in when the operation finishes, not when the operation begins. The same effect is obtained when you include the INSTALLED AFTER option. To test the state of the referenced product when the operation begins, you must specify the INSTALLED BEFORE option. If you specify the KIT ACCESSIBLE option, the function tests whether the referenced product kit is present in the source directory.


The default option INSTALLED AFTER, is reliably tested only after the user configuration phase concludes and the utility is about to begin the execution phase. Use caution when including this option with the SOFTWARE function.

The function value is true if the following conditions exist; otherwise, the value is false:

  • The product specified by the producer, base, and name parameters is available according to one of the following options: INSTALLED BEFORE, INSTALLED AFTER, or KIT ACCESSIBLE.
  • The VERSION option is omitted, or the available version satisfies the specified constraints.

The SOFTWARE function is more appropriate than the SOFTWARE statement if you need only verify the existence of a certain product.

You use the SOFTWARE function with the IF statement, as shown in the following example:

   if ( not < software HP AXPVMS PROD_A version minimum V4.0 > ) ;
       information NO_PROD_A confirm ;
   end if ;

Using the SOFTWARE function with the IF statement gives you much more flexibility in forming expressions with other functions, and allows you to perform multiple actions in the form of groups of statements.

If the SOFTWARE function reference is not satisfied, you can display an error message with an ERROR statement. This message allows a message of any size and contents. (Note that an error message induced by an unsatisfied SOFTWARE statement is rigid, short, and potentially less informative.)

You can use the ABORT option on an ERROR statement to unconditionally terminate the SOFTWARE function operation, while the failed SOFTWARE statement leaves the user with an option to continue the product installation.

   if ( < software HP AXPVMS PROD_B version below V7.0 > ) ;
       error NO_PROD_B abort ;
   end if ;

Summary of Differences Between the Statement and Function

Table 7-10 summarizes the differences between the SOFTWARE statement and the SOFTWARE function.

Table 7-10 Summary of SOFTWARE Statement and SOFTWARE Function Differences
Statement Function
If the referenced product is not installed and its kit is available to the utility during the installation of the referencing product, it will be installed by the utility just prior to the referencing product. If the referenced product is not installed, the function will evaluate to the boolean value FALSE (0). The referenced product will not be installed even though the kit may be available to the utility.
Causes the utility to create a permanent software reference in the database. Does not create any reference from the referencing to the referenced product.
Creates a risk of software reference conflicts. Because no permanent software reference is created, there is no risk of conflict.
Causes the utility to create a software reference and user interface related data structures in memory for the duration of the operation, thereby consuming additional system memory. Does not cause the utility to create software reference or user interface related data structures in memory.
Requires additional processing to check for software reference conflicts and for processing error messages. Requires no additional processing other than searching for the presence of the referenced products.
If software reference cannot be satisfied, a one-sentence message is displayed to the user. Allows any processing based on the value of the SOFTWARE function; error messages can be tailored in any desired way and size.
With the failure of a software reference, continuation of the operation is still possible. With the failure of a software reference, processing may be unconditionally aborted with an "error <message> abort" statement.
Use only if you are willing to install the referenced product. Use whenever you want only to check for the referenced product availability, but do not intend to install the referenced product.

Avoiding Common Mistakes

A common mistake is for a layered product's PDF to include a SOFTWARE statement reference to a VMS (OpenVMS operating system) product, or to an OPENVMS platform (product suite that includes the OpenVMS operating system).

It is acceptable to reference the OpenVMS operating system from a SOFTWARE statement if your product relies on the presence of the library files supplied by the operating system. However, do not reference the OpenVMS platform from a SOFTWARE statement.

If you need to verify the OpenVMS operating system version before the installation of the layered product can proceed and complete successfully, use the SOFTWARE function instead:

Previous Next Contents Index