This document, the "VAX/VMS Guide to Using Command Procedures" published in March 1980, serves as a comprehensive manual for VAX/VMS users interested in developing and managing command procedures using the DIGITAL Command Language (DCL).
Purpose: The manual presents key concepts and techniques for creating both simple and sophisticated command procedures. It aims to help users automate frequently used command sequences, define batch job streams, pass parameters, test status values, process files, and perform other program-like tasks, thereby saving keystrokes and enabling complex operations akin to high-level programming languages.
Audience: It is intended for all VAX/VMS operating system users. The document is not standalone and assumes prior understanding of basic VAX/VMS concepts and the DCL Command Language, building upon information found in other Digital Equipment Corporation manuals.
Key Topics Covered:
- Developing Command Procedures: Covers the process of creating, formatting, documenting, executing (interactively, batch, nested, and via login files), testing, debugging, and maintaining command procedures.
- Controlling I/O: Explains how to manage input to and output from command procedures, including system-defined logical name equivalences (SYS$INPUT, SYS$OUTPUT, SYS$ERROR, SYS$COMMAND, SYS$DISK, SYS$LOGIN) and their redefinition.
- Using Symbols: Details the definition and manipulation of command symbols (local and global), including equating them to character strings, numeric, and logical expressions, and passing parameters to procedures.
- Symbol Substitution: Describes the mechanism by which the command interpreter replaces symbol names with their current values, covering automatic, repetitive, and recursive substitution, and handling undefined symbols.
- Lexical Functions: Introduces DCL's lexical functions for obtaining information about the current process (e.g., mode, directory, time, user ID, verify status) and manipulating character strings (e.g., length, locate, extract) and binary data.
- Controlling Execution Flow: Explains how to use DCL commands such as IF, GOTO, EXIT, and STOP to control the sequence of command execution and create loops within procedures.
- Error and Interrupt Handling: Discusses methods for establishing error condition routines based on system status values ($STATUS, $SEVERITY) and handling CTRL/Y interrupts during command procedure execution.
- File Manipulation: Describes techniques for creating, reading, and writing sequential files using DCL commands (OPEN, READ, WRITE, CLOSE) and communicating with process-permanent files.
- Controlling Batch Jobs: Covers how the system executes batch jobs, managing job queues, handling batch job output, and synchronizing batch job execution.
- Annotated Examples: An appendix provides complete command procedure examples to illustrate the techniques and concepts discussed throughout the manual.