13

SG/5.2

Starlink Project
Starlink Guide 5.2

J A Bailey1
A J Chipperfield

9th June 1998


ICL
The Interactive Command Language
for ADAM

Version 1.5-6

User’s Guide



Abstract

ICL is a language designed to provide a programmable user interface to an astronomical data reduction or data acquisition system. It is the primary user interface for the ADAM software environment.

This document is a re-formatted version of SG/5.1 – the text has not changed. For information on ICL for Unix, ICL help is more reliable.

Contents

I  Introduction to ICL
1 Introduction
 1.1 What is ICL?
 1.2 ICL Documentation
 1.3 ICL and FORTRAN
 1.4 History and Support
2 Getting Started
 2.1 Direct Mode
 2.2 Entering Commands
 2.3 The Immediate Statement
 2.4 The Assignment Statement
 2.5 Expressions
  2.5.1 Values
  2.5.2 Constants
  2.5.3 Variables
  2.5.4 Operators
  2.5.5 Functions
 2.6 Formatting Numbers For Output
 2.7 Commands
  2.7.1 Command Format
  2.7.2 Summary of Rules for Command Parameters
3 ICL Procedures
 3.1 Direct Entry of Procedures
 3.2 Running a Procedure
 3.3 Listing Procedures
 3.4 Editing Procedures
 3.5 Direct Commands During Procedure Entry
 3.6 Saving and Loading Procedures
 3.7 Control Structures
  3.7.1 The IF structure
  3.7.2 The LOOP Structure
 3.8 Prompting for Procedure Parameters
 3.9 Variables in Procedures
 3.10 Tracing Procedure Execution
 3.11 Running ICL as a Batch Job
4 Input/Output
 4.1 Terminal I/O
 4.2 Text File I/O
 4.3 Screen Mode
 4.4 Keyboard Facilities in Screen Mode
5 Access to DCL
 5.1 The Command
 5.2 The SPAWN Command
 5.3 Changing the Default Directory
 5.4 Allocating and Mounting Tape Drives
6 Errors and Exceptions
 6.1 ICL Exceptions
 6.2 Exception Handlers
 6.3 Keyboard Aborts
 6.4 SIGNAL command
7 Extending ICL
 7.1 Login files
 7.2 The DEFSTRING Command
 7.3 Hidden Procedures
 7.4 The DEFPROC Command
 7.5 Defining Additional Help Topics
 7.6 Other Ways of Defining Commands
II  ICL and ADAM
8 Introduction to ADAM
 8.1 What is ADAM?
 8.2 The Role of the Command Language
9 Using ADAM for Data Reduction
 9.1 A-tasks
 9.2 Monoliths
 9.3 Running KAPPA
 9.4 ADAM Parameter Format
 9.5 KAPPA from Procedures
 9.6 Error Reports
10 Writing ADAM tasks
 10.1 Introduction
 10.2 Compiling and Linking
 10.3 Tasks with Parameters
 10.4 STATUS and error handling
 10.5 Returning values to ICL
 10.6 Graphics with ADAM
 10.7 Accessing Data
11 ADAM as a Data Acquisition Environment
 11.1 Instrumentation Tasks
 11.2 D-tasks and C-tasks
 11.3 Task Loading
 11.4 Killing Tasks
 11.5 The ADAM message system
 11.6 An Example
  11.6.1 The I-task Interface File
  11.6.2 Running PHOTOM
  11.6.3 Supplying Parameters in the Obey Message
  11.6.4 Cancelling Actions
  11.6.5 Missing Parameters
  11.6.6 The GET command
  11.6.7 The OBEYW command
  11.6.8 Multiple Concurrent Actions
A ICL Functions
B ICL Commands
 B.1 ALLOC
 B.2 ALOAD
 B.3 APPEND
 B.4 CHECKTASK
 B.5 CLEAR
 B.6 CLOSE
 B.7 CREATE
 B.8 CREATEGLOBAL
 B.9 (DCL)
 B.10 DEALLOC
 B.11 DEFAULT
 B.12 DEFHELP
 B.13 DEFINE
 B.14 DEFPROC
 B.15 DEFSHARE
 B.16 DEFSTRING
 B.17 DEFTASK
 B.18 DEFUSER
 B.19 DELETE
 B.20 DISMOUNT
 B.21 DUMPTASK
 B.22 EDIT
 B.23 ENDOBEY
 B.24 EXIT
 B.25 GET
 B.26 GETGLOBAL
 B.27 GETNBS
 B.28 GETPAR
 B.29 HELP
 B.30 INPUT
 B.31 INPUTI
 B.32 INPUTL
 B.33 INPUTR
 B.34 KEY
 B.35 KEYTRAP
 B.36 KEYUSER
 B.37 KILL
 B.38 KILLDCL
 B.39 KILLW
 B.40 LIST
 B.41 LOAD
 B.42 LOADD
 B.43 LOADW
 B.44 MOUNT
 B.45 NOREP
 B.46 OBEYW
 B.47 OPEN
 B.48 PRINT
 B.49 PROCS
 B.50 PUTNBS
 B.51 READ
 B.52 READI
 B.53 READL
 B.54 READR
 B.55 REPFILE
 B.56 REPORT
 B.57 SAVE
 B.58 SAVEINPUT
 B.59 SEND
 B.60 SET
  B.60.1 SET ATTRIBUTES
  B.60.2 SET AUTOLOAD, SET NOAUTOLOAD
  B.60.3 SET CHECKPARS, SET NOCHECKPARS
  B.60.4 SET EDITOR
  B.60.5 SET HELPFILE
  B.60.6 SET MESSAGES, SET NOMESSAGES
  B.60.7 SET PRECISION
  B.60.8 SET PROMPT
  B.60.9 SET SAVE, SET NOSAVE
  B.60.10 SET SCREEN, SET NOSCREEN
  B.60.11 SET TRACE, SET NOTRACE
 B.61 SETGLOBAL
 B.62 SETPAR
 B.63 SIGNAL
 B.64 SPAWN
 B.65 STARTOBEY
 B.66 TASKS
 B.67 VARS
 B.68 WAIT
 B.69 WRITE
C ICL Exceptions
D ICL Syntax

1Anglo-Australian Observatory