|
HP OpenVMS systems documentation |
Previous | Contents | Index |
If either of these conditions is not satisfied, the utility does not
execute statements lexically contained in the IF group between the ELSE
statement and the END IF statement.
See Also HARDWARE DEVICE
HARDWARE PROCESSOR
LOGICAL NAME
OPTION
SOFTWARE
UPGRADE
#1 |
---|
if (<software HP VAXVMS DECWINDOWS>) ; file [SYSEXE]PRO$DW_SUPPORT.EXE ; else if (<software DEC VAXVMS MOTIF>) ; file [SYSEXE]PRO$MOTIF_SUPPORT.EXE ; else ; file [SYSEXE]PRO$CC_SUPPORT.EXE ; end if ; |
This example uses the IF statement in conjunction with the SOFTWARE function to determine which file to provide, as follows:
- If DECwindows is present, the utility provides the file [SYSEXE]PRO$DW_SUPPORT.EXE.
- If DECwindows is not present and DECwindows Motif is present, the utility provides the file [SYSEXE]PRO$MOTIF_SUPPORT.EXE.
- If neither DECwindows nor DECwindows Motif is present, the utility provides the file [SYSEXE]PRO$CC_SUPPORT.EXE.
#2 |
---|
if ((NOT <hardware device MUA0:>) AND (<software ABC AXPVMS TEST version below 2.0>)); . . . end if; |
In this example, the group of statements enclosed within the IF...END IF statements is executed if no MUA0: device is available on the target system and the product TEST with a version below V2.0 is present. The expression evaluates to false either if there is an MUA0: device, the product TEST is V2.0 or above, or no such product is installed.
The INFER statement tests the target system to determine if a product or product version is available.
Note
The INFER statement is valid only in a transition PDF.
file
Indicates the relative file specification of the file you want to test.logical_name
Indicates the logical name you want to test.
See Also SCOPEThe INFER statement tests the target system to determine if a product or product version is available. This statement is valid only in a transition PDF.
There are several types of INFER statements:
- The INFER AVAILABLE statement tests the target system to determine if the product named in the product directive of the transition PDF is available.
- The INFER AVAILABLE FROM INSTALL statement tests whether the product is available only if the specified file is installed as a known image. The SCOPE statement controls execution of this statement; the test executes in the specified scope.
- The INFER AVAILABLE FROM LOGICAL NAME statement tests whether the product is available only if the logical name you specify has a translation.
- The INFER VERSION statement tests the target system to determine the presence and active version of the product named in the product directive of the transition PDF. The product is inferred to be present if the specified file is present on the system and absent otherwise. If the product is present, the active version is inferred to be the internal version number of the specified file. The SCOPE statement controls execution of this statement; the test executes in the specified scope.
#1 |
---|
infer available from logical name DOC$ROOT ; |
The INFER AVAILABLE statement in this example determines if the product is available by checking to see if there is a translation for the logical name DOC$ROOT. The name of the product that the statement is testing for is contained in the product directive in the transition PDF.
#2 |
---|
infer version from [SYSEXE]FORTRAN.EXE |
The INFER VERSION statement in this example determines the active version of the product by checking to see if the file [SYSEXE]FORTRAN.EXE is present.
The INFORMATION statement displays a message from the specified text module in the PTF either before or after the execution of an installation, configuration, or reconfiguration operation.
name
Indicates, as a quoted or unquoted string, the name of the associated PTF text module. The name you specify can be from 1 to 31 characters in length and must be unique among all names in the same product description.
[NO] CONFIRM
Displays the contents of the text module and prompts the user for a response. The user can continue or terminate the operation. The CONFIRM option does not have any effect in batch mode. The default is NO CONFIRM.PHASE AFTER
Displays the contents of the text module after the execution phase of the operation finishes. This option cannot be used with the PHASE BEFORE option.PHASE BEFORE
Displays the contents of the text module during the configuration phase. This option is the default and cannot be used with the PHASE AFTER option.WITH HELPTEXT
Forces the display of the full help text module during the installation or configuration of the product. See Section 7.1 for usage constraints.
The INFORMATION statement displays a message from the specified text module in the PTF either before or after the execution of an installation, configuration, or reconfiguration operation as directed by the phase option. The PHASE BEFORE option causes the message to be displayed during the configuration phase of the operation; the PHASE AFTER option causes the message to be displayed after the execution phase of the operation.See Also PARTBy default, the prompt text string is displayed without help text. However, help text is displayed after the prompt text when the user specifies the /HELP qualifier on the command line, or the INFORMATION statement contains the WITH HELPTEXT option.
You must supply prompt text for the INFORMATION statement in the PTF using the =prompt directive. Help text is optional. If provided, it must immediately follow the prompt text line.
If you have INFORMATION statements that specify the PHASE BEFORE option and they are lexically contained in a group with configuration choices, they are processed in lexical order and may be nested.
Information statements that specify the PHASE AFTER option do not display text if they are lexically contained in an option group that is not selected.
The CONFIRM option to the INFORMATION statement causes the utility to prompt the user to continue or terminate the operation.
The INFORMATION statement declares a name; it is not a variable.
Suppose the product text file for HP Rdb for OpenVMS software contains the following lines:
1 RELEASE_NOTES =prompt Release notes for Rdb/VMS available. The release notes for Rdb/VMS are available in the file SYS$HELP:RDBVMSV4.RELEASE_NOTES. 1 STOP_RDB_VMS_MONITOR =prompt The HP Rdb for OpenVMS monitor must be stopped before installation The HP Rdb for OpenVMS monitor must be stopped before you install HP Rdb for OpenVMS. Perform the following operation: $ @SYS$MANAGER:RMONSTOP |
The product description file could contain the following information statements:
information RELEASE_NOTES phase after ; information STOP_RDB_VMS_MONITOR phase before with helptext confirm; |
If the user requests help, the first INFORMATION statement displays the following text after the operation finishes:
Release notes for HP Rdb for OpenVMS available. The release notes for HP Rdb for OpenVMS are available in the file SYS$HELP:RDBVMSV4.RELEASE_NOTES. |
If the user does not request help, the first INFORMATION statement displays only the prompt text after the operation finishes:
Release notes for HP Rdb for OpenVMS available. |
Regardless of whether the user requests help or not, the second INFORMATION statement displays the following text for the user during the configuration phase:
The HP Rdb for OpenVMS monitor must be stopped before installation The HP Rdb for OpenVMS monitor must be stopped before HP Rdb for OpenVMS may be installed. Perform the following operation: $ @SYS$MANAGER:RMONSTOP Do you want to continue [YES]? |
Regardless of whether the HELP DISPLAY option is set, the confirm option in the second statement forces the user to respond to the prompt before continuing.
Previous | Next | Contents | Index |