3 The Overall System

 3.1 The ADAM_PACKAGES Help Library
 3.2 ICL Startup Command Files
 3.3 LADAM_PACKAGES
 3.4 Starlink Login Actions

3.1 The ADAM_PACKAGES Help Library

A Starlink HELP library giving general descriptions of all Starlink packages will be maintained in /star/help/adam_package.shl by the Starlink Software Librarian. The top-level topic will give a list, with a single line description, of all the standard and option packages and will be displayed if the user types:

  ICL> HELP PACKAGES

The second level will be subtopics for the individual packages. Each subtopic will give a brief description of the package and describe how to start using it. Before any packages have been started up by the user, the command:

ICL> HELP package

will display the appropriate subtopic.

Environment variable ADAM_PACKAGES points to this help file.

3.2 ICL Startup Command Files

ICL uses environment variables to identify files containing commands which it will obey automatically before taking input from any file specified as a parameter of the ICL command, or prompting for input. The environment variables, in the order they are accessed, are:

ICL_LOGIN_SYS Intended for ‘system’ login commands
ICL_LOGIN_LOCAL Intended for local site login commands
ICL_LOGIN Intended for user’s login commands

For Starlink sites, ICL_LOGIN_SYS points to a file, controlled by the Starlink Software Librarian which contains ICL commands which:

(1)
For all Starlink packages, define, for the ICL help system, the relevant entry in the ADAM_PACKAGES help library.
(2)
For each standard package, define an ICL Package Startup Command which, if issued by the user, will start up the package for use with ICL (usually by LOADing the Package Definition Command File).
(3)
For each option package, check whether the package is installed at the site by checking for the existence of an appropriate file (usually the Package Definition Command File). If the package is installed, an ICL Package Startup Command is defined as for standard packages; if not, an ICL Package Startup Command is defined which, if issued, will inform the user politely that the package is not available at the site1.
(4)
Check if environment variable LADAM_PACKAGES defines a file which exists and, if it does, LOAD the file (see Section 3.3).
(5)
Print a brief introductory message.

For example, for KAPPA (a standard package), on Unix it will contain:

  {  Definitions for KAPPA }
  DEFHELP KAPPA $ADAM_PACKAGES KAPPA
  DEFSTRING KAPPA LOAD $KAPPA_DIR/kappa

For CCDPACK (an option package), it contains:

  {  CCDPACK  }
  DEFHELP CCDPACK $ADAM_PACKAGES CCDPACK
  IF FILE_EXISTS("$CCDPACK_DIR/ccdpack.icl")
    DEFSTRING CCDPACK LOAD $CCDPACK_DIR/ccdpack
  ELSE
    DEFSTRING CCDPACK NOTINSTALLED CCDPACK
  ENDIF

Where NOTINSTALLED is a procedure which politely tells the user that the package is not available. Note that, because IF statements can only be included in ICL procedures (and not directly in command files), the command file first defines a hidden procedure containing the appropriate code for all option packages and then obeys it to define the required Package Startup Command.

3.3 LADAM_PACKAGES

This is an environment variable pointing to an ICL command file which, if it exists, will be LOADed during the ICL_LOGIN_SYS sequence. The file is intended to define both the Package Startup Command and the source of introductory help for local packages.

LADAM_PACKAGES will be controlled by the local Site Manager and may also contain any other site-specific login commands.

3.4 Starlink Login Actions

3.4.1 /star/etc/login

The following environment variables are defined in /star/etc/login which must be ‘source’ed in order to use any Starlink software.

Variable name Normal setting
ICL_LOGIN_SYS /star/etc/icl_login_sys.icl
ADAM_PACKAGES /star/help/adam_packages.shl
and for standard packages
package_DIR /star/bin/package
package_HELP /star/help/package

For option packages, the existence of an appropriate file within the package is checked to determine whether or not the package is installed. If it is, package_DIR and package_HELP for the package will be defined.

3.4.2 /star/etc/cshrc

Shell Package Startup Commands are defined in /star/etc/cshrc which must be ‘source’ed in order to use any Starlink software. For standard packages a command is defined which will ‘source’ the Package Startup Script to start up the package for use from the shell. For option packages, the existence of an appropriate file within the package is checked to determine whether or not the package is installed. If it is, a Startup Command is defined as for standard packages; if not, a command is defined which will politely tell the user that the package has not been installed.

1As a temporary measure, this is also done for standard packages which have not yet been set up to run from ICL.