Parts of a DCL Command

DCL commands consist of four main elements: verbs, qualifiers, parameters, and sometimes keywords.

The functions of these elements can be remembered using the following guidelines: verbs describe what to do, qualifiers describe how to do it, and parameters describe what objects to act on.

Keywords sometimes behave like parameters and other times serve as qualifier values. They are discussed later.

Consider this example:

     $ PRINT SCHEDULE.LIS/COPIES=4 

In the example above, PRINT is the verb. Verbs appear first and tell DCL the action you wish to perform—in this case, to print a file.

SCHEDULE.LIS is a parameter. In this case, it is the file you wish to print. Parameters appear after verbs and are preceded by a space. Some commands accept more than one parameter, as will be shown in upcoming examples.

/COPIES=4 is a qualifier specifying that you wish to print four copies. If /COPIES is not specified, a default value of one copy will be assumed. Qualifiers are preceded by a slash (/) and can appear in more than one place on a command line. When they appear in different places, they sometimes have different meanings, as is shown in the following example.

This command

     $ PRINT SCHEDULE.LIS/COPIES=4 

is equivalent to the following command:

     $ PRINT/COPIES=4 SCHEDULE.LIS 

Now, let's consider the same basic command, but with some variations that demonstrate how the position of qualifiers can change the meaning of a command.

     $ PRINT/COPIES=2 SCHEDULE.LIS,PAYROLL.DAT 

The above example places the qualifier /COPIES=2 just after the verb. When it appears after the verb, it is applied to each parameter. Two copies of each file, SCHEDULE.LIS and PAYROLL.DAT, will be printed.

Compare that with the next example:

     $ PRINT SCHEDULE.LIS,PAYROLL.DAT/COPIES=2 

This example places the qualifier /COPIES=2 after a parameter. When appearing after a parameter, it affects only that parameter. In this example, one copy of SCHEDULE.LIS and two copies of PAYROLL.DAT will be printed.

A qualifier whose behavior is dependent upon where it appears is known as a positional qualifier. A qualifier that behaves the same way regardless of its position is called a command qualifier or global qualifier.

An example of a command qualifier for the PRINT command is the /QUEUE qualifier. It carries the same meaning in each of the following two commands:

     $ PRINT SCHEDULE.LIS,PAYROLL.DAT/QUEUE=PRINTER2     $ PRINT/QUEUE=PRINTER2 SCHEDULE.LIS,PAYROLL.DAT 

Both files will be printed on PRINTER2.



Getting Started with OpenVMS(c) A Guide for New Users
Getting Started with OpenVMS: A Guide for New Users (HP Technologies)
ISBN: 1555582796
EAN: 2147483647
Year: 2005
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net