CCL -- Console Command Language RSX11M V3.2 User's Guide 24-SEP-79 The normal user interface to an RSX11M operating system is via MCR (Monitor Console Routine). If terminal input is not specifically requested by a task, all data, or commands typed in at a user's terminal are sent by the terminal driver to MCR for decoding. The MCR task (and its child ...MCR) decode user commands (ACT, ABORT, RUN, DEV, etc.). Tasks installed with special names of the form ...XYZ are treated as a external MCR command. Hence if a user types xyz commandline the 'commandline' in its entirety (or at least up to 79 characters) is sent as input to the task ...XYZ. This is the conventional way of supplying most system commands and controlling the operation of the RSX11M utility programs. The limitations of this method are that each task must be installed to be treated as an external MCR command, and each extra installed task, uses valuable pool space. Moreover, because installed tasks use a critical system resource (pool), only privileged users are allowed to install and remove tasks from the system. The normal user is restricted to starting tasks via the RUN command or using those tasks already installed. To alleviate this problem a user tailorable Console Command Language (CCL) has been implemented which allows each user to have a private task control language which will pass command lines to tasks which are not installed in the system as external MCR commands. When a user types in a command line, MCR is given first crack at decoding it. If MCR does not recognize the command (first 3 letters) as either an internal (like SET /UIC) or external command, then the command line in its entirety is sent to CCL, which is installed as ...CA., the catchall task. CCL in turn checks to see if it can find the command (the command stops at the first space, comma, =, <, or carriage return encountered). First it looks in its internal command tables to see if the command matches. If the command does not match it then scans a user file USERCCL.CCL to see if the command is present. If it isn't, it checks in file LB:[1,5]SYSCCL.CCL to see if the command is a system CCL command. If the command is not found anywhere, a warning message is printed. Each user may have an individual CCL (USERCCL.CCL) file. Instructions on how to structure a CCL file and some worked examples are in APPENDIX A. APPENDIX B describes modifications for this release. Page 2 SYSTEM CCL COMMANDS A wealth of CCL commands exist to simplify the amount of type in a user has to do, and to allow the user access to the wide variety of RSX utility programs which are not permanently installed in the system. In addition a number of commonly used commands are built into ccl. The commands SORT, DELETE, DIRECTORY, LIST, PURGE, TRUNCATE, FREE, UIC, POOL, ATS, and SHQ are internally decoded by CCL . Most of these commands are executed as PIP file commands and their syntax is ^^command\\ [filespec] [,filespec] ... The commands DIR and SORT do not require a filespecifier. All the other file commands require a file or files to be specified. These commands have the following PIP equivalents. DEL[ETE] filespec PIP filespec/DE DIR[ECTORY [filespec] PIP [filespec]/LI FRE[E] [ddn:] PIP [ddn:]/FR LIS[T] filespec PIP TI:=filespec PUR[GE] filespec PIP filespec/PU SOR[T] [filespec/SW] SRD [filespec/SW]/LI TRU[NCATE] filespec PIP filespec/TR In addition, the user can issue short form commands to display certain status information. ATS [ttn:] ACT [/TERM=TTN:] (Show active tasks) BELL Ring terminal bell. DLG DEV /LOG (Show logged terms) NOSCROLL Sets VT100 to jump scroll. PAGE Erases VT100 or TEK 4014 screen. POOL SET /POOL (Show system pool) SHOW See HELP/DCL SHOW for description SHQ QUE /LI (Show spool queue) SYS SET /SYSUIC (Show system UIC) SCROLL Sets VT100 to smooth scroll. UIC SET /UIC (Show current UIC) UIC grp,mem SET /UIC=[GRP,MEM] (Set current UIC) UIC grp mem " UIC =[grp,mem] " All other CCL commands are decoded from the CCL user and system files. Page 3 APPENDIX A CCL COMMAND FILE FORMAT When ...CA. is activated from MCR... the programs obtain the command line from MCR and divides it into units. The first unit is the KEYWORD which is used to select the command from the definition (.CCL) files. The other units become parameters 1 through 9 in order, each of which may be up to 30 characters in length and which are separated by spaces, commas, or '=' symbols. The keywords are matched up to 8 characters. If a request for a required input is terminated with ^Z, CCL exits. A user command definition file (SY:USERCCL.CCL) is searched for. If present it is opened and scanned for a keyword match. If it is not present, the system command definition file (LB:[1,5]SYSCCL.CCL) is opened and scanned. If the user file is scanned and the command is not found, then it is closed and the system file is scanned in turn. If the command is not found after the scan of the system file completes and the keyword is terminated by a '?' character, the files are rescanned for a command '?' which is called with its first parameter as the original keyword(less the '?'). This was added as an additional form of help command. The system CCL command file interprets the '?' command as 'HELP'. Hence, PIP? is the same as HELP PIP. The command definition files have three main types of lines, 1) beginning '$' - keyword lines (identification line) 2) beginning '?' - keyword lines (input query line) 3) beginning '*','+', or '-' lines (action lines). The command file consists of a keyword identification line followed by optional input query lines and finally by one or more action lines. The match procedure consists of comparing the keyword from the command line with the keyword in the command file. If the minimum length of match is satisfied and the characters up to the end of the command line keyword match characters in the keyword line, the match is successful. Otherwise failure is signaled and another '$' keyword line is searched for. When no more keyword lines are found in the file, the file is closed and the search has failed in finding that command line. EXAMPLE: $1111M $2811ASSEMBLE ?1Filename *MAC %1%=LB:[1,1]EXEMC/Ml,[11,10]RSXMC/PA:1,LB:%U%1% $1411TYPE $2411LIST ?1File *PIP TI:=%1.MAC%%2,.MAC%%3,.MAC% Page 4 $2822COMPARE ?1Files ?2Output *CMP %2.SLP%/SL=%1;-1%,%1;0% $5511BUILD ?1FILE +F4P %1.OBJ;1%=1% +TKB %1.TSK;1/CP/FP%=%1%,LB:[1,1]F4POTS/LB +PIP %1.OBJ;1%/DE +RUN %1% -%1% *PIP %1.TSK;1%/DE The commands "M file" and "ASSEMBLE FILE" have the same effect, they create an object file from the source in the user's UIC. The command ASSEMBLE given without any parameters would result in the prompt "Filename?" since the specification for the command requires at least one parameter, and it is to prompt for one parameter if it is not present. The specification ensures that "M " is matched by the single character alone, and ASSEMBLE by the characters AS ASS ASSE ASSEM thru ASSEMBLE. KEYWORD LINES The keyword line is as follows, $KEYWORD First line of a command set. There may be many keyword lines for the same action line. Minimum number of characters to match. Maximum number of characters to match (extra ignored). (ignored in current version but must be present). Minimum number of parameters required. If this number of parameters is not present then parameters will be prompted for. Maximum number of parameters to question for if less than parameters are input. In the case where prompting this number is the highest prompt to be requested. KEYWORD is the command keyword. The keyword may consist of up to 8 characters to be matched identically by the CCL processor. The only terminators for the keyword typed by the user are and . ?QUESTION-TEXT Where is the parameter number (they should be in order) Page 5 in the range 1-9 . If the correct number of parameters are supplied no questions are asked, otherwise questions are asked and the associated parameters are filled in. If parameters are skipped then they will only have values if they were given on the original command line. <#>KEYWORD command-line where <#> is one of '-', '+', or '*'. Action lines come in two varieties. '-' lines are lines which instruct the program to wait for a given task. The task name is an absolute name and does not take on a terminal qualified name (V3.2 does not have executive task dispatching). CCL will issue a connect directive to the specified task and if the task is found and is active, it will stop itself until the task exits. The format for the wait line is -<6-char-taskname> The '*' and '+' command lines differ only in that the '+' line signals that further command lines follow in the file. A '*' signals that the command is the last or only command line. The text in the action line is copied except that any parameters present are substituted into the text line. The action lines consist of valid MCR commands which must not involve further calls to CCL. Special parameters are '%' followed by a single character, while substitution of the parameters 1-9 is performed by a parameter format described below. %