CCL - CONSOLE COMMAND LANGUAGE If a command is not found by MCR either in its internal tables or as an external task installed with the name ...XYZ, the entire MCR command buffer is passed on to a catchall task ...CA. CCL is a catchall task which has two parts. The command is first scanned to see if it corresponds to any internal CCL commands. If a command is found it is interpreted and sent to MCR. If the command is not found, an attempt is made to decode the command using either a command procedure file on the user's UIC (SY:USERCCL.CCL) or a system command procedure file (LB:[1,5]SYSCCL.CCL). Further HELP using CCL may be obtained using the following keywords. COMMANDS COMMANDS BUILT_IN Internal CCL commands you may use. COMMAND FILE Creating a USERCCL.CCL command file. COMMAND FILE SYNTAX Required structure for the command file. COMMAND FILE EXAMPLE Detailed examples of CCL commands. ERRORS The CCL errors INTRODUCTION Introduction to how CCL works. 2 ERRORS CCL -- Too many parameters Either more than 9 parameters are specified or the number of characters in all params. is more than 140. CCL -- Error reading system file on LB1: CCL could not read (or find) LB1:[1,5]SYSCCL.CCL CCL -- No command line ! THIS IS A FATAL SYSTEM ERROR CCL -- MCR syntax error or unknown command The command (first 8 char.) is not a valid MCR command CCL command, and was not found in USERCCl.CCL or SYSCCL.CCL. CCL -- CCL command too long The number of parameters you typed in could not be formed into a command line of less than 79. characters. CCL -- SPAWN failure to MCR POSSIBLY A FATAL SYSTEM ERROR CCL -- Illegal syntax in .CCL file The command you gave was found, But the lines following the "$" line have illegal syntax. CCL -- Syntax error This error indicates improper syntax in the DLY command. HEY -- Task XXXXXX not active or not found A "-" commandline specified a taskname for a task not currently running. 2 INTRODUCTION 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 ...SYS) decode user com- mands(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 entirity(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 controling the opera- tion 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 valu- able pool space. Moreover, because installed tasks use a criti- cal system resource(pool), only privleged 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 com- mand(first 3 letters) as either an internal( like SET /UIC) or external command, then the command line in its entirity is sent to CCL which is installed as ...CA., the 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 encoun- tered). 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 exam- ples are in APPENDIX A. In APPENDIX B passing a command line to a task via the RUN command is discussed. 2 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 perminently installed in the system. In addition a number of commonly used commands are built into CCL. The commands SORT, DELETE, DIRECTORY, LIST, PURGE, SPOOL, TRUNCATE, FREE, UIC, POOL, ATS, DLG, SHW, SHQ and HEY are internally decoded by CCL . Many 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. For HELP with the BUILT_IN commands, type HELP CCL COMMANDS BUILT_IN. For information on the system CCL commands available to the user, type HELP CCL COMMANDS SYSTEM. 3 BUILT_IN A large number of internal commands also exist to decrease the ammount of type in necessary at one's terminal. These commands are(only the first 3 letters are required) If a filespec is required, but you omitted it then CCL will prompt by asking Files? . ATS [TTn:] Display active tasks [for specified terminal]. BELL Rings terminal bell. DELETE filspec Delete files. DLG Display logged in terminals. DLY NNNU Delay NNN U units of time DIRECTORY [filspec] Provide a directory listing. FREE [DDn:] Provide a free block display of the disk HEY tsknam Connect to a task and notify user on exit. HOLD Sets VT52 to HOLD mode(SET /HOLD = TI:). LIST filspec List a file at terminal.(uses ...LIS if installed). NOHOLD Sets VT52 to HOHOLD mode(SET /NOHOLD = TI:). NOSCROLL Sets VT100 to fast scroll. POOL Display free pool. PURGE filspec Purge files. SCROLL Sets VT100 to slow scroll. SHOW Show who us logged on and what they're doing. SHQ Show print queue(QUE /LI) ~ SORT [filspec] Provide a rapid, sorted directory listing PRINT filspec Prints files on the line printer SYS Display system UIC. TRUNCATE filspec Truncate files TYPE filespec Lists a file at terminal(uses PIP) UIC Display terminal's UIC(SET /UIC). UIC grm mem SET /UIC = [grm,mem] UIC [grp,mem] " " " " 3 SYSTEM Note: Command lines for utilities started by CCL are limited to 40-50 characters. ACCLOG RUN $ACCLOG ACNT RUN $ACNT BUF [nn] SET /BUF = TI:[nn] CHKSUM filespec PAT NL:=filespec/CS,filespec CDA dev:=MM0:/SW CDA dev:=MM0:/SW,LB:[1,54]RSX11M.STB/STB CMP command line Identical to CMP syntax CVL command line Identical to CVL syntax DATEL RUN $DATEL DIOP RUN $DIOP DMP command line Identical to DMP syntax DSP RUN $RMSDSP FLX command line Identical to FLX syntax FTB commandline Identical to FTB syntax FOR commandline Identical to F4P syntax FOR [switches] filename Similar to DCL F4P commandline Identical to F4P syntax LBR commandline Identical to LBR syntax PAT commandline Identical to PAT syntax RECOVER filespec Use RECOVER syntax RNO commandline Identical to RNO format. ~ RST RUN $RMSRST SHOW #LB:[1,2]SHOW.PRC SLP @commandfile.slp Identical to SLP syntax VFY commandline Identical to VFY syntax VMR Identical to VMR syntax ZAP Identical to ZAP syntax PRIVLEGED SYSTEM COMMANDS ACS DEV:/BLKS=N Identical to MCR DISKSAVE @LB:[1,7]DISKSAVE ERF Identical to MCR ERRORS @LB:[1,6]ERROR INCBKP @[1,7]INCBKP LOA(D) DEV: LOA DEV:/PAR=DRVPAR PSE Identical to MCR SHUTUP @LB:[1,2]SHUTDOWN SYE Identical to MCR UFD dev:[UIC] Identical to MCR UNL(OAD) DEV: Identical to MCR 3 FILE 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 to- 9 in order, all of which may be up to 140 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 re- quired 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 com- mand '?' which is called with its first parameter as the origioal 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 querry line) 3) beginning '*','+', or '-' lines(action lines). 4) beginning '.' branch to another line 5) lines 1-4 may begin with nnnn: as a label. The command file consists of a keyword identification line followed by optional input querry 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 minnumum length of match is satisfied and the char- acters 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. 4 SYNTAX 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 . Once the appropriate keyword is found and a non "$" line has been processed, another keyword line is flagged as an error. ?QUESTION-TEXT Where is the parameter number (they can be in any order) 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. If +n is used a a parameter number it refers to the first parameter found after an "=" sign or "<" Unix redirect. Likewise -n is the first parameter before (to left of) "=" or "<". If there are 2 params. before "=" and 2 after then -3 and +3 are undefined, but 3 + 4 are not. may be used to refer to the entire typed in 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 quali- fied 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> If a task has been spawned with event flag synchronization then -$n will wait for event flag n. 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. If the first character after "*" or "+" is ";" then the line is a comment. The resulting command line after parsing is typed on the terminal. This is very useful in debug situations. You need only preface the desired command string by ; and then you can look at the command line spawned to MCR, wihout any further action being taken. In addition ?; is treated a comment and is typed if either the number of parameters or the number to prompt for is unsatisfied. ?; is a comment which is typed if only parameter is unsatisfied. %