next up previous 63
Next: The DEFSTRING Command
Up: Extending ICL
Previous: Extending ICL


Login files

An ICL login file works in exactly the same way as your DCL LOGIN.COM file. ICL uses the logical name ICL_LOGIN to locate your login file so if you create a file called LOGIN.ICL in your top level directory you can use use the following DCL DEFINE command (which you should put in your DCL LOGIN.COM file).

   $ DEFINE ICL_LOGIN DISK$USER:[ABC]LOGIN.ICL
where DISK$USER:$[$ABC$]$ needs to be replaced by the actual directory used.

This file will then be loaded automatically whenever you start up ICL and can include procedures, definitions of commands, or indeed, any valid ICL commands. Below is an example of a login file which illustrates some of the facilities which may be used.

    {  ICL  Login File  }

    {  Define TYPE command  }

    DEFSTRING  T(YPE)  $ TYPE

    {  Define EDIT command  }

    HIDDEN PROC EDIT name
       IF INDEX(name,'.') = 0
          #EDIT (name)
       ELSE
          DCL EDIT (name)
       ENDIF
    END PROC

    {  Login Message  }

    PRINT
    PRINT   Starting ICL at (TIME()) on (DATE())
    PRINT


next up previous 63
Next: The DEFSTRING Command
Up: Extending ICL
Previous: Extending ICL

ICL The Interactive Command Language for ADAM
Starlink Guide 5
J A Bailey
A J Chipperfield

9th June 1998
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council