B: retunit = attach( filecode, unit ); retunit = attach( filecode, filename, options, ... );
C: int attach(const char *filecode, int unit); int attach(const char *filecode, const char *filename, const char *options, ...);
ATTACH associates the name of an open file as it appears in the AFT with a two-character filecode to be used in batch. ATTACH also enters this association into the file list for DRL TASK.
If two arguments are passed to ATTACH, it assumes that the second is the unit number associated with a file that is already open. If more than two arguments are passed to ATTACH, it passes all but the first argument to OPEN so that the desired file can be accessed before it is attached to the task file list.
ATTACH is intended to be used in conjunction with the library function TASK, which submits a job to batch via DRL TASK.
attach( "i**", .read() ); attach( "****", "b/etc/qstar", "rb" );
Note the use of the '**' escape sequence for '*' in the B strings above.
Copyright © 1996, Thinkage Ltd.