HP OpenVMS Systems Documentation

Content starts here

POLYCENTER Software Installation Utility Developer's Guide


Previous Contents Index

The FILE statement in this example creates the file [SYSMGR]DECW$SYSTARTUP.COM. If a version of the file already exists in the directory, the existing file is renamed [SYSMGR]DECW$SYSTARTUP.COM_OLD instead of being deleted. It also assigns a generation number to the file for conflict resolution. For example, if a version of the file already exists with a generation number of 60, the utility will preserve the copy with generation number 60 and will not create a new one.

#6

file [SYSEXE]CALIBRATE.EXE
      assemble execute "@PCSI$SOURCE:[TEMP]CALIBRATE_LINK.COM"
      assemble uses ("[TEMP]CALIBRATE.OBJ",
                     "[TEMP]CALIBRATE_LINK.COM") ;

      

The FILE statement in this example creates the file [SYSEXE]CALIBRATE.EXE in the execution environment by executing a command procedure to link the image. The link command procedure and object file are obtained from product material packaged in the kit. The link command in CALIBRATE_LINK.COM uses the link qualifier /EXECUTABLE=PCSI$DESTINATION:[SYSEXE]CALIBRATE.EXE to create the image file.

#7

file "[EXAMPLES.C_CODE]ERROR--42-49.C" ;

      

The relative file specification in the FILE statement above is enclosed in quotes because the file name contains consecutive hyphen characters. A double hyphen usually indicates a comment delimiter in the PDF, unless it is part of a quoted string.

#8

if (<software HP AXPVMS VMS version minimum V7.1 version below A7.2>) ;
        file [syslib]debugshr.exe source [syslib]debugshr_v71.exe ;
    else if (<software HP AXPVMS VMS version minimum A7.2>) ;
        file [syslib]debugshr.exe source [syslib]debugshr_v72.exe ;

      

The PDL statements above conditionally provide a file named DEBUGSHR.EXE based on the version of the OpenVMS operating system that is installed. Separate shareable images linked to run on OpenVMS Version 7.1 and OpenVMS Version 7.2 (or later) are packaged in the kit. If the version of OpenVMS is at least Version 7.1, the appropriate image is selected and installed as DEBUGSHR.EXE.


HARDWARE DEVICE

The HARDWARE DEVICE statement identifies a required hardware device that must be present in the execution environment. If the device is not present, the utility prompts the user either to continue or to terminate the operation.

The HARDWARE DEVICE function tests whether a specified device is present. The value is true if the device is present; otherwise, the value is false.


Statement Syntax

HARDWARE DEVICE name ;


Function Syntax

< HARDWARE DEVICE name >


Parameter

name

Indicates the device name of the hardware device. You must include the colon (:) at the end of the device name.

Description

Statement

The HARDWARE DEVICE statement specifies a required hardware device. If the device is not present, the utility prompts the user to continue or to terminate the operation.

If the operation executes in batch mode and requires user interaction, the operation terminates.

Function

The HARDWARE DEVICE function tests whether the specified device is present. The value is true if the device is present; otherwise, the value is false.

See Also IF

Examples

#1

hardware device LPA0: ;
      

The HARDWARE DEVICE statement in this example specifies that if the device named LPA0: is not present in the execution environment, then the utility displays a message prompting the user either to continue or to terminate the operation.

#2

if (<hardware device GAA0:>) ;
    file [SYSEXE]SMFDRIVER.EXE ;
end if ;
      

The HARDWARE DEVICE function in this example provides the file [SYSEXE]SMFDRIVER.EXE if the device GAA0: is present.


HARDWARE PROCESSOR

The HARDWARE PROCESSOR statement identifies a system processor model that must be present in the execution environment. If the model is not present, the utility prompts the user either to continue or to terminate the operation.

The HARDWARE PROCESSOR function tests whether the specified system processor model is present. The value is true if the model is present; otherwise, the value is false.


Statement Syntax

HARDWARE PROCESSOR MODEL (model,...) ;


Function Syntax

< HARDWARE PROCESSOR MODEL (model,...) >


Parameter

MODEL (model,...)

Indicates processor model identifiers as integer values. You can obtain the processor model number by using the DCL lexical function F$GETSYI("CPU").

Description

Statement

The HARDWARE PROCESSOR statement specifies a system processor model. If the model is not present, the utility prompts the user to either continue or terminate the operation.

If the operation executes in batch mode and requires user interaction, the operation terminates.

Function

The HARDWARE PROCESSOR function tests whether the specified system processor model is present. The value is true if the model is present; otherwise, the value is false.

See Also IF

Example

Suppose the PDF contains the following lines:

if (<hardware processor model 7>) ;
    error UNSPROC ;
end if ;

      

You would have an UNSPROC module in the PTF similar to the following:


1 UNSPROC
=prompt Not supported on MicroVAX I.
This product is not supported on the MicroVAX I processor.

      

If the processor model is 7, the system displays a message supplied by the text module UNSPROC indicating that the product is not supported on the MicroVAX I computer. The user is then prompted to continue or terminate the operation.


IF

The IF statement conditionally processes a group of statements based on the evaluation of an expression. The IF, ELSE, ELSE IF, and END IF statements are used together to form an IF group.

Syntax

IF expression; PDL-statements

[ [ ELSE IF expression; PDL-statements ] ...]

[ ELSE; PDL-statements ]

END IF ;


Parameter

expression

Indicates the condition you want to test. An expression is used to produce a Boolean value based on the evaluation of the condition. It is delimited by opening and closing parentheses (...). It contains one or more of the following PDL functions:
  • <HARDWARE DEVICE>
  • <HARDWARE PROCESSOR>
  • <LOGICAL NAME>
  • <OPTION>
  • <SOFTWARE>
  • <UPGRADE>
Optionally, the expression also contains one or more of the keywords AND, OR, and NOT, which are used as logical operators. An expression has one of the following forms, where each term is either another expression or a function:
  • (term)
  • (term AND term)
  • (term OR term)
  • (NOT term)

Option

PDL-statements

Any product description language statement or a group of statements described in this reference section, except the PRODUCT and END PRODUCT statements.

Required Terminator

END IF ;


Description

The IF group conditionally processes a group of statements based on the evaluation of an expression. The utility executes the statements contained in the IF group up to the first occurrence of an ELSE IF statement (if present), an ELSE statement (if present), or END IF statement if the expression evaluates to true. The utility skips these statements if the expression evaluates to false.

ELSE IF

The ELSE IF statement is valid only if it is immediately contained in an IF group and is not lexically preceded by an ELSE statement.

The utility executes the statements lexically contained in the IF group between the ELSE IF statement and the next occurrence of an ELSE, ELSE IF, or END IF statement if all of the following conditions exist:

  • The result of evaluating the expression in the IF statement is false.
  • The result of evaluating the expression in all lexically preceding ELSE IF statements in the same IF group (if present) is false.
  • The result of evaluating the ELSE IF expression is true.

If any of these conditions are not satisfied, the utility also does not execute statements lexically contained in the IF group between the ELSE IF statement and the next occurrence of an ELSE, ELSE IF, or END IF statement.

ELSE

The ELSE statement is valid only if it is immediately contained in an IF group and is the only ELSE statement in the IF group. The utility executes the statements following the ELSE statement (in the same IF group) if both of the following conditions exist:

  • The result of evaluating the expression in the IF statement is false.
  • The result of evaluating the expression in all lexically preceding ELSE IF statements in the same IF group (if present) is false.


Previous Next Contents Index