DECK

From VSI OpenVMS Wiki
Revision as of 10:58, 2 December 2019 by Jane.doe (talk | contribs) (Created page with "'''DECK''' is a DCL command that marks the beginning of an input stream for a command or program. It can be used to create files from within a command procedur...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DECK is a DCL command that marks the beginning of an input stream for a command or program. It can be used to create files from within a command procedure. DECK is a command executed inside DCL; no image is invoked.

Syntax

DECK

Qualifier

/DOLLARS sets the EOF indicator to the specified string of 1 to 15 characters. Specify a string if the input data contains one or more records beginning with the string $EOD. Enclose the string in quotation marks (" ") if it contains literal lowercase letters, multiple blanks, or tabs. If you do not specify /DOLLARS or if you specify /DOLLARS without specifying a string, you must use the EOD command to signal the end-of-file (EOF). A single dollar sign is not allowed as the end-of-deck or file indicator.

Example

$ CREATE CREATE_FILE.COM
$ CREATE FILE.LIS
$ DECK
File data
File data
$ EOD
$ <Ctrl/Z pressed>
$
$ @CREATE_FILE
$ TYPE FILE.LIS
File data
File data
 

The example above illustrates creating a command procedure that creates a file, running it, and then displaying the contents of a file.

$ type create_file.lis
$ create file.lis
$ deck/dollars="The end"
File data
File data
The end
$ exit
[End of file]
$ $ @create_file
$ type file.lis
File data
File data
 

The example above illustrates the use of /DOLLARS with the DECK command.