Explanation
The following table lists all the WFL statements that initiate tasks. For more information about a particular statement, refer to Statements.
Statement |
Effect |
---|---|
Copies files that are not already resident on the destination. |
|
Archives files according to the archive task selected. Include one of the following words to complete the archive statement, as in ARCHIVE FULL:
|
|
Combines object code files. |
|
Compiles a program. |
|
Copies files. |
|
Runs the LOGANALYZER utility, which reports on selected records in the system log. |
|
Runs the SYSTEM/BACKUP utility. |
|
Executes a program. |
|
Initiates a job stored in a disk file. |
Each task initiation statement normally executes synchronously; that is, the job waits for completion of the task before continuing to the next statement in the job. Certain tasks can be made to run asynchronously by preceding the task initiation statement with the word PROCESS. An asynchronous task executes concurrently with the job. Refer to PROCESS Statement for a complete list of statements that can be processed asynchronously.
A subroutine invocation statement normally does not initiate a task. However, an asynchronous task can be initiated by a subroutine invocation statement that occurs within a PROCESS statement.
The START statement differs from the other task initiation statements in an important way. The START statement both compiles and executes a job. The compile is executed synchronously with the job that contains the START statement, but the execution occurs asynchronously and is not associated with the original job. A PROCESS START also causes the compilation to occur asynchronously from the originating job.
Example
The following example illustrates the difference between synchronous and asynchronous task initiation:
COMPILE PROG/F1 WITH COBOL85 LIBRARY; COBOL85 FILE CARD = PROG/SOURCE ON DISK; PROCESS COPY & COMPARE PROG/F1 TO PROGTAPE; RUN PROG/F1;
The statements in this example compile a program, and then copy it onto tape while the program is executing.
The COMPILE statement initiates a synchronous task of compiling the program. When the compilation is finished, the COPY statement starts an asynchronous process of copying the new code file to tape. As soon as the copy process starts, the RUN statement initiates the synchronous process of executing the new program. The second line of the COMPILE statement contains a file equation; however each of these task initiation statements can be followed by a task variable and by task equations.
The remainder of this section is devoted to explaining the common features that enable you to control the manner in which tasks are executed.