next up previous 65
Next: Help Files
Up: Compiling and Linking
Previous: Interface Files


Monoliths

The top-level routine for Unix A-task monoliths should be of the form:
          SUBROUTINE TEST( STATUS )
          INCLUDE 'SAE_PAR'
          INCLUDE 'PAR_PAR'

          INTEGER STATUS

          CHARACTER*(PAR__SZNAM) NAME

          IF (STATUS.NE.SAI__OK) RETURN

*       Get the action name
          CALL TASK_GET_NAME( NAME, STATUS )

*       Call the appropriate action routine
          IF (NAME.EQ.'TEST1') THEN
            CALL TEST1(STATUS)
          ELSE IF (NAME.EQ.'TEST2') THEN
            CALL TEST2(STATUS)
          ELSE IF (NAME.EQ.'TEST3') THEN
            CALL TEST3(STATUS)
          END IF
          END

To run such a monolith from a Unix shell, link the required action name to the monolith, then execute the linkname (possibly via an alias). For example:

% ln -s $KAPPA_DIR/kappa add
% add

Separate Interface Files are required for each action run from the shell - a monolithic Interface File is required for monoliths run from ICL.



next up previous 65
Next: Help Files
Up: Compiling and Linking
Previous: Interface Files

ADAM
Starlink User Note 144
A J Chipperfield
17 August 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils