Initiating Compilations from CANDE

You can use the COMPILE command to compile a program. This command allows you to specify the compiler to use, the input file titles, the object code file title, and task equations for the compiler and the resulting object code file. For example:

COMPILE DAILY/UPDATE/PATCH AS DAILY/UPDATE/NEW WITH COBOL74;
  COMPILER FILE SOURCE = DAILY/UPDATE/SOURCE;
  PRIORITY = 40;

This example initiates the COBOL74 compiler, specifying a primary input file called DAILY/UPDATE/PATCH and a secondary input file called DAILY/UPDATE/SOURCE. The object code file that results is called OBJECT/DAILY/UPDATE/NEW. The compiler stores the PRIORITY assignment in the resulting object code file, so that OBJECT/DAILY/UPDATE/NEW receives a default PRIORITY value of 40 whenever it is run.

The COMPILE command can be used more simply than it is in the preceding example. Suppose that DAILY/UPDATE is your work file. Simply entering COMPILE in your CANDE session is sufficient to compile your work file. CANDE chooses the compiler that matches the file type of the source file. The resulting object code file consists of the source file title with “OBJECT/” prefixed (for example, OBJECT/DAILY/UPDATE.)

The COMPILE command cannot cause the execution of the resulting object code file. However, a simple RUN command compiles and runs the work file if no object code file exists.