HP OpenVMS Systems Documentation
OpenVMS User's Manual
2.4 Entering Parameters
File specifications are the most common type of parameter. DCL commands can accept input file specifications (files that are acted upon by a command) and output file specifications (files that are created by a command).
The following rules apply when specifying parameters in a command line:
The following example shows how to copy the input file LISTS.TXT to the output file FORMAT.TXT:
The following example line shows how you can enter a list of file specifications as the parameter:
The following example shows how to specify a list of parameters. Here, three files are copied to a fourth file. The three file specifications, PLUTO.TXT, SATURN.TXT, and EARTH.TXT, constitute the first parameter. PLANETS.TXT is the second parameter. Note that there are no spaces (although they could have been inserted) between the PLUTO.TXT, SATURN.TXT, and EARTH.TXT file specifications.
2.5 Entering Qualifiers
There are three types of qualifiers:
You can abbreviate any qualifier name as long as the abbreviated name remains unique among all qualifier names for the same command. However, to ensure that your command procedures are upwardly compatible, do not abbreviate commands and qualifiers in command procedures.
Commands have default qualifiers; you do not have to specify a
qualifier unless it is different from the command default. The
following sections describe types of qualifiers and qualifier defaults.
The OpenVMS DCL Dictionary contains default information for specific commands.
A command qualifier modifies a command and can appear anywhere in the command line. However, it is a good practice to place the qualifier after the command name. If you are specifying multiple qualifiers, you should place a command qualifier with other command qualifiers that follow the command name.
2.5.2 Positional Qualifiers
A positional qualifier can modify commands or parameters and has different meanings depending on where you place it in the command string. If you place a positional qualifier after the command but before the first parameter, it affects the entire command string. If you place a positional qualifier after a parameter, it affects only that parameter.
In the following example, the first PRINT command requests two copies of the files SPRING.SUM and FALL.SUM. The second PRINT command requests two copies of the file SPRING.SUM but only one copy of FALL.SUM.
2.5.3 Parameter Qualifiers
A parameter qualifier can be used only with certain types of parameters, such as input files and output files. For example, the BACKUP command accepts several parameter qualifiers that apply only to input and output file specifications.
In the following example, the /CREATED and /BEFORE qualifiers, which can be specified only with input files, select specific input files for the backup operation. The asterisk (*) is a wildcard character that replaces the file name. BACKUP selects all files with the .TXT file type that were created before December 11, 2002.
2.5.4 Conflicting Qualifiers
If you use two or more contradictory qualifiers on a command line, the right-most qualifier overrides the others.
Some commands contain conflicting qualifiers that cannot be specified in the same command line. If you use incompatible qualifiers, the command interpreter displays an error message.
Following is an example of conflicting qualifiers. Note that the PRINT command accepts only the /COPIES=2 and the /NOBURST qualifiers because they are the right-most qualifiers in the command line:
2.5.5 Values Accepted by Qualifiers
Qualifiers can accept keywords, file specifications, character strings, and numeric values. When you enter a value for a qualifier, separate the qualifier and the value with either an equal sign (=) or a colon (:).
Some qualifier keywords require additional information. In these cases, separate the keyword from its value with a colon or an equal sign.
To specify multiple keywords that require values, enclose the list in parentheses and separate the keyword and value with either an equal sign (=) or a colon (:).
Either command in this example is valid:
This is an example of a qualifier that requires additional information; the keyword "PROTECTION" is separated from its value by a colon or an equal sign (=):
This is an example of a qualifier that requires multiple keywords, each of which require multiple values:
2.6 Entering Dates and Times as Values
Certain commands and qualifiers (such as the PRINT/AFTER command) accept date and time values. You can specify these values in one of the following formats:
2.6.1 Absolute Time Format
Absolute time is a specific date or time of day. The format for absolute time is as follows:
The fields are as follows:
The following rules apply when specifying absolute time:
You can also specify an absolute time as one of the following keywords:
The following table shows examples of absolute time specifications:
2.6.2 Delta Time Format
Delta time is an offset (a time interval) from the current date and time to a time in the future. The general format of a delta time is as follows:
The fields are as follows:
If a qualifier is described as a value that can be expressed as an absolute time, a delta time, or a combination of the two, you must specify a delta time as if it were part of a combination time. For example, to specify a delta time value of five minutes from the current time, use "+:5" (not "0-0:5").
The following rules apply when specifying delta time:
The following table shows some examples of delta time specifications:
2.6.3 Combination Time Format
To combine absolute and delta times, specify an absolute time plus or minus a delta time. Use one of the following formats:
The following rules apply when specifying combination time:
The following table shows some examples of combination time specifications:
2.7 Recalling Commands
At the DCL prompt, you can recall previously typed command lines to avoid retyping long command lines. Once a command is displayed, you can reexecute or edit it.
On OpenVMS VAX systems, the recall buffer holds up to 20 previously entered commands.
On OpenVMS Alpha systems, the recall buffer holds up to 254 previously entered commands.
2.7.1 Pressing Ctrl/B
Pressing Ctrl/B once recalls the previous command line. Pressing Ctrl/B
again recalls the line before the previous line and so on to the last
saved command line.
Using the up arrow and down arrow keys recalls the previous and
successive command, respectively. Press the arrow keys repeatedly to
move through the commands.
To examine previously typed command lines, type RECALL/ALL. After reviewing the available commands, you can recall a particular command line by typing RECALL and the number of the desired command.
You can also follow RECALL with the first characters of the command line you want to display. RECALL scans the previous command lines (beginning with the most recent one) and Enters the first command line that begins with the characters you typed.
This is a sample display generated by typing RECALL/ALL:
The following example shows how to recall the fourth command line:
After you press Enter, the system displays the fourth command in the list at the DCL prompt. (The RECALL command itself is not placed in the buffer.)
The following example shows how to recall a previously entered command, EDIT ACCOUNTS.COM:
After you press Enter, the system displays the following command line:
To erase the contents of the recall buffer, enter the RECALL command with the ERASE qualifier. For example:
For security reasons, it is good practice to erase the contents of the
recall buffer after you have entered commands that include passwords.
At the DCL command level, you can use many individual keys and key sequences to change what you type. Although different types of terminals have different operating characteristics, most have standard function keys and keys that can be used with line editors.
To see whether line editing is enabled, enter the SHOW TERMINAL command.
In the following example, line editing is enabled:
2.8.1 SET TERMINAL Command
You can use the SET TERMINAL command to alter the way in which your terminal edits a DCL command line. By default, changes made with the SET TERMINAL command apply only to the current session. To set the terminal each time you log in, you can include SET TERMINAL commands in your LOGIN.COM file.
To enable line editing, enter the SET TERMINAL/LINE_EDIT command:
You can edit a command line in either insert or overstrike mode. In insert mode, the character you type is inserted to the left of the cursor. In overstrike mode, the character you type overwrites the character indicated by the cursor.
To change editing modes for a single command line, press Ctrl/A (Ctrl/A acts as a toggle). To change edit modes for your session, enter either the SET TERMINAL/INSERT or SET TERMINAL/OVERSTRIKE command.
If you use the SET TERMINAL/WRAP command, when you enter more characters than will fit on one line of the screen, the text wraps to the next line. If you use the SET TERMINAL/NOWRAP command, when you enter more characters than will fit on one line of the terminal screen, the last character on the line is typed over.
You can edit only the line where your cursor appears. When text wraps, you cannot use the up arrow key to move the cursor up to edit the previous line. To move the cursor up to the previous line, use the Delete key and delete all the characters in the current line.