@

From VSI OpenVMS Wiki
Jump to: navigation, search

@ is a DCL command that redirects SYS$INPUT to the filespec that follows it. This is most commonly used to execute command procedures and specify input files for the preceding commands.

Syntax

@  filespec [parameter[,...]]

filespec

Specifies either the input device or the file for the preceding command, or the command procedure to be executed. The default file type is .COM. The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

parameter

Specifies from one to eight optional parameters to pass to the command procedure. The symbols (P1, P2, . . . P8) are assigned character string values in the order of entry.

Setting bit 3 of DCL_CTLFLAGS to 1 specifies from one to sixteen optional parameters to pass to the command procedure. The symbols (P1, P2, . . . P16) are assigned character string values in the order of entry. If you clear the bit 3 of DCL_CTLFLAGS, the default parameters are set (that is, (P1, P2, . . . P8)).

The symbols are local to the specified command procedure. Separate each parameter with one or more blanks. Use two consecutive quotation marks ("") to specify a null parameter. You can specify a parameter with a character string value containing alphanumeric or special characters, with the following restrictions:

The command interpreter converts alphabetic characters to uppercase and uses blanks to delimit each parameter. To pass a parameter that contains embedded blanks or literal lowercase letters, place the parameter in quotation marks.

If the first parameter begins with a slash (/), you must enclose the parameter in quotation marks (" ").

To pass a parameter that contains literal quotation marks and spaces, enclose the entire string in quotation marks and use two consecutive quotation marks within the string. For example, the command procedure TEST.COM contains the following line:

$ WRITE SYS$OUTPUT P1

Enter the following at the DCL prompt ($):

$ @TEST "Never say ""quit"""

When the procedure TEST.COM executes, the parameter P1 is equated to the following string:

Never say "quit"

If a string contains quotation marks and does not contain spaces, the quotation marks are preserved in the string and the letters within the quotation marks remain in lowercase. For example, enter the following at the DCL prompt:

$ @TEST abc"def"ghi

When the procedure TEST.COM executes, the parameter P1 is equated to the following string:

ABC"def"GHI

To use a symbol as a parameter, enclose the symbol in single quotation marks (` ') to force symbol substitution. For example:

$ NAME = "JOHNSON"
$ @INFO 'NAME'

The single quotation marks cause the value "JOHNSON" to be substituted for the symbol NAME. Therefore, the parameter "JOHNSON" is passed as P1 to INFO.COM.

$ CREATE QUALIFIERS.COM
/DEBUG/SYMBOL_TABLE/MAP/FULL/CROSS_REFERENCE
<Ctrl/Z>

$ LINK SYNAPSE@QUALIFIERS
 

This example shows a command procedure, QUALIFIERS.COM, that contains qualifiers for the LINK command. When you enter the LINK command, specify the command procedure immediately after the file specification of the file you are linking. Do not type a space between the file specification and the @ command.

$ CREATE SUBPROCES.COM
$ RUN 'P1' -
 /BUFFER_LIMIT=1024 -
 /FILE_LIMIT=4 -
 /PAGE_FILES=256 -
 /QUEUE_LIMIT=2 -
 /SUBPROCESS_LIMIT=2 -
'P2'  'P3'  'P4'  'P5'  'P6'  'P7'  'P8' 'P9'
'P10' 'P11' 'P12'  'P13'  'P14'  'P15'  'P16'
<Ctrl/Z>

$ @SUBPROCES  LIBRA  /PROCESS_NAME=LIBRA
 

This example shows a command procedure named SUBPROCES.COM. This procedure issues the RUN command to create a subprocess to execute an image and also contains qualifiers defining quotas for subprocess creation. The name of the image to be run is passed as the parameter P1. Parameters P2 to P16 can be used to specify additional qualifiers. This is applicable if bit 3 of DCL_CTLFAGS is set to 1. In this example, the file name LIBRA is equated to P1; it is the name of an image to execute in the subprocess. The qualifier /PROCESS_NAME=LIBRA is equated to P2; it is an additional qualifier for the RUN command.