




                      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,
      
     $<m1><dummy><mp><ap>KEYWORD
      
                First line of a command set.  There may be many
                keyword lines for the same action line.
      
        <m1>    Minimum number of characters to match.
        <dummy> Maximum number of characters to match (extra ignored).
                (ignored in current version but must be present).
        <mp>    Minimum number of parameters required.
                If this number of parameters is not present then
                parameters will be prompted for.
        <ap>    Maximum number of parameters to question for if 
                less than <mp> 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 <space> and <carriage return>.
      
      
     ?<n>QUESTION-TEXT
      
        Where <n> 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.
        %<pn><option1><option 2>%
     where
        <pn>            is the parameter to be substituted (1-9)
        <option 1>      is one of (null, '=', or ',')
        <option 2>      is one of (null, <test char>text string)
     or
        %<spec-char>    is one of '$','%','U','G','M', or 'T'.
      

          The '%' denote a parameter substitution argument.   The  <pn>  is
     the number of the associated parameter to be substituted or one of the
     special parameters.  Each terminal input parameter must  be  separated
     by  a  delimiter.  Valid delimiters are:  space, comma (','), '=','<',
     '<-'.  A [UIC] is  treated  as  a  special  case  in  that  the  comma
     separating  the group and member numbers is not treated as a delimiter
     (all of the UIC can be one parameter.)

          The first group of optional elements denote  a  character  to  be
     inserted  before the parameter if the parameter is not null.  Only ','
     or '=' may appear in this position (i.e., be inserted in front of  the
     parameter).   The second group denote elements to be appended if their
     initial character is  not  present  in  the  input  parameter  string.
     Typically  these  are  only  those  which  denote  file extensions and
     version numbers.  If the <test char> is not found in the body  of  the
     parameter  then  that  character  and the text string following it are
     inserted after the body of the parameter.

                                                                     Page 6



          The special parameters are as follows,
      
        
        %$      As the last element in the command line signifies
                that CCL should SPAWN the command to MCR and exit (ESCAPE)
                rather than to stop itself and wait for exit status.
        %A      The command line in its entirety is passed without parsing.
        %G      The group number of the UIC.
        %M      The member number of the UIC.
        %T      The user's terminal ID(Tnn or Vnn where 'nn' is the
                terminal number and 'Tnn' or 'Vnn' are for real terminals
                and virtual terminals respectively.
        %U      The user's UIC including '[,]'.
      
      examples:
      
        %U      ->      [12,10]
        %G      ->      12
        %M      ->      10
        %T      ->      T14 if TT14:, V1 if VT01:
                        useful for creating multi-terminal tasks,
                             (i.e., BAST2) using INS/TASK=nnn%T.
      

          After a CCL command is issued CCL stops itself until the  command
     is  complete.   When the task completes it returns exit status back to
     CCL, which in turn passes exit status back to the task  which  invoked
     it (such as ...AT.).  If the user does not wish CCL to stay around for
     the command to finish, a %$% may terminate the command in the  command
     skeleton  in the user's (or system's) CCL file.  This has changed from
     the previous release because the way in which  MCR  synchronizes  with
     external   tasks  is  now  radically  different.   In  short,  if  %$%
     terminates a CCL command, CCL  will  spawn  the  command  to  MCR  and
     immediately  exit.   Otherwise, it will stay in core until the command
     is processed.




     From the above examples:

     In ASSEMBLE / M the filename given would normally  be  a  plain  name,
     e.g., MCRDIS which would result in (UIC=[12,10]) 
      
        MAC MCRDIS=LB:[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,SY:[12,10]MCRDIS
      
     In LIST or TYPE since the required number of arguments is set to  one,
     and the number of arguments to be prompted for is one the results are
      
     TY file            -> PIP TI:=file.MAC
     T file.slp         -> PIP TI:=file.slp
     TYPE file,file2    -> PIP TI:=file.MAC,file2.MAC
     TYPE
     FILE?myfile        -> PIP TI:=myfile.MAC
      

                                                                     Page 7



     COMPARE MCRDIS
     Output? TI:        -> CMP TI:.SLP/SL=MCRDIS;-1,MCRDIS
     CO
     Files? INDROT
     Output? INDROT     -> CMP INDROT.SLP/SL=INDROT;-1,INDROT
      
     or alternatively with the definition
      
        $2722COMPARE
        ?1Files
        ?2Output
        *CMP %2%%1.SLP%/SL=%1;-1%,%;0%
      
     one then has
     MCR>COM
     Files? INDROT
     Output?            -> CMP INDROT.SLP/SL=INDROT;-1,INDROT;0
     or
     MCR>COM
     Files?INDROT
     Output?TI:         -> CMP TI:INDROT.SLP/SL=INDROT;-1,INDROT;0
      
      however altering this to
      
        $2712COMPARE
        ..........
      leads to
     MCR> COM INDROT    -> CMP INDROT.SLP/SL=INDROT;-1,INDROT;0
     MCR> COM INDROT TI:-> CMP TI:INDROT.SLP/SL=INDROT;-1,INDROT;0
     and
     MCR> COMPARE
     Files?INDROT
     Output?TI:         ->       ditto
      
     Because the number of parameters to prompt for was set to 2 
     if the required of 1 was not present.
      
     EXAMPLE:
      
     1.  UIC            ==>  SET /UIC
     2.  UIC  [G,M]     ==>  SET /UIC=[G,M]
     3.  UIC =[G,M]     ==>  SET /UIC=[G,M]
      
          The following entries in SYSCCL.CCL produce the above syntax.
      
                $3300UIC
                *SET /UIC %2=%1=%
      
       Case 1.  No parameters present so   SET /UIC sent out.
      
       Case 2.  Since only one parameter is present, {G,M} (Remember
                the comma in a UIC is not a delimiter.) %2=% evaluates
                to a null and %1=% evaluates to  =[G,M].
      
       Case 3.  The = sign (UIC =[G,M]) acts as the first delimiter

                                                                     Page 8



                which means parameter 1 is evaluated to a null and
                parameter 2 is evaluated to be =[G,M].
      
     EXAMPLE:
      
     DIRECTORY filespec         ==>PIP filespec/BR
      
          The CCL entries to produce this command would be
      
                $3900DIRECTORY
                *PIP %1;*%/BR
      
       Case 1.  The command DIRECTORY would have parameter 1 as 
                null so the MCR command would be  PIP /BR.
      
       Case 2.  The command DIR *.CMD would have appended a ;* 
                since there is no ';' in the command line typed in.  
                So the command is passed back to MCR would be  
                PIP *.cmd;*/BR.
      
       Case 3.  The command DIR *.CMD;1 would have nothing appended since
                a ';' is found in the input commnad.  Hence, the
                command PIP *.CMD;1/BR  would be sent to MCR by CCL.

                                                                     Page 9



                                APPENDIX B


                   MODIFICATIONS TO CCL FOR V3.2 RSX11M 



          CCL is slightly modified (it certainly could use some more  work)
     for  the  V3.2  release.   Exit  with status has been added.  If a CCL
     command can not be executed (file not found, line  too  long,  etc)  a
     fatal exit status of 4 is returned to the indirect file processor.  

          CCL now must be built with the SPAWN and  STOP  directives.   CCL
     requires  the  EXST$  (Exit  With Status) directive in order to return
     exit status..  A check is now made to see if the expanded command line
     is  too  is  too  large  to  fit  in  an  MCR buffer.  This saves much
     frustration when one enters longish commands,  and  the  tasks  reject
     them  at  some unknown point in the command line.  If CCL detects that
     the command is too long to pass on, it warns the user and  prints  out
     the  offending line up to the point at which it overflowed the allowed
     line length.

          Since the various PIP, CCL commands seem to be the most used  and
     useful,   these  commands(  DIR[ECTORY],  LIS[T],  DEL[ETE],  PUR[GE],
     SPO[OL], AND TRU[NCATE], etc.) have been explicitly built  into  CCL's
     command  parsing.  This speeds up command response quite noticeably on
     system with slow disks.

          Richard Kirkman has included  his  latest  modifications.   These
     include  the  multiple  line  CCL  commands  and the special parameter
     substitution symbols for determining  the  default  UIC  and  terminal
     number.
