SET PREFIX

From VSI OpenVMS Wiki
Jump to: navigation, search

SET PREFIX is a DCL command that allows you to set a prefix control string for verified command lines.

Syntax

SET [NO]PREFIX  string

String

Specifies the FAO() control string to be used in generating a prefix to a verified command line. The following rules apply:
  • No more than 64 characters are allowed in the control string.
  • The resulting string can be no longer than 64 characters.
  • Basic formatting FAO directives can be used ("!/", "!_", "!^", "!!", "!%F", and "!n*c").
  • Time and date FAO directives can be used ("!%T" and "!%D").
  • Repeat counts can be used ("!n(DD)").
  • Output field length specifications can be used ("!lengthDD").
  • Combination of repeat count and output field length can be used ("!n(lengthDD)").
  • FAO directives that require arguments will always receive a value of zero.

Examples

$ SET VERIFY                        !1
$ @TEST                             !2
$ SET DEFAULT SYS$LOGIN             !3
$ SHOW DEFAULT                      !4
  USER$:[JENSEN]                    !5
$ SET PREFIX "(!5%T) "              !6
$ @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 sixth line 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.