HP OpenVMS DCL Dictionary


Previous Contents Index


SET PREFIX

Allows you to set a prefix control string for verified command lines.

Format

SET [NO]PREFIX string


Parameter

string

Specifies the FAO control string to be used in generating a prefix to a verified command line. The following rules apply:

Description

The SET PREFIX command allows you to prefix verified command lines with a custom string. This string is a limited FAO control string that specifies date and time information as well as constant information and formatting controls (that is, tabs, form feeds, and so on). For example, this allows you to use a full date and time prefix (a time stamp) to identify batch runs and to verify that a batch job ran at the expected time.

See the documentation on the F$FAO lexical function for more information about FAO control strings.

The first line of a verified command is prefixed with the result of the control string. The control string is evaluated before the command itself is executed. Any continuation lines are prefixed with a blank string in order to make them flush with the first line of the command. Command input and output are not prefixed. The prefix control string can later be retrieved by using VERIFY_PREFIX with F$ENVIRONMENT.


Example


$ SET VERIFY
$ @TEST
$ SET DEFAULT SYS$LOGIN
$ SHOW DEFAULT
  USER$:[JENSEN]
$ SET PREFIX "(!5%T) "
$ @TEST
(17:52) $ SET DEFAULT SYS$LOGIN
(17:52) $ SHOW DEFAULT
  USER$:[JENSEN]
 
      

This example demonstrates the difference between having and not having a prefix for verification. The first command turns on verification. (Verification must be turned on to see the prefix.) The second command invokes a test procedure to show what the output looks like without a prefix. The third and fourth lines reflect the contents of the test procedure invoked in the preceding command. The third command sets the prefix to an FAO control string so that the first five characters of the standard time will be shown for each command. The last command invokes the test procedure again to demonstrate what the output looks like with a prefix.


Previous Next Contents Index