$ ICL filename
This form of the command is equivalent to typing ICL and then typing
ICL> LOAD filename
Note, that as mentioned earlier, a LOAD file may include direct commands
as well as procedures. In order to create a Batch job we must set up a file
which contains all the procedures we want, a command (or commands) to run them
and an EXIT command to terminate the job. Here is the file for a simple
Batch job to print a table of Square roots using our earlier example
procedure.
PROC SQUARE_ROOT X
{ An ICL procedure to print the square root of a number }
PRINT The Square Root of (X) is (SQRT(X))
END PROC
PROC TABLE
{ A procedure to print a table of square roots of numbers }
{ from 1 to 100 }
LOOP FOR I=1 TO 100
SQUARE_ROOT (I)
END LOOP
END PROC
{ Next the command to run this procedure }
TABLE
{ And then an EXIT command to terminate the job }
EXIT
This file can be generated using the EDIT command from DCL. If the
procedures have already been tested from ICL, it is convenient to use
a SAVE ALL command (or exit from ICL) to save them, and then edit the
SAVE.ICL file adding the additional direct commands.
Supposing this file is called TABLE.ICL. To create a batch job we also
need a command file, which we could call TABLE.COM which would contain
the following:
$ ICL TABLE
$ EXIT
It might also need to contain a SET DEF command to set the appropriate
directory, or a directory specification on the TABLE file name if it is
not in the top level directory.
To submit the job to the batch queue the following command is used
$ SUBMIT/KEEP TABLE
The /KEEP qualifier specifies that the output file for the batch job is
to be kept. This file will appear as TABLE.LOG in the top level directory
and will contain the output from the batch job. A /OUTPUT qualifier
can be used to specify a different file name or directory for it.
ICL The Interactive Command Language for ADAM