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$SYLOGIN.COM in the execution environment using the contents of the file [SYSMGR]DECW$SYLOGIN.TEMPLATE from product material packaged in the kit. You do not have to specify the source file with a separate file statement. The PACKAGE command always requires a /MATERIAL qualifier.

#5

file [SYSMGR]DECW$SYSTARTUP.COM generation 56 archive ;
      

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 DEC AXPVMS VMS version minimum V7.1 version below A7.2>) ;
        file [syslib]debugshr.exe source [syslib]debugshr_v71.exe ;
    else if (<software DEC 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 V7.1 and OpenVMS V7.2 (or later) are packaged in the kit. If the version of OpenVMS is at least V7.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, 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 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>
and, optionally, 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.

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

Examples

#1

if (<software DEC 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 Compaq DECwindows is present, the utility provides the file [SYSEXE]PRO$DW_SUPPORT.EXE.
  • If Compaq DECwindows is not present and Compaq DECwindows Motif is present, the utility provides the file [SYSEXE]PRO$MOTIF_SUPPORT.EXE.
  • If neither Compaq DECwindows nor Compaq 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.


infer

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.

Syntax

infer
{ available from { install file | logical name logical_name } |
version from file } ;


Parameters

file

Indicates the relative file specification of the file you want to test.

logical_name

Indicates the logical name you want to test.

Description

The 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.
See Also scope

Examples

#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.


information

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.

Syntax

information name
[ [no] confirm ]
[ phase { after | before } ]
[ with helptext ] ;


Parameter

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.

Options

[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.

Description

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.

By 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.

See Also part
process parameter
system parameter

Example

Suppose the product text file for Compaq 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 Compaq Rdb for OpenVMS monitor must be stopped before installation

The Compaq Rdb for OpenVMS monitor must be stopped before you install Compaq 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 Compaq Rdb for OpenVMS available.

The release notes for Compaq 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 Compaq 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 Compaq Rdb for OpenVMS monitor must be stopped before installation

The Compaq Rdb for OpenVMS monitor must be stopped before Compaq 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.


link

The link statement specifies a second directory entry for a file or directory.

Syntax

link name from source ;


Parameters

name

Indicates the file specification of the second directory entry.

from source

Indicates the file specification of an existing directory entry for the file or directory. The parameter string must be a single quoted or unquoted string. The referenced file or directory must be defined by a directory or file statement in the same product description.

Description

The link statement specifies a second directory entry for a file or directory. The managed object type of the file with the second directory entry is "link".

The scope and lifetime of the link managed object depend on whether it is contained in a scope group, as shown in Table 7-6.

Table 7-6 Link Managed Object Scope and Lifetime
Type of Scope Group Lifetime Scope
Product Product Product
Global Assembly Global
Bootstrap Operating Bootstrap
Processor Operating Processor

If the link statement is not contained in a scope, end scope pair or is contained in a scope product group, the link managed object has product lifetime and product scope.

Managed object conflict is unrecoverable.

See Also directory
file
scope

Examples

#1

file [SYS$EXE]FMS.EXE;
link [SYSEXE]FMS.EXE from [SYS$EXE]FMS.EXE ;
      

The statement in this example specifies that the file [SYSEXE]FMS.EXE is linked to the file [SYS$EXE]FMS.EXE. Both files, [SYS$EXE]FMS.EXE and [SYSEXE]FMS.EXE, have the same file ID.

#2

directory [ABC] ;
directory [DEF] ;

link [DEF]ABC.DIR from [000000]ABC.DIR;
      

This example illustrates how to create a second directory entry [DEF.ABC] for a directory [ABC].


Previous Next Contents Index