It is easy to write your own ADAM A-tasks which can be run from ICL in the same way as the KAPPA programs. This is the easiest way of allowing ICL to run your own FORTRAN programs10.1. A detailed discussion of writing A-tasks can be found in SG/4 and SUN/101.
Here is a simple example of an ADAM A-task. Its source code consists of the FORTRAN source file MYTASK.FOR containing the following:
SUBROUTINE MYTASK(STATUS)
IMPLICIT NONE
INTEGER STATUS
CALL MSG_OUT(' ','Hello',STATUS)
END
The example task consisted essentially of just one statement -- the call
of MSG_OUT. This routine is part of a subroutine library which is provided
for outputting information to the terminal. The MSG_ routines should always
be used for terminal output from ADAM tasks. FORTRAN PRINT and WRITE statements
must not be used for this purpose.
Every ADAM task also has an interface file. The interface file contains information on the parameters of the task. Our task doesn't have any parameters so its interface file is fairly simple. It consists of the following in the file MYTASK.IFL.
INTERFACE MYTASK
ENDINTERFACE
ICL The Interactive Command Language for ADAM