* * **** * * * * * * * * * * * * * * **** ***** E X T E N D E D C O M M A N D L A N G U A G E U S E R S M A N U A L version 2.0 Kenneth E. Budnik Nov 1, 1982 GenRad, Inc. 300 Baker Ave. Concord, MA. 01742 Contents page CHAPTER 1 -- INTRODUCTION TO XCL 1.1 Introduction . . . . . . . . . . . . . . . . . . . . 1-1 1.2 Documentation Conventions . . . . . . . . . . . . . 1-2 CHAPTER 2 -- USING XCL 2.1 Invoking XCL . . . . . . . . . . . . . . . . . . . . 2-1 2.2 Exiting from XCL . . . . . . . . . . . . . . . . . . 2-1 2.3 Displaying HELP information . . . . . . . . . . . . 2-2 2.4 Entering Commands . . . . . . . . . . . . . . . . . 2-2 2.5 Repeating the latest command . . . . . . . . . . . 2-2 CHAPTER 3 -- XCL COMMAND EDITING 3.1 Moving the Cursor . . . . . . . . . . . . . . . . . 3-1 3.2 Inserting characters into a command . . . . . . . . 3-1 3.3 Deleting parts of a command . . . . . . . . . . . . 3-1 CHAPTER 4 -- XCL COMMAND QUEUE 4.1 XCL Command Queue . . . . . . . . . . . . . . . . . 4-1 4.2 Recalling previously typed commands . . . . . . . . 4-2 4.3 Deleting commands from the queue . . . . . . . . . . 4-2 4.4 Inserting commands into the queue . . . . . . . . . 4-2 4.5 Modifying commands in the queue . . . . . . . . . . 4-3 4.6 Displaying the command queue . . . . . . . . . . . . 4-3 CHAPTER 5 -- XCL EXTENDED COMMANDS 5.1 XCL Extended Commands . . . . . . . . . . . . . . . 5-1 5.2 Erasing Files . . . . . . . . . . . . . . . . . . . 5-1 5.3 Recovering Files . . . . . . . . . . . . . . . . . . 5-2 5.4 Suspending XCL Execution . . . . . . . . . . . . . . 5-2 5.5 Halting XCL Execution . . . . . . . . . . . . . . . 5-3 5.6 Logging off the system . . . . . . . . . . . . . . . 5-3 CHAPTER 6 -- XCL INITIALIZATION 6.1 XCL Initialization File . . . . . . . . . . . . . . 6-1 6.2 Redefining XCL Extended Commands . . . . . . . . . . 6-1 6.3 Changing the Command Queue Length . . . . . . . . . 6-2 APPENDICES A. XCL Restrictions . . . . . . . . . . . . . . . . . . A-1 B. Summary of XCL Functions and Commands . . . . . . . B-1 C. XCL HELP Screen . . . . . . . . . . . . . . . . . . C-1 Chapter 1 -- Introduction to XCL 1.1 Introduction XCL is an extended command language for use with the VMS operating system. XCL provides an interface between the user and DCL to allow the implementation of features which are not provided by DCL. XCL was designed to achieve three main goals: 1) to provide editing capability for modifying command lines before they are issued. 1) to store previously entered commands and allow them to be edited and reissued. 2) to provide a number of extensions to DCL such as the ability to recover erased files. XCL provides complete editing capabilities to allow modification of the displayed command line. The cursor can be moved to any point in the command and text inserted or deleted. Cursor movement and text deletion can be accomplished on a character, word or line basis. XCL maintains a queue of the last twelve commands issued. Any of the commands in the queue can be recalled, edited (if desired), and then reissued. Recalled commands can be reissued in sequence to allow the repetition of a commmon sequence of commands. XCL provides the ability to recover erased files. All files erased using the XCL ERASE command are saved by XCL until the user logs off the system -- any file which is erased can be recovered with the RECOVER command. Chapter 1 -- Introduction to XCL 1.2 Documentation Conventions The following documentation conventions are used in this manual: ctrl/x a control character typed by holding down the "control" key while typing the "x" key. an ASCII control character ,e.g. = line feed. the "enter" key on the auxiliary keypad kp/x auxiliary keypad key "x" ^ up arrow key v down arrow key -> right arrow key <- left arrow key Chapter 2 -- Using XCL 2.1 Invoking XCL To invoke XCL type the command XCL. XCL can be invoked automatically whenever the user logs onto the system by inserting the following command into the user's login command file: $ IF F$MODE .EQS. "INTERACTIVE" THEN XCL XCL uses a # (pound sign) as its prompt. XCL will accept any DCL commands as well as the XCL extended commands. 2.2 Exiting From XCL There are three methods of exiting XCL depending on whether the user wishes to temporarily suspend XCL, permanently exit XCL or log off the system. To temporarily suspend execution of XCL use the command "DCL". The DCL command will suspend XCL and return control to DCL but all status information is retained so that XCL can be restarted in exactly the same state as before suspension. To permanently exit from XCL and return control to DCL type the command "EXIT" in response to the XCL # prompt. If XCL has been exited in this manner it can be restarted by typing the XCL command, however, any files which were erased during the previous session will no longer be recoverable. Note that EXIT must be entered from the keyboard. An EXIT command encountered in a command file will terminate execution of that file and return control to XCL. To log off the system use the command "LOGOUT". This command will carry out the necessary cleanup operations before exiting XCL and logging off the system. See Chapter 5 for further descriptions of the DCL, EXIT and LOGOUT commands. XCL cannot be exited by typing "STOP". XCL checks for the STOP command and ignores it. However, if a command file is executed under XCL and a STOP command is encountered then the command file and XCL will both be stopped and control will be returned to DCL. When using XCL all command files should terminate execution with an EXIT command to return control to XCL. Ctrl/C and ctrl/Y are ignored by XCL. However, typing ctrl/C or ctrl/Y during program execution or command execution will abort execution of that program or command and return control to XCL. Chapter 2 -- Using XCL 2.3 Displaying Help Information XCL will display a help screen whenever the HELP key is pressed. The HELP key is the GOLD (PF1) key on the auxiliary keypad. The HELP screen displays the layout of the function keys and lists the extended XCL commands. See Appendix C for a listing of the HELP screen. 2.4 Entering Commands Commands are entered into XCL just as they are entered into DCL. In addition, XCL provides a number of editing extensions to save typing time. XCL places three restrictions on command format: 1) each command is limited to 77 characters maximum. 2) each command must be complete on a single line. 3) all mandatory parameters must be supplied with the command. XCL provides three separate command terminators -- the key, the key and the key. All three will cause the displayed command to be executed. They differ in whether or not the displayed command is stored into the command queue and on how the queue pointer is advanced after command execution. See Chapter 4 on the Command Queue for further explanation. 2.5 Repeating the Latest Command The latest command can be reissued by using the = function. This function must be typed in response to the # prompt as the only character on the line. XCL will redisplay the previous command line in place of the = and immediately issue the command to DCL. The function will be executed immediately and does not need to be terminated. Note that this function repeats the last command which was issued to DCL, not the last command stored in the queue. This function does not use or change the queue or queue pointer. Chapter 3 -- XCL Command Editing 3.1 Moving the Cursor XCL provides a number of cursor movement functions to allow easy editing of the displayed command line. It is possible to move forward and backward by one character, one word, or the entire line by pressing a single key. For cursor movement a word is defined as a string of alpha-numeric characters including the asterisk. (Note that this definition differs from the delete word function definition). The XCL functions for cursor movement are: kp/7 - move cursor to beginning of line kp/8 or - move cursor back one word kp/9 or - move cursor forward one word kp/- - move cursor to end of line <- - move cursor back one character -> - move cursor forward one character 3.2 Inserting Characters into a Command Any character typed on the keyboard which is not an XCL function or a control key will be inserted into the command at the current cursor position. Any characters in the command following the cursor position will be moved one space to the right to make room for the new character. When the displayed command reaches the maximum length then characters will no longer be inserted into the command line and the bell will be rung to indicate that the buffer is filled. 3.3 Deleting Part of a Command XCL provides functions to delete one character, one word or the entire command. When deleting a character it is possible to delete the current character (i.e. the character pointed to by the cursor) or the previous character. The delete word function defines a word as a single non-alphanumeric character or a contiguous string of alpha-numeric characters (including asterisks). (Note that this definition differs from the move word function definition). The XCL function keys for deletion are: kp/PF2 - delete entire command kp/PF3 - delete next word kp/PF4 - delete current character - delete previous character Chapter 4 -- XCL Command Queue 4.1 XCL Command Queue XCL maintains a circular queue of the last twelve commands typed. (The queue is actually thirteen entries long but one entry contains a null command to indicate the end of the queue). Any command(s) in the queue can be recalled, edited (if desired), and reissued. The length of the command queue can be changed by the user in the XCLINI.COM file (see Chapter 6). XCL maintains a queue pointer which points to one entry in the queue. If there is a command stored in that position in the queue then XCL will display it as if it had been typed by the user. Whenever the queue pointer is moved within the queue the stored command (if any) is displayed. XCL provides three command terminators -- the key, the key and the key. All three will cause the displayed command to be executed. They differ in whether or not the displayed command is stored into the command queue and on how the queue pointer is advanced after command execution. 1) The key advances the queue pointer to the end of the queue, stores the displayed command at the end of the queue, and then executes the displayed command. 2) The key advances the queue pointer to the end of the queue and executes the displayed command without storing it into the queue. 3) The key over-writes the previously stored command with the displayed command, executes the new command and then advances the queue pointer to the next command in the queue. The command in this queue position (if any) will then be displayed. The terminators are generally used in the following manner. Commands are normally terminated with the . This terminator is used to issue (or reissue) commands which will be saved at the end of the queue. The terminator is used to issue a command when the user does not want to store the command in the queue. The terminator is used to re-issue a sequence of commands from the queue or to change a command stored within the queue. When a recalled command is reissued with the key then the next command in the queue is automatically displayed at the next prompt. This allows a sequence of commands to be reissued with minimal typing. For example, it would be common to repeat the following sequence of commands: EDT TEST.MAR MACRO TEST LINK TEST RUN TEST Chapter 4 -- XCL Command Queue 4.2 Recalling Previously Typed Commands XCL provides functions to allow movement within the queue: kp/4 - move to first command in queue kp/5 or ^ - move to previous command kp/6 or v - move to next command kp/7 - move to end of queue If the queue pointer is positioned to the first command in the queue then the kp/5 or ^ keys have no effect. When the queue pointer is at the end of the queue (i.e. positioned to the null command) then the kp/6 or v keys have no effect and the # prompt is displayed in preparation for entry of a new command. Whenever the queue pointer is positioned to a command in the queue the command is displayed as if it had been typed by the user. The displayed command can be edited, if desired. Note that the editing is performed on the displayed command line and not on the copy of the command which is in the queue. The contents of the queue are not changed unless the edited command is issued with the key (or the "replace command" function is used). If the command is issued with the key or key then the copy of the command in the queue is not modified. 4.3 Deleting Commands from the Queue The "delete command" function (kp/1 key) is used to delete the current command from the command queue. All commands following it in the queue are moved up one position. 4.4 Inserting Commands into the Queue The "insert command" function (kp/2 key) is used to insert a command after the current position in the command queue. Note that the command is inserted into the queue but it is not executed. To use this function move to the command which the new command will follow in the queue, use the "delete line" function to clear the displayed command, type the new command and then insert it into the queue. The queue pointer is left pointing to the newly inserted command. This allows a sequence of commands to be inserted easily. If the command queue is full when the "insert command" function is issued then the top command in the queue is discarded. (Note that it is therefore impossible to insert a new command at the top of a full queue). Chapter 4 -- XCL Command Queue 4.5 Modifying Commands in the Queue The "replace command" function (kp/3 key) is used to replace or modify a command in the queue. To use this function move to the command to be replaced or modified, edit it (or delete it and type the new command) and then issue the "replace command" function. The displayed command will replace the previous command in the queue. Note that the command will not be executed. 4.6 Displaying the Command Queue The contents of the command queue may be displayed by using the "display command queue" function (kp/0 key). This function displays all commands in the queue and also moves the queue pointer to the end of the queue. Chapter 5 -- XCL Extended Commands 5.1 XCL Extended Commands XCL provides a number of extended commands. These commands are designed to provide features which are not supported by DCL. Normal DCL symbol substitution may not be used for an XCL extended command keyword. However, symbol substitution may be accomplished by typing a command of the form: # symbol :== 'keyword' where "symbol" is the symbol to be substituted and "keyword" is the extended command keyword. Note that the apostrophes are required around the extended command keyword. Symbol substitution may also be done in the XCLINI.COM startup command file (see Chapter 6). 5.2 Erasing Files One of the most useful features of XCL is the ability to recover an erased file. XCL maintains a copy of all erased files. These copies are not deleted until the user EXITs XCL or logs off the system so that it is possible to recover ERASED files during the current session. XCL provides the ERASE command to erase files. The format of the ERASE command is: ERAse filespec,... The filespec is any legal VMS file specification and may include wild carding. An explicit or wildcard version number is required in the file specification. The ERASE command may be abbreviated down to ERA. XCL creates a sub-directory named [.0XCL0] in the user's login directory to hold the copies of erased files. All files in the [.0XCL0] directory are deleted whenever XCL is exited by a ctrl/c or the LOGOUT command. The ERASE command works by issuing a COPY command to copy the specified file(s) to the [.0XCL0] directory followed by a DELETE command to delete the file(s) from the indicated or default directory. Chapter 5 -- XCL Extended Commands 5.3 Recovering Files XCL provides the RECOVER command for file recovery. The format of the RECOVER command is: RECover filename,... The filename indicates a file name, file extension and an optional version number. A full file specification may not be used -- no directory may be specified. Files can only be recovered to the current default directory. A file version number is optional in the RECOVER command. If a version number is specified then the indicated file is recovered. If no version number is specified then the indicated file in [.0XCL0] with the highest version number will be recovered. In either case, the exact version number is maintained regardless of any similarly named files in the default directory. The RECOVER command may be abbreviated down to REC. The RECOVER command works by issuing a COPY command to copy the specified file(s) from the [.0XCL0] directory to the current default directory. Note that RECOVER does not delete the file from the [.0XCL0] directory. 5.4 Suspending XCL Execution XCL can be suspended temporarily by issuing the command "DCL". This command exits XCL without disturbing any status information and without deleting the files in the [.0XCL0] directory. When XCL is restarted the complete previous status is restored and all previously erased files are still recoverable. The DCL command should only be entered at the keyboard. If a DCL command is encountered in a command file its effect is the same as an EXIT command. 5.5 Halting XCL Execution XCL can be halted by typing the command "EXIT". The EXIT command may be abbreviated to EXI. This command must be entered from the keyboard. An EXIT command encountered in a command file will cause the command file to terminate and control will be returned to XCL. The EXIT command will delete all files in the [.0XCL0] directory. Therefore, if XCL is restarted after an EXIT command any previously erased files will no longer be recoverable. Symbol substitution may not be used for the EXIT command. Chapter 5 -- XCL Extended Commands 5.6 Logging Off the System XCL provides the LOGOUT command to log off the system. The LOGOUT command may be abbreviated down to LO. The LOGOUT command provides for the following clean-up operations: 1) all files in the [.0XCL0] directory are deleted. 2) if the command file LOGOUT.COM exists in the user's login directory it is executed. 3) a DCL LOGOUT command is issued (if one was not executed in LOGOUT.COM). Chapter 6 -- XCL Initialization 6.1 XCL Initialization File -- XCLINI.COM The user may specify a startup command file containing commands to be executed whenever XCL is started. The use of this file is optional and it needs to exist only if the user wishes to change XCL defaults or to redefine the XCL extended commands. If the startup command file is used, then it must be named XCLINI.COM and must reside in the users login directory. 6.2 Redefining XCL Extended Commands Normal DCL symbol substitution may not be used for an XCL extended command keyword. However, symbol substitution may be accomplished by typing a command of the form: # symbol :== 'keyword' where "symbol" is the symbol to be substituted for and "keyword" is the extended command keyword. Note that the apostrophes are required around the extended command keyword. This command may also be entered into the XCLINI.COM command file in the user's login directory. An example of an XCLINI.COM file to allow substitution of DEL for ERASE and BYE for LOGOUT is: $ DEL :== 'ERASE' $ BYE :== 'LOGOUT' $ EXIT 6.3 Changing the Command Queue Length The default command queue length is twelve commands. This length may be changed in the XCLINI.COM file by a command of the form: $ XCL$QUELEN == n where 'n' is the desired queue length. If a size less than 1 or greater than 25 is specified then the default length of 12 will be used. Note that if a queue length greater than 23 is specified then the "display command queue" function is not able to display the entire queue in a single screen -- the top commands scroll off. Appendix A -- XCL Restrictions The following restrictions must be observed when using XCL. 1. The input line is restricted to a maximum of 77 characters and the entire command must appear on a single line. If a command longer than 77 characters is required then the command must either be entered into a DCL command file or XCL must be exited and the command issued directly from DCL. 2. XCL will not prompt for mandatory parameters on commands as DCL does. Each XCL command must be complete with all required parameters or DCL will issue the error message %DCL-W-INSFPRM, insufficient parameters. 3. The DCL command ASSIGN/USER will not work properly when issued from XCL. Either use the ASSIGN command or issue the ASSIGN/USER command from within a DCL command file. 4. XCL sets the mode of the auxiliary keypad to application mode (i.e. keypad keys will transmit escape sequences). Any application which requires the keypad in numeric mode must change the mode explicitly or else the application must be called from a command file which first changes the keypad to numeric mode. 5. If a command file is executed under XCL and a STOP command is encountered then the command file and XCL will both be stopped and control will be returned to DCL. When using XCL all command files should terminate execution with an EXIT command to return control to XCL. 6. Whenever XCL is exited by an EXIT command and later restarted the previous command queue will be recovered. However, all files in the [.0XCL0] directory will be deleted so that they are no longer recoverable. 7. Always use the EXIT or LOGOUT command to permanently exit XCL. If XCL is STOPed (from a command file) or exited by the DCL command or if the user logs out using the DCL LOGOUT command then the files in the [.0XCL0] directory are not deleted. 8. Normal symbol substitution may not be used for an XCL extended command keyword. Symbol substitution must be accomplished by a command of the form: #symbol:=='keyword' (note the apostrophes around the keyword). Appendix B -- Summary of XCL Functions and Commands XCL Function Keys ----------------- kp/7 - move cursor to beginning of line kp/8 or - move cursor back one word kp/9 or - move cursor forward one word kp/- - move cursor to end of line <- - move cursor back one character -> - move cursor forward one character kp/PF1 - display HELP screen kp/PF2 - delete entire command line kp/PF3 - delete next word in command line kp/PF4 - delete current character in command line - delete previous character in command line kp/0 - display entire command queue kp/1 - delete command from queue kp/2 - insert command into queue (without executing it) kp/3 - replace command in queue (without executing it) kp/4 - move to first command in command queue kp/5 or ^ - move to previous command in command queue kp/6 or v - move to next command in command queue kp/7 - move to end of command queue - move pointer to end of queue, store command in queue, issue command - move pointer to end of queue and issue command without storing it - issue command, store it in command queue, advance pointer to next command in queue = - repeat last command issued to DCL (must be only character on line) Appendix B -- Summary of XCL Functions and Commands XCL Extended Commands --------------------- ERAse - erase the indicated file(s) RECover - recover the indicated file(s) DCL - suspend XCL saving all status information EXIt - halt XCL execution LOgout - log off the system Appendix C -- XCL HELP Screen +-------+-------+-------+-------+ +-------+-------+-------+-------+ | prev | next | back | fwrd | | | del | del | del | | cmnd | cmnd | one | one | | help | line | word | char | | | | char | char | | | | | | +-------+-------+-------+-------+ +-------+-------+-------+-------+ | | back | fwrd | | c o n t r o l k e y s | BOL | one | one | EOL | ----------------------- | | word | word | | - back one word +-------+-------+-------+-------+ - forward one word | begin | prev | next | end | - execute cmnd, don't store | of | cmnd | cmnd | of | = - reissue last command | queue | | | queue | +-------+-------+-------+-------+ |delete |insert |replace| | X C L c o m m a n d s | queue | queue | queue | | ----------------------- | entry | entry | entry | | ERAse - erase file +-------+-------+-------+ ENTER | RECover - recover file | display | | | DCL - temporary return to DCL | command | . | | EXIt - halt XCL | queue | | | LOgout - log off the system +---------------+-------+-------+