TASK - submit a task job via Derail TASK.

Usage:

B:
   status = task( program [, switch, coresize, loadersize,
            banner, ident] );
C:
   int task(const char *program [, int switch, int coresize,
            int loadersize, const char *banner, void *ident] );

Where:

status
is -1 if there was some error in the task call. Otherwise, "status" receives the termination status of the job.
program
points to an ASCII string containing the name of the program to be invoked (truncated to six characters).
switch
is the switch word to be applied to this job. If "switch" is not specified, the default is zero.
coresize
indicates how many words of memory should be allocated to the job. If "coresize" is less than 1024, TASK will multiply by 1024 to get the number of words of memory required. (Thus a "coresize" of 10 results in 10K words being allocated to the job.) If "coresize" is not specified, the default is 27. In any case, the value is placed in the lower half of the GELOAD word supplied to DRL TASK.
loadersize
indicates how many words of memory should be allocated to the job. "loadersize" follows the same conventions as "coresize", except that its default is zero. In any case, the value is placed in the upper half of the GELOAD word supplied to DRL TASK.
banner
points to a string to be printed with the snumb when the job is submitted. If "banner" is not specified, nothing is printed.
ident
is a 10 word vector to be copied to the ident area in the task job's slave prefix. Note that TSS ignores the first 5 words you supply, and fills in -1 followed by the current userid and charge number. If "ident" is not supplied, TASK will supply a default.

Description:

TASK is used to submit a job to batch from TSS via Derail TASK. Before calling TASK, you must first build up a list of files to be associated with filecodes by calling the library function ATTACH. The only exception is filecode "$S", which is supplied by TASK. If more than one job is being submitted by the same program, you must issue a call of the form

i.task();

to reinitialize the TASK file list. I.TASK is called secretly the first time ATTACH is called.

The snumb (job number) is printed on the terminal when a job is submitted, and the termination message is printed when the job returns.

Derail TASK is typically used to access TSS language processors, such as Fortran, which do not run in TSS. A batch job which is a Derail TASK has word zero of the IDENT card image in its "slave prefix" set to -1. Several language processors recognize that they are TASK jobs and will call the batch loader when they are done if the execute bit in the switch word is set on. Others do not, so an additional TASK is required if the batch loader is desired.

When your system is configured, your site sets a maximum memory size and CPU time on TASK jobs; contact your site administrator to find out what the limits are for your site. Any time a TASK job accesses a file dynamically in batch, it must later deaccess the file too; otherwise, the file will stay busy until the next time the system is booted. A TASK job must not deaccess a file that was accessed by some other job, and vice versa.

See Also:

expl b lib attach

Copyright © 1996, Thinkage Ltd.