hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


POLYCENTER Software Installation Utility Developer's Guide

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 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:

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:

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.

Note

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 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 ; 
       file [SYSEXE]PROD_A_SUBSTITUTE.EXE ; 
   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