4 Further Operating Modes

The VMS DCL command procedure and Unix C-shell script which invoke COCO both have optional parameters which allow the sources and destinations of the main input and output streams to be defined:

        COCO   [input]  [report]  [output]

In the case of interactive operation, both input and report are assigned to the terminal. The output file includes only the results, in a fixed format and without extraneous formatting; it is intended to be easy to read in other programs.

The combination of parameters presented causes COCO’s input/output streams to be assigned one of several configurations which are intended to produce sensible results in a variety of modes of use, both interactive and batch. More direct control of COCO may be desirable on occasion.

Under VMS, it is permissible to invoke the COCO executable program by first assigning the logical names FOR0nn to the required files:

       FOR011      output     raw output for redirection
       FOR012      output     echo of input
       FOR013      output     report (including error warnings)
       FOR015      input      commands and data
       FOR016      output     prompts
       FOR017      output     error warnings

(In addition, I/O unit 14 is used internally to read secondary files.)

As an example, suppose that we wish to run COCO in batch on a VMS system, with the commands included in the batch command procedure itself, with no output file, and with the results to appear in the printed log. This could be accomplished by submitting the following command procedure:

        $  ASSIGN/USER_MODE NL:         FOR011  ! raw output
        $  ASSIGN/USER_MODE SYS_$OUTPUT FOR012  ! echo of input
        $  ASSIGN/USER_MODE SYS_$OUTPUT FOR013  ! report
        $  ASSIGN/USER_MODE SYS_$INPUT  FOR015  ! commands
        $  ASSIGN/USER_MODE SYS_$OUTPUT FOR016  ! prompts
        $  ASSIGN/USER_MODE NL:         FOR017  ! errors
        $  RUN COCO_DIR:COCO
  
        I 5      * input J2000 FK5
        O 4      * output B1950 FK4
  
        *  Source position
        14 39 36.087 -60 50 07.14   -0.49486 +0.6960   0.752 -22.2
  
        E

On the Unix platforms, the COCO executable may be invoked by means of the following shell command:

        coco.x terml output echo report input prompts errors

The seven command-line parameters, all of which must be present, are, respectively, the string identifying the terminal (perhaps obtained by using the command set terml = ‘tty‘) and the six filenames.