\COMMENT SPOOL.DOC,30-JUN-76,SYKES #FORGROUND LINE PRINTER SPOOLER (SPOOL) The SPOOL program was designed to function as a forground line printer spooler. It will list and optionally delete files from a specified device with a specified FILENAME and/or EXT. The wild card '*' construction is allowed for either filenames or extensions. The standard RT-11 command line syntax applies; if no device or extension is specified, DK: and *.LST defaults are assumed. Up to six input file specifications are allowed. Two switches are recognized by SPOOL: /C:n -- This is the copy switch and will cause n copies of (only) the file proceding the /C switch to be printed. /D -- This is the delete switch and causes _all\ the input files to be deleted after listing. Also, when this switch is used, the spooler will not disengage at the end of the device directory. Instead, the spooler will sleep for thirty seconds at the end of the directory search. Upon awakening, will research the directory for new files. This process will continue unitl terminated with a CTRL. The /D switch can be used in conjunction with the /C:n switch. /D:n -- Functions the same as a /C:n/D or /D/C:n. NOTE: The placement of the /D switch is not important, if it occurs _anywhere\ in the command line _ALL\ input files will be deleted after listing and the spooler will not terminate after one directory pass. If the /D switch is not used, the spooler will scan the specified device directory for all specified files. Upon finding a match, the spooler will print one copy of the file. After printing that file, the spooler will continue scanning the device directory for the next file. Finally, once the end of the device directory is reached, the SPOOL program will terminate. RUN SEQUENCE: .LOAD LP .FRUN SPOOL __SPOOLER V01-02\ __FILES TO SPOOL ??\ CTRL F (User must type CTRL F to address foreground) __F>\ | DK1: *.FOR/D (for example spool will check to see if the line printer is on line. __!!SPOOLER ENGAGED!!\ (printed if all is OK) All the FORTRAN source will be listed on the line printer. After being listed, each source file will be deleted from DK1:. Once all the files are listed and deleted, the spooler will sleep for thirty (30) seconds. Upon awakening, the spooler will scan the directory for any new .FOR files and the process will be repeated. If none were found, the spooler will again sleep. __F>\ *.FOR/D\ If this command is entered, all the events that occurred in the first example would take place on the default device, DK:. __F>\ DK1:/D\ If this command was entered, all the *.LST files would be listed and deleted from DK1:. If just a carriage return is entered, all the *.LST (default) files on the DK: (default) device will be listed (one copy) but not deleted. DK1:WEATHER.TAR/C:1,*.FOR/C:3,DAVE.*/C:4 In this case, the directory of DK1: is searched for the files WEATHER.TAR, all FORTRAN sources, and all files whose filename is _DAVE. WETHER.TAR is listed once, the FORTRAN sources are listed three times each and the _DAVE files are listed four times. After listing the above files and passing through the directory of DK1:, the following message will occur and the spooler program will terminate. __!!! SPOOLER DISENGAGED !!!\ For the similar command: WETHER.TAR/C:3,DAVE.*/C:4 the default device, DK: would be used for the directory scan. The same files would be listed the same number of times. But, each file would be deleted after it had been listed because of the /D:3 switch. This command is the same as /C:3/D or /D/C:3. Also, the spooler would continue to search the directory for the specified files and would not terminate after one pass through the device directory. If the /D switch is specified, SPOOL will continue to wake up every 30 seconds and list any specified files until killed by typing CTRL/F (to address the foreground) and CTRL/C twice. Don't forget to UNLOAD the forground (UNLOAD FG) to free the core used by SPOOL. \test 80,