diff --git a/Makefile b/Makefile index 1655edcf..e6dbd086 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ SRC = syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ lars drnil radia gjd maint bolio cent shrdlu vis cbf digest prs jsf \ decus bsg muds54 hello rrs 2500 minsky danny survey librm3 librm4 \ klotz atlogo clusys cprog r eb cpm mini nova sits nlogo bee gld mprog2 \ - cfs libmud librm1 librm2 mprog mprog1 mudbug mudsav + cfs libmud librm1 librm2 mprog mprog1 mudbug mudsav _batch combat DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \ chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \ xfont maxout ucode moon acount alan channa fonts games graphs humor \ @@ -53,12 +53,13 @@ DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \ aplogo _temp_ pdp11 chsncp cbf rug bawden llogo eak clib teach pcnet \ combat pdl minits mits_s chaos hal -pics- imlac maint cent ksc klh \ digest prs decus bsg madman hur lmdoc rrs danny netwrk klotz hello \ - clu r mini nova sits jay rjl nlogo mprog2 mudbug cfs + clu r mini nova sits jay rjl nlogo mprog2 mudbug cfs hudini BIN = sys sys1 sys2 emacs _teco_ lisp liblsp alan inquir sail comlap \ c decsys graphs draw datdrw fonts fonts1 fonts2 games macsym \ maint _www_ gt40 llogo bawden sysbin -pics- lmman shrdlu imlac \ pdp10 madman survey rrs clu clucmp rws mini mudsav mudsys libmud \ - librm1 librm2 librm3 librm4 mbprog mprog1 mprog mprog2 mudbug mudtmp + librm1 librm2 librm3 librm4 mbprog mprog1 mprog mprog2 mudbug mudtmp \ + _batch MINSRC = midas system $(DDT) $(SALV) $(KSFEDR) $(DUMP) # These are not included on the tape. diff --git a/bin/_batch/arc.info b/bin/_batch/arc.info new file mode 100644 index 00000000..a848b261 Binary files /dev/null and b/bin/_batch/arc.info differ diff --git a/build/muddle.tcl b/build/muddle.tcl index 6ce06305..b41b1fee 100644 --- a/build/muddle.tcl +++ b/build/muddle.tcl @@ -86,3 +86,88 @@ respond "Type Y if you wish to have Save File directly restored:" "y\r" respond "Type Second Name of Save File:" "55save\r" respond "Type Sname of Save File:" "mudsav\r" expect ":KILL" + +# Build DM Daemons (COMBAT ZONE, BATCHN). GUNNER is already built in dm.tcl + +# Build COMBAT ZONE (ZONE) +respond "*" ":assem \"combat;privat >\" \"combat;privat nbin\"\r" +expect ":KILL" + +respond "*" ":ecomp\r" +respond "T" "\" \"combat;master nbin\">\033" +respond "Job ECOMP wants the TTY" "\033p" +respond "I'm done anyway." "\033" +expect ":KILL" + +respond "*" ":ecomp\r" +respond "T" "\033" +respond "\"DONE\"" "\033" +respond "\"\"" "\r" +type "\i\r>\033" +respond "#FALSE ()" "\033" +expect ":KILL" + +respond "*" ":midas sys;atsign zone_mudsys;subsys maker\r" +respond "Type in Subsystem (Save File) name:" "zone\r" +respond "Type Y if you wish to have Save File directly restored:" "y\r" +respond "Type Second Name of Save File:" "55save\r" +respond "Type Sname of Save File:" "mudsav\r" +expect ":KILL" + +# Build BATCHN daemon + +respond "*" ":ecomp\r" +respond "T" "\033" +respond "\".batch\"" "\" \"templt nbin\">\033" +respond "Job ECOMP wants the TTY" "\033p" +respond "I'm done anyway." "\" \"tcheck nbin\">\033" +respond "Job ECOMP wants the TTY" "\033p" +respond "I'm done anyway." "\" \"taskm nbin\">\033" +expect -timeout 600 "Job ECOMP wants the TTY" +type "\033p" +respond "I'm done anyway." "\" \"batchq nbin\">\033" +respond "Job ECOMP wants the TTY" "\033p" +respond "I'm done anyway." "\" \"batchn nbin\">\033" +expect -timeout 600 "Job ECOMP wants the TTY" +type "\033p" +respond "I'm done anyway." "\033" +expect ":KILL" + +respond "*" ":mud55\r" +respond "LISTENING-AT-LEVEL 1 PROCESS 1" "\033" +respond "\".batch\"" "\033" +respond "\"DONE\"" "\033" +respond "TO CREATE SAVE FILE\"" "\033" +expect ":KILL" + +respond "*" ":midas sys;atsign batchn_mudsys;subsys maker\r" +respond "Type in Subsystem (Save File) name:" "batchn\r" +respond "Type Y if you wish to have Save File directly restored:" "y\r" +respond "Type Second Name of Save File:" "save\r" +respond "Type Sname of Save File:" ".batch\r" +expect ":KILL" + +# Now build BATCH user program (interfaces with BATCHN daemon) + +respond "*" ":link libmud;pmap fbin,mbprog;pmap fbin\r" + +respond "*" ":ecomp\r" +respond "T" "\033" +respond "\".batch\"" "\" \"nbatch nbin\">\033" +expect -timeout 600 "Job ECOMP wants the TTY" +type "\033p" +respond "I'm done anyway." "\033" +expect ":KILL" + +respond "*" ":mud55\r" +respond "LISTENING-AT-LEVEL 1 PROCESS 1" "\033" +respond "\"DONE\"" "\033" +respond "\"SAVED\"" "\033" +expect ":KILL" + +respond "*" ":midas sys3;ts batch_mudsys;subsys maker\r" +respond "Type in Subsystem (Save File) name:" "nbatch\r" +respond "Type Y if you wish to have Save File directly restored:" "y\r" +respond "Type Second Name of Save File:" "55save\r" +respond "Type Sname of Save File:" ".batch\r" +expect ":KILL" diff --git a/build/timestamps.txt b/build/timestamps.txt index 2fc32724..0adc1da4 100644 --- a/build/timestamps.txt +++ b/build/timestamps.txt @@ -81,6 +81,14 @@ bsg/oonl.3 198003302233.12 bsg/qcolor.73 198202021016.05 bsg/qqc.54 198202021013.59 _/bt.rp06 199008150059.29 +_batch/arc.info 197909261015.35 +_batch/batchn.maker 197811030814.47 +_batch/batchq.ujhm12 197812141034.57 +_batch/batchn.ujm150 198102120911.01 +_batch/nbatch.usg140 198002111120.26 +_batch/taskm.ujm127 202303040702.17 +_batch/tcheck.ujhm26 198102121111.34 +_batch/templt.ujhm09 197811030724.35 budd/live.palx 198912270303.37 cbf/imgout.27 198403100100.51 cbf/rug.featur 198001140355.59 @@ -208,6 +216,12 @@ c/}lp.bin 198101151907.52 c/}m.bin 198007161811.50 c/nc.insert 197904081640.44 c/nm.insert 197704110809.48 +combat/privat.undr15 197810171735.19 +combat/master.undr78 197810280734.16 +combat/master.xplan 202302031511.31 +combat/gunner.down 202211101513.31 +combat/crowd.contrl 202211101511.22 +combat/-read-.-this- 202108262240.30 comlap/ccload.193 198202172211.07 comlap/cd_fas.40 198107041832.40 comlap/cdmacs.40 198107041832.05 @@ -2185,6 +2199,7 @@ mudbug/unlink.nbin 197901202019.07 mudbug/unlink.utaa08 197805231636.43 mudbug/unpure.nbin 197901202010.19 mudbug/unpure.utaa05 197901202010.05 +mudman/ncomba.info 197704280957.59 muds54/agc.84 197705311231.24 muds54/agcmrk.1 197607201900.21 muds54/bufmod.4 197701051727.04 @@ -2697,14 +2712,14 @@ sysen2/bitprt.19 198105250311.55 sysen2/calprt.23 198105231559.39 sysen2/cftp.475 198601232312.22 sysen2/demst.19 198104301431.59 -sysen2/demstr.49 198305080554.36 +sysen2/demstr.51 202303021310.13 sysen2/dmarcd.30 197707041902.17 sysen2/fcdev.74 198204181031.52 sysen2/fed.134 198201011658.37 sysen2/fnr.10 197409042300.00 sysen2/fretty.62 198309301742.43 sysen2/hostat.24 197802190817.56 -sysen2/gunner.mta381 198210061542.42 +sysen2/gunner.mta382 202302260721.43 sysen2/iec.32 197810122101.03 sysen2/instal.24 198605160728.36 sysen2/ipljob.47 197509161146.19 @@ -2858,6 +2873,7 @@ sys/ts.fail 197306211035.33 sys/ts.gas 197104182237.38 sys/ts.ksfedr 198603250624.15 sys/twxdfs.8 198103242152.07 +taa/gunner.init 197909171950.08 teach/apropo.10 198208150134.52 teach/compla.19 198208290040.39 teach/databa.45 198408041040.48 diff --git a/doc/hudini/-read-.-me- b/doc/hudini/-read-.-me- new file mode 100644 index 00000000..f39d06ae --- /dev/null +++ b/doc/hudini/-read-.-me- @@ -0,0 +1,2 @@ +This directory is required by GUNNER and other DM programs. +Gunner writes a log here. diff --git a/doc/mudman/ncomba.info b/doc/mudman/ncomba.info new file mode 100755 index 00000000..ab6f56b9 --- /dev/null +++ b/doc/mudman/ncomba.info @@ -0,0 +1,300 @@ +NCOMBAT (TAA, 3/8/77) + + NCOMBAT is intended to replace both the old, MUDDLE version of +NCOMBAT and the standard COMBAT. It has all the features of NCOMBAT, +including user-tailorable compilation types (see below), a 'Short' +compilation type which asks only the bare minimum of questions, and a +'backup' character which allows one to back up in the question sequence, +in the event that a mistake was made. Although the interface is rather +different from that of COMBAT, the NCOMBAT features are as unobtrusive +as possible for those who don't want to use them, and it is considerably +faster than either COMBAT or the old NCOMBAT. + +User interface + NCOMBAT's user interface is patterned after, though not +identical to, a CALICO interface like that used in the MUDDLE version of +NCOMBAT. In particular, it expects in response to any given prompt a +particular type of input from the user, which may be a file name, a +'symbol', or text. Ordinarily, the type of input expected is indicated +by the 'syntactic prompt' which follows the normal prompt; this is one +of '(FILESPEC)', '(SYM)', and '(TEXT)'. The 'Toggle verbosity' +compilation type turns the printing of the syntactic prompt on and off, +and causes a tailor file to be written out when used. + A number of special characters are defined for any of these +types of input: + ctrl-@: Clears the input buffer, just as in MUDDLE. + ctrl-D: Redisplays the input buffer. + ctrl-G: When given as the first character of an answer, allows one to + get the answer from a user-defined type. See the section on + tailoring. + ctrl-L: Clears the screen and redisplays the input buffer. + ctrl-Q: Has special effects when a compilation is being made. (See + below.) See also the section on file name input. + ctrl-R: Causes NCOMBAT to 'back up'. Typically this means go to the + previous question asked, but in certain modes it may have a + slightly different effect. When a MUDCOM is running, this + kills it and pretends that ctrl-R has been typed at the + 'Compare' question. + ctrl-S: Abnormally ends whatever is being done, and returns to + 'toplevel': the 'Type of compilation' question. If a MUDCOM + is running, it will be killed. When a long compilation + (How to run is 'Many') is being made, the portions already + made will be saved. See the 'Flush many' compilation type. + ?: When given as the first character of an answer, this causes a + more detailed description of what is expected to be printed, + along with the current default and how to obtain it. + \: This quotes whatever character follows it, including + , , &c. It does NOT have the effect of + quoting strange characters in file names; see the section on + file name input. \, used as a quote character, never echoes, + and cannot be rubbed out. +In addition, when the syntactic prompt is (SYM), ctrl-F is useful. + +Symbolic input + If you are familiar with CALICO, this can probably be skipped. +When entering symbolic input, one need only type the characters required +to uniquely specify the desired choice: the interface will complete the +response, and in addition can display the available choices at any +point. In particular, requests the interface to complete the +response as far as it can. If the response is uniquely specified, it +will be displayed in its entirety, followed by '!'; if more than one +choice is still possible, then the interface will display the portion of +those choices which is unambiguously specified, followed by '&'. For +instance, if 'Expand floads' and 'Expand splices' are among the choices, +and 'Ex' has been typed, 'Expand &' will be displayed since the +'Ex' reduces the choices to those two. + In some cases, if is the first character typed it will +select the default (first) choice and terminate. + When ctrl-F is typed, the interface will display all remaining +choices. + To terminate responses in this mode, either or +may be used. In either case, the interface first completes the current +response as far as it can. If only one choice then remains, the answer +is terminated and can be used. If more than one choice is possible, it +is just as if had been typed. + Typing or before any other characters have been +entered causes the default answer to be used. + +File names + File names are expected in the standard dev:sname;fname1 fname2 +format. Typically, typing simply or answers 'no' to the +question, while says 'Use the default'. In certain special +cases (input file and output file), when some answer to the question is +imperative, the default will be used in either case. File names should +NOT be surrounded by quotes in this mode. + It is rather painful to get funny characters (such as ) +into file names. When the file-name parser sees a ctrl-Q, it uses the +following character in the name being generated regardless. +Unfortunately, the ctrl-Q must be quoted to get it past the reader, +since it has special effects in the normal case. Thus, the file +'TAA; FOO >' has to be entered as 'TAA;\ FOO >'. + +Text + Text is just that: [relatively] arbitrary characters, +terminated by . Since is allowed in text, it does not +terminate input. Text type input is used in a number of cases where it +isn't quite appropriate, such as the redo list and package mode +questions. If it is known that the expected response is a list or +string, as in those cases, the appropriate brackets should NOT be +supplied. Assuming, of course, that winnage is desired. + + +Submitting compilations + The first question asked by NCOMBAT is 'Type of compilation'. +In addition to a number of special possibilities described later, there +are two (in addition to any provided by the user through the tailoring +facility) answers to this question which cause a compilation to be +submitted: 'Verbose' (the default) and 'Short'. The only distinction +is that 'Verbose' causes all the normal questions to be asked: new +compiler, input file, precompilation, 97 switches, things to do, and so +on; 'Short', on the other hand, defaults the answers to all questions +except new compiler, input file, and how to run. + If 'Many' was given as 'How to run' for a previous compilation, +and the resulting plan has not yet been written out, all subsequent +plans will be appended to it. The ONLY way to get rid of this plan is +to answer 'Many flush' to the 'Type' question. Typing ctrl-S or +answering 'Abort' to the 'How to run' question will abort the current +portion of the moby compilation, but not the whole thing. + If 'Many' was mistakenly given as 'How to run', and you don't +wish to destroy the plan you have generated, it is possible to (in +essence) go back to the 'How to run' question by answering 'Many print' +for the compilation type. In this case, you are NOT!!! back in the +plan-making loop; ctrl-R acts just like ctrl-S. + When submitting a compilation, one may type ctrl-Q at any time. +This has the same immediate effect as an altmode, but in addition causes +all questions between the one just answered and the 'things to do' +question to be defaulted. This is particularly useful in the 'Verbose' +sequence of questions. + Ctrl-R, here, backs up to the last question asked. There are +two qualifications. First, if ctrl-Q has been typed, then it backs up +to the last question that would have been asked if ctrl-Q had not been +typed. Second, the four questions 'Precompilation to load', 'Compare', +'Redo', and 'Package mode' are treated as a group: if the package mode +question has not yet been answered, it is possible to back up normally; +but once that question has been answered, backing up to it will go to +the first member of the group, 'Precompilation'. + Ctrl-G allows one to obtain the answer to the current question +from any user-defined group. It requests a group name, and uses the +answer/default supplied therein, printing the information so obtained. +The ctrl-G must be typed as the first character of the answer for this +to occur. This allows one to use parts of a defined group without +either using the group itself or altering it for the occasion. For +(TEXT) type input (such as things to do), the string is placed in the +input buffer but not completed, so it may be edited before an altmode is +typed. See also the 'Xerox group' command. + Note that there is a distinction made between 'Compare' and +'Redo'; the former causes a MUDCOM to be run, and the latter asks for +the names of functions to be recompiled. It is possible to do both, in +which case the two groups of functions are appended to form the redo +list for the compilation. Note also that if a MUDCOM has been run, the +'Package mode' question will not be asked, since the answer is supplied +by the MUDCOM. Either ctrl-R or ctrl-S may be used to kill a running +MUDCOM. + + One of the responses to the 'How to run' question is 'Abort', +which returns directly to the 'Type of compilation' question without +writing out a plan, starting up a pcomp, or anything else. Its effect +is exactly that of a control-S. In particular, if you are making a long +compilation, only the portion just completed, NOT the entire +compilation, will be aborted. + + It is also possible at the 'How to run' question to supply an +answer to any of the compilation questions (Input file, etc.). The +'Question' response asks for the name of a question, then asks that +question. Any number of questions can be asked in this manner, one at a +time. This is particularly useful for filling in the blanks left by a +'Short' type compilation, or by a user-defined types. + + When a compilation has been finished, NCOMBAT normally loops +back to the 'Type of compilation' question, but changes the default from +'Verbose' to 'None' (==Quit), unless another compilation may reasonably +be expected. This enables one to leave by typing a single . +It is possible to modify its behavior such that it either kills itself +after finishing the compilation, or loops back with 'Verbose' as the +default for the 'Type of compilation' question. NCOMBAT first decides +whether a long compilation is being made; if so, the default remains +'Verbose.' It then examines the current compilation type: if 'Another +compilation?' has been set to 'Yes', the question will be asked with +default 'Verbose'; if to 'No', NCOMBAT will kill itself; if to 'ASK', +further consideration is required. If the user is in 'Multiple' mode +(the 'Multiple' compilation type), the type of compilation will be asked +with the 'Verbose' default. Otherwise, NCOMBAT examines the state of +two tailorable switches, set by the 'Another compilation?' compilation +type. If this has been set to 'No', the job will die; if to 'yes', the +type question will be asked with default 'Verbose'; if to 'ask', the +type questio will be asked with default 'None'. Normally this is 'ask'. +Note that this switch is like 'Toggle verbosity' in that it will have no +effect unless user-defined compilation types exist. + + +User tailoring + It is often the case that a particular file is compiled quite +often, or that some sequence of actions must be performed as the 'Things +to do' before many compilations. NCOMBAT allows the user to define his +own 'compilation types', each of which specifies exactly those questions +which should be asked and the answers for those which should not. For +example, one could have a type named 'Esign', which says that the input +file is always SEND;ESIGN > and in addition provides for the floading of +two files in 'Things to do'. Further, since most questions are +defaulted, one might choose to answer only those questions which are +interesting, such as precompilation. It is also possible to supply a +default answer for a question which will be asked. + In addition, there are some questions which are not asked by the +verbose compilation type, but which nevertheless are available to +user-defined types. These are: Macro compile, Macro flush, Max space, +Expand splices, Special mode, and Glue. It is a restriction of the +compiler that the logical 'AND' of macro compile and max space must be +false. + One can select any of one's defined compilation types as an +answer to the 'Type of compilation' question, just like 'Verbose' and +'Short'. Except that the questions asked may differ, user-defined types +are identical to the predefined types. + +Tailor files + User-defined types are saved (and loaded) from the file +;%combt tailor. It is possible to load other tailor files, but +the %combt file in is loaded during startup. Tailor files are +quite similar to gc-dumped files, and thus cannot be edited using TECO. + +Create type + This special compilation type requests a name for the type +being made, then enters a loop with the prompt 'Question'. One may +choose any of the available questions, and either supply an answer or +(the default) request that the question be asked when a compilation of +this type is being submitted. Note that only the 'How to run' and +'Another compilation?' questions will be asked unless others are +explicitly supplied; but one may supply answers to 'How to run' and +'Another compilation' when creating a type. + In this mode, ctrl-R will return to the 'Question' loop if one +has just supplied an answer; otherwise, it returns to the 'Type of +compilation' loop, aborting the type. + Ctrl-G behaves exactly as it does in the normal loop. + To indicate that one is finished, one should answer 'Finis' to +the 'question' prompt. It is possible to supply several different +versions of the answer to particular question: the last one given will +be used. One may wish to default a particular question, after +specifying that it was to be asked or after supplying some different +default. This may be done by answering 'Delete question' to the +'Question' prompt, whereupon one will be asked for a particular question +to ignore. This question will then be completely ignored. Note that +ALL interesting questions are initially in this state. + There is also a 'Set question default' "question." This +requests a question name, then asks the user to supply an answer. The +question will be asked, with the default supplied. Thus default +settings of switches can be changed, and one can supply a file name for +the precompilation while still being asked whether precompilation is +desired. Unfortunately, user-supplied defaults for TEXT-type questions +are used if is answered; to get rid of the default, type +. Note that this is exactly the inverse of the +convention for defaulting file names. + + When 'Finis' has been typed, a new copy of one's tailor file is +written out. This may, in combination with 'Load tailor' and +'Replace tailor', have undesirable side effects. + +Print type + This requests the name of one of the types currently loaded, +and prints out for it all questions which either will be asked when a +compilation is being submitted or which have user-supplied defaults. If +a particular question has been globally 'turned off' (such as the new +compiler question, when there is no new compiler), an asterisk will be +printed on the appropriate line to indicate that the information there +is currently not used. + +Delete type + This requests the name of one of the currently-loaded types, +and deletes it. A new copy of the tailor file is written out, so all +trace of the type will vanish when this command is used. + +Alter type + This requests a type name, then becomes identical to +Create type, except that some questions already have answers. Again, +'Finis' must be typed to leave the loop and cause the modifications to +be filed; typing ctrl-R or ctrl-S will leave the loop, but the +modifications will be forgotten. + +Load tailor, Replace tailor + Both of these request a file name, defaulting to the last one +used for either a load tailor or replace tailor command. Initially this +is ;%combt tailor. Load tailor appends the types defined in the +specified file to those already loaded, while Replace tailor throws away +those already loaded first. The types defined in this way are not +distinguished from those loaded from one's own combat tailor; in +particular, using 'Toggle.verbosity' or any of create, alter, and delete +type will cause all the types currently loaded to be written out to +the combat tailor. If, therefore, one has done a replace tailor, one +can easily lose all of one's own types in this manner. I.e., it is +very easy to screw oneself. + +Xerox tailor + This requests the name of an existing user-defined type, and a +new type name. The new type becomes an exact copy of the +previously-existing type. This is particularly useful when one has +several different types which do almost the same thing. + + +Unimplemented features + An SNAME question will be installed, though not in the normal +'Verbose' sequence. This would cause the setting of the sname default, +which would alleviate some of the problems with NCOMBAT's habit of +printing out entire file names. \ No newline at end of file diff --git a/src/_batch/batchn.maker b/src/_batch/batchn.maker new file mode 100644 index 00000000..6a1da938 --- /dev/null +++ b/src/_batch/batchn.maker @@ -0,0 +1,8 @@ + + + + + ;"change some GC params for demon -- JHM" +-> TO CREATE SAVE FILE (permanent DEFAULTS TO <>)"> diff --git a/src/_batch/batchn.ujm150 b/src/_batch/batchn.ujm150 new file mode 100644 index 00000000..6859f42f --- /dev/null +++ b/src/_batch/batchn.ujm150 @@ -0,0 +1,709 @@ + + + + + + + + (TASKS-IN-QUEUE) + (NAME-OF-SCRIPT) STRING> + (BATCH-SCRIPT-LEVEL) FIX + (START-TIME) > + + + + )> + + +;"" + +; + +; + +; + + + + + TASK-NAME <> + TASK-STATE <> + TIME-OF-NEXT-RUN <> + NIGHT-RUN-SWITCH <>]>> + + + +> + +;"" + + +) + (TIME2 )) + #DECL ((TSK1 TSK2) VECTOR (TIME1 TIME2) + (VALUE) ) + >)> + >)> + > + +) (LEV <1 .MSGS>)) + #DECL ((MSGS) TUPLE + (OLD-INT-LEVEL VALUE) FIX + (LEV) ANY) + > + ) + () + ( + CR CR>) + (ELSE >)> + > + +> (VALUE) ANY) + + STRING> + !.MSGS CR>) + ( + + #FUNCTION ((A) #DECL ((A) STRING) + !.MSGS CR>) + .NOS>)>)>> + +) + 100>>> + !\ ) (T !\:)>>> + >> + +)) + #DECL ((TSK) VECTOR (TTYPE) (VALUE) FIX) + 1) + ( <=? "SHORT" .TTYPE>> 1) + (ELSE 2)>> + + + +) "AUX" GT) + #DECL ((VALUE GT) + (ID) > (UPDATED-ALREADY?) ) + + >) + (<=? .GT #FALSE ("FAKE TASK")> <>) + (.UPDATED-ALREADY? <>) + ( )>> + + + (Q-TASK) VECTOR + (ID) FIX>) + + #FUNCTION ((SQ) + #DECL ((SQ) LIST) + >) + (>> ;"THAT'S THE GUY" + ,AB-T-LENGTH> + ;"IN ABBREVIATED FORM" + ;"SPLICE OUT THE SHORT AND .." + > + >> + + > + ) + ( ;"IN FULL LENGTH FORM")> )> + >>) + ,QUEUE>> + + FIX> (P-TASK) VECTOR) + + <==? .IDN>) + ( <1 .IDN>> + <=? <2 .IDN>>>)>> + + +) + (M )) + #DECL ((S) (M) ) + > + > + +) (SPEC-NOS )) + #DECL ((VALUE NEWS) (SPEC-NOS) FALSE>) + + + #FUNCTION ((N "AUX" TSK) + #DECL ((N) FIX (TSK) ANY) + > + + > + + >)>) + .SPEC-NOS>) + (ELSE + )> + .NEWS> + +) + > + )) + #DECL ((V) VECTOR (N) ANY (TAGS) LIST) + "SPECS"> + >> FIX> + > + >> + ) + (T )>> + >)>> + + +> +; + +) (OBLIST ,BATCHQ-OBL)) + #DECL ((VALUE REWRITE-Q? WQ?) (D X FIELD NEW) ANY (F) FIX + (C) (MOD-USER) STRING + (TASK) + (ACKN) > (OBLIST) ) + + >> ;"OPEN MODS FILE" + ) ;"NONE (LEFT)" + (> ;"DELETE MODS OPEN WHEN ITS CRASHED" + + + > "DSK" ".BATCH">) + (>> ;"VALID MODS FILE?" + + + > ;"GET TASK DESCRIPTOR" + 2> + > ' FIX>> + >> + + > + > ;"NAME OF USER" + 2> + > STRING>> + ) + (ELSE )> + + + " for " .MOD-USER> + + 2> )> + > " " >> + + >> + + + >>) + (> + .NEW .TASK .MOD-USER> + >>) + (ELSE + + >)> + > > + + > + >)> + + "DSK" ".BATCH"> ) + + (ELSE ;"FILE HAD BAD STUFF IN IT" + + ;"DELETE IT! " + "DSK" ".BATCH">)> >> + + + (FNAME2) STRING) + <>) ;"EMPTY NOW IF ALL WERE DIGITS" + ( "0123456789"> ;"FIRST CHAR A(NOTHER) DIGIT?" + > ;"YEP, SKIP IT" + ) + (<==? <1 .FNAME2> !\ > ;"A SPACE -- " + >> ;"GOOD, ONLY SPACES" + >) + ( !\ > ;"NOPE, SOMETHING ELSE HERE" + )> >) + (T)> >> ;"OTHER GARBAGE IN FILE NAME ..." + + )> + .CHR) + .FNAME> > + + +) C + (FILE >)) + #DECL ((IDNUM) FIX (TASK VALUE) + (C) (FILE) STRING) + > + + > + + >) + (>> + >)> + )>> + + (C) CHANNEL + (READ-TASK-ACT) ) + > + + + T> + +) + (SQ )) + #DECL ((TSK) VECTOR (SQ) LIST (VALUE) ANY (SQ-N) FIX) + 2> + >> + )> + ) + (ELSE >)> > + .TSK> + + + + (VALUE) ANY) + + <>) + ()) + #DECL ((SQ) LIST) + 2> + >) + (<==? .TSK <2 .SQ>> + > + )> + >>) + (ELSE + > + )> >> + + +>) BT) + #DECL ((VALUE BT) (QN) FIX (SUB-Q) ) + + ;"END OF Q OR TIME NOT RIPE FOR FIRST JOB?" + >>>> + ;"THEN ABANDON SEARCH IN THIS SUB-Q" + >) ;"TRY SUB-Q 1 (IF NOT ALREADY)" + (ELSE >)>) + ( + ,AB-T-LENGTH> + ) + (>> + ) + (ELSE >)>) + (ELSE >)> >> + +)) + #DECL ((VALUE) ANY (B-TASK) VECTOR (RT) ) + >> + + +) + "AUX" (Q ,QUEUE) + TASK TASK-TIME) + #DECL ((VALUE WHEN) LIST (Q) VECTOR + (TASK) (TASK-TIME) ) + + ) + (>> + > + STRING> + >) + ( + )>)> + > >> + + (SUB-Q) LIST) + + #FUNCTION ((TSK) #DECL ((TSK) VECTOR) + >) + >> + +)) + #DECL ((VALUE) ANY (TSK) VECTOR + (TIME-OF-RUN) STRING>) + "RUNNABLE"> + > + ) + ( ) + (.TIME-OF-RUN)>> > >> + + (TSK) VECTOR) + "RUNNABLE"> + > + > >> + +) + (TSKS-IN-Q '()) (RUNNG '()) + Q N QDATE) + #DECL ((VALUE) (Q QDATE) ANY (DSK-Q) + (N) FIX (TSKS-IN-Q RUNNG) LIST) + + >> + >>> + + > + <==? ,NQUEUES>> + + + + #FUNCTION ((SQ) + #DECL ((SQ) LIST) + + #FUNCTION ((TK) #DECL ((TK) VECTOR) + !.TSKS-IN-Q)> + "RUNNING"> + !.RUNNG)>>) + >) + .Q> + + )> + + ">)> + + + ) + (<==? ,NQUEUES 2> + + ) + (ELSE + + >>>)>> + )>> + + #FUNCTION ((ID) #DECL ((ID) FIX) + ) + .RUNNG> + + + > <* -30 24 60.0>>>;" +If no queue update in a month, system clock must be wrong => DON'T RUN TASKS."> + + 0> + + >> + <=? <1 > .CDATE>>> + +>) + (FN ) + (FFN ) + C) + #DECL ((TSK) VECTOR (C) + (TN FN FFN) STRING + (VALUE Q-TOO?) ANY) + + > + + + "REMOVED"> + + + + T) + (> + .TSK .C ,BQERR ,BATCHQ-OBL> + + >> + + > + T) + (ELSE + > + .C)>> + + +) + "AUX" (OUTCHAN >)) + #DECL ((VALUE) ANY (Q2 OUTCHAN) ) + + + + + #FUNCTION ((SQ) + #DECL ((SQ) LIST) + > + + #FUNCTION ((T-TSK) + #DECL ((T-TSK) VECTOR) + ,AB-T-LENGTH> + ) + (ELSE + + + #FUNCTION ((X) + #DECL ((X) ATOM) + > + ) + ,AB-FIELDS> + )>) + > + ) + ,QUEUE> + + > + + + )> + T) + (ELSE + >)>> + + +) + "AUX" (HOUR <1 <2 .DATE-TIME>>) + (DAY >)) + #DECL ((VALUE) ANY (DATE-TIME) (HOUR DAY) FIX) + > ;"Night is: between 1 am and 8 am" + <==? .DAY 0> ;" and Sundays" + ;" and Mondays before 8 am" + > + > > ;" and MIT holidays" + >> + > >> + + +)) ;"returns the time of the next NIGHT?" + #DECL ((VALUE) LIST (DAY) FIX) + ;"which starts at 0:00 on sundays" + <==? .DAY 0> ;" and mondays" + ;" and day after holidays" + '((1) ())>>> > + ;" and holidays" + ) + (ELSE )>> ;"else at 1:00 tomorrow" + + + + (OLD) FIX (U) ) + 0>> ;"LOGIN IF DEMON" + + + > + )> + > + )> + ) + (ELSE > )> + + " ******" CR + " ITS has been up for " 30> " seconds."> + > + + + + ) + (T + )> + " ******* ]" CR> + + > + > + ;"Don't tape-dump LOG, just OLDLOG. + (Also can tell whether daemon went down OK.)" + + )>) + (ELSE ;"MUST BE AN EXTRA DEMON, SHOULD NOT BE HERE" + > + + )> + >)> ;"HANG AROUND FOR SOMEONE TO SEE (& NOT BURN CPU)" + + + "That's All, Folks") + (ELSE + + + )> > + + +)) + #DECL ((VALUE) ANY (U) STRING) + 3> + !\_> + !\_> + !\_>>> + + +) + "AUX" (SAVVY >)) + #DECL ((SAVVY) STRING (PERMANENT) ANY) + + + )> +"BATCH READY -- INVOKE TO START + TO CREATE SAVE FILE") + (<=? .SAVVY "RESTORED"> + "BATCH READY -- INVOKE TO START") + (ELSE + > + )>) + (ELSE .SAVVY)>> + + +) + CH + (LAST1 ">) + (U '![0]) (LASTL >) + (LAST >>>)) + #DECL ((VALUE) ANY (LAST) (TASK) VECTOR (ID) FIX + (CH LAST1) (U) (LASTL) ) + + <==? .ID .LAST>> + 9> + "DSK" ".BATCH">> + + >) + (ELSE + "DSK" ".BATCH">)>> + + .NEW-TYPE> + > + + > + + + )>)> + T> + +)) + #DECL ((NEWSTATE OLD-STATE HUMAN) STRING + (ACKN) ATOM (TASK) VECTOR (VALUE) ANY) + + ) + (<=? .NEWSTATE "REMOVED"> + + ) + (<=? .NEWSTATE "RUNNING"> + + " by " .HUMAN>) + ( + > + ) + (ELSE + + + ) + ()> )> > + + +)) + #DECL ((TASK) VECTOR + (VALUE) ANY (HUMAN) STRING + (OLD-TIME NEWTIME) ) + + + ) + (ELSE )> > + + )> > + + + +) + *2*> FIX> 0>> ;"SUSET .RTTY " + + diff --git a/src/_batch/batchq.ujhm12 b/src/_batch/batchq.ujhm12 new file mode 100644 index 00000000..8304812f --- /dev/null +++ b/src/_batch/batchq.ujhm12 @@ -0,0 +1,44 @@ + + + + + + +) + > + +;)) + #DECL ((VALUE) ANY (FILE) STRING) + "FILE EXISTS")>> + + + >>> + + <==? #WORD 2 %>>>> + + diff --git a/src/_batch/nbatch.usg140 b/src/_batch/nbatch.usg140 new file mode 100644 index 00000000..dceb4f69 --- /dev/null +++ b/src/_batch/nbatch.usg140 @@ -0,0 +1,1562 @@ + +;"NEW BATCH INTERFACE (MUDCAL) by S. W. Galley (SWG) and Jerry Morrison (JHM) +-- TALKS DIRECTLY TO DISK QUEUE, BY WRITING OUT SPECS AND MODS FILES IN .BATCH +DIRECTORY, AND IPC'S THE DEMON OR MODIFIES ITS SCHEDULED AWAKENING TIME." + + + +; + + + +"> + + + + + + + (CTL-R-MSG FORMAT) + STRING + (BATCH-COMMANDS + MAIN-TASK-ELEMENTS + TASK-CREATION-COMMANDS + TASK-IDS + TASK-IDS-NULL + TASK-MOD.TION-COMMANDS + YES-NO + SWITCH-SETTINGS + TASK-STATES + TASK-TYPES) + SYMTABLE + (TASK-BUILD MODS-BUILD CC-ARGS) + VECTOR + (SPECS-HEADINGS + MODS-HEADINGS + DEFAULT-INPUT-FILE + DEFAULT-FILE-TO-RUN + DEFAULT-OUTPUT-FILE) + + (SPECS-PRINTERS) + + (R-ARGS) + + (DISK-DIR NEW-DIR TASK-MODS CONFRIM-V) + > + + + +> ;"sample description" + > ;"sample modification" + )> + ;"for un/parsing field names and values" + > + ;"for finding SPECS files in disk directory" + > ;"ditto for MODS files" + ;"internal queue of task specs" + ;"for splicing new specs into QUEUE" + > ;"stores old disk dir in image mode" + > ;"ditto new disk dir" + > ;"maps MODS numbers to SPECS numbers" + + 0>> ;"records whether those field values confirmed" + ;"for defaulting task identification" + ;"msg when user types ^R"> + + + "short.create.task" + + >> + "long.create.task" + > + "copy.task" + + "modify.nascent.task" + > + "modify.task" + + >> + ;"modify.existing.task" + ; + "modify.similarly" + > + ;"modify.existing.similarly" + ; + "abort.task" + + "print.task.description" + + "print.task.status" + + "print.queue.status" + + "signal.daemon" + + "revise.task.identification.symbols" + ,NULL> + "remove.task.identification.symbols" + + ,NULL>]> + !,PURELIST)>>>> + + <>> + "name" + <>> + "state" + <>> + "to-run-at" + <>> + "night-run-switch" + <>> + "type" + <>> + "scheduler" + <>> + "reschedule-info" + <>> + "stop-running-after" + <>> + "maximum-times-to-run" + <>> + "file-to-run" + <>> + "input-stream" + <>> + "output-file" + <>> + "job-control-line" + <>> + "delimiter-string" + <>> + "working-directory" + <>> + "cpu-time-limit" + <>> + "acknowledgement-info" + <>> + "run-test" + <>> + "run-test-info" + <>> + "hang-time-limit" + <>> + "restart-switch" + <>> + "batch-queue-check-switch" + <>>]> + !,PURELIST)>>> + + + "end.specifications" + END-SPECS + "quit.specifications" + END-SPECS + "abort.specifications" + T]> + ,MAIN-TASK-ELEMENTS]> + !,PURELIST)>>> + +> + "end.modifications" + END-SPECS + "quit.modifications" + END-SPECS + "abort.modifications" + T]> + ,MAIN-TASK-ELEMENTS]> + !,PURELIST)>>> + + + !,PURELIST)>>> + + + !,PURELIST)>>> + + + !,PURELIST)>>> + + + "no" + + "false" + ]> + !,PURELIST)>>> + + !,PURELIST)>>> + + <2 .ITM>) (T .ITM)>> + +\ + +) HUM) + #DECL ((BUILD) ) + > > + ;"First get viable name," + + ,RDR ;"then some 'important' fields," + '![%,FILE-TO-RUN + %,INPUT-STREAM + %,OUTPUT-FILE + %,TASK-TYPE + %,TIME-OF-NEXT-RUN + %,RESCHEDULE-INFO!]> + >)> ;"then enter field/value loop."> + + (BUILD) + (F) ) + > + ;"OLD = is there a real task already (M.N.T cmd)?" + >> <=? .BLAH "">> + )>> ;"get name for new task" + > ;"put in current time" + > VECTOR> + > ;"establish defaults" + > VECTOR> + > + > STRING> + > + + >>> + >> + ) + (" +Task creation was aborted.")>>> + +) TNAME) + #DECL ((VALUE) STRING (BUILD) ) + >> <=? .TNAME "">> "") + ;"Get viable task name." + ( "TS" .TNAME]> + .TNAME "INPUT"]> + .TNAME "OUTPUT"]> + >> + ;"^R typed at first field" + "") + (T + > + )> + > + ) + ("Task creation was aborted. If you wish, use the MODIFY.NASCENT.TASK +command to fix the task description.")>)>> + + ;3 + >> ;4 + > + ;3 + <- ,INPUT-STREAM ,WHEN-ORIGINATED 1> ;5 + > ;8 + ;9 + <- ,BATCH-QUEUE-CHECK-SWITCH ,INPUT-STREAM -1> ;12 + >> ;13 + ;"Here on is equivalent to RDR actions:" + + #FUNCTION ((F) #DECL ((F) FIX) + >>) + '![%,TASK-STATE %,TASK-TYPE!]> + + #FUNCTION ((F) #DECL ((F) FIX) + >>>) + '![%,RESTART-SWITCH %,NIGHT-RUN-SWITCH %,BATCH-QUEUE-CHECK-SWITCH!]> + >> + > )> + >>> + '> + "TS" ]>>> + + >>>)> + + >>> + >>> + +)) ;"T? = is V a description?" + #DECL ((VALUE V) VECTOR (T?) ) + #FUNCTION ((VV) #DECL ((VV) VECTOR) >) .V> + ; ) + (T > >)>> + ;"compiler likes this better" + > + "TS" "MDL"]> + "MDL" "OUTPUT"]>)> + + #FUNCTION ((F) #DECL ((F) FIX) ) + '![%,OUTPUT-FILE %,FILE-TO-RUN %,INPUT-STREAM %,WORKING-DIRECTORY!]> + ;"remember none of these confirmed" + .V> + +) + >) ;"Already confirmed." + (<=? <> + >> + + <>) ;"No => get another and check it too." + (T )> + ;"anything else => OK, note already confirmed."> + +> + STRING> >> + <1 .C>>> + .FSPV + ,DEFAULT-OUTPUT-FILE + ":; ">> + +) (OBLIST ,BATCHQ-OBL) + (BUILD .BUILD) (OUTCHAN .OUTCHAN)) + #DECL ((VALUE E) ANY (FIELD) FIX (V RDR-ARGS) VECTOR + (OBLIST) (BUILD) VECTOR) + + ;"LVALs in args needed for these fields." + > + + ;"for compiler" + >> + ) + (T >)> + ;"Get filename Vector or text String." + ) + ( > <>>) + (<==? .FIELD %,OUTPUT-FILE> + > + >>) + (<==? .FIELD %,FILE-TO-RUN> + >>)> + + ;"not confirmed by user" + .E) + (T <>)>) + (T + > + + STRING>> ;"anything typed but ^R" + + "TS" .E]> + .E "INPUT"]> + .E "OUTPUT"]>) ;"Fix defaults." + (<==? .FIELD %,TASK-STATE> >) + ;"remove nasty symbol" + (<==? .FIELD %,TASK-TYPE> + > ;"remove nasty symbol" + >) + ;"Don't bug prime-time users." + (<==? .FIELD %,TIME-OF-NEXT-RUN> + ) + ;"handy if modifying" + ( + >>) ;"remove nasty symbols" + (<==? .FIELD %,RESCHEDULE-INFO> ;"ALLOW TIMFCN CALLS" + >) + (<==? .FIELD %,WORKING-DIRECTORY> + + + ;"Fix defaults." + ) ;"not confirmed by user"> + ;"Put field into sample." + .E) + (T <>) ;"^R typed.">)>> + +\ + + !,PURELIST)>>> + +">" +;"JUST TO TABULATE ALL FIELDS IN PROPER ORDER" + + + + + + + + + + + + + +">" +;"PUT-TASK-BUILD RELIES ON THIS FIELD NOT BEING REQUESTED DURING LONG-CREATE-TASK." + + + + + + + + + + + + + + "BATCH" "INPUT"]> + +> ,DEFAULT-INPUT-FILE) (T '[])> + + + ]> + + "BATCH" "OUTPUT"]> + + + + + + + + + + + + + + + + + + + + + + + +) + >> + ;"only TIME-OF-NEXT-RUN and later" + !,PURELIST)>>> + +\ + + (FIRST) + (OUTCHAN) CHANNEL) + > + #FALSE (#FALSE ())> ;"^R typed" + )> ;"If first ^R, quit." + ) ;"Else type helpful msg." + ( ;"null line typed" + ) + (>> )> + ;"get field value: True => quit looping" + >>> + + (OUTCHAN) CHANNEL) + ">>> + ;"can't do it" + + > + + "Use MODIFY.NASCENT.TASK to try again.") + ;"CALICO prints value." + (T + + .CHNL + ,ERROR + ,BATCHQ-OBL> ;"put out" + + .BUILD> + >> + !\.>)>> + +\ + +) (SPECS <>) + "AUX" STATUS TSTAT) + #DECL ((VALUE) ANY (MODS SPECS) + (STATUS) FALSE> (TSTAT) ANY) + ) ;"IPC SEND IF POSSIBLE" + (>> + ;"ASSUME DEMON IS NOT UP" + ) ;"NOT IN DEMON TABLE -- SO DEMSIG IT" + (.MODS ;"FOR A MODS FILE ..." + > "RUNNABLE"> + <4 .STATUS>>) + (.TSTAT) ;"NO LONGER RUNNABLE ==> NO DEMSIG" + ( > + <4 .STATUS>>)>) + (.SPECS <4 .STATUS>>) + ;"FOR A SPECS FILE ..." + ()>> + +) + (N-SWITCH )) + #DECL ((VALUE) FLOAT ;"COMPUTES MINUTES UNTIL DEMON NEED BE SIGNALLED" + (SPECS-OR-MODS) VECTOR (R-TIME) (N-SWITCH) ANY) + ;"NO LONGER A NIGHT-RUN TASK" + 0>) (0)>) + (.N-SWITCH ) ;"IS NOW A NIGHT-RUN TASK" + (.R-TIME 0>) ;"SOME 'FUTURE' DATE" + ()> ;"ELSE AT NIGHT..."> + + (OLD-MINS) FIX) + ) + ( ) + ( + + 0 + >)>> + +)) + ;"returns the time of the next NIGHT?" + #DECL ((VALUE) FLOAT (DAY) FIX) + 0) + ( <==? .DAY 0> > + ;"i.e. 0:00 on sundays and mondays and days after holidays" + >) + (T >)> ;"else at 1:00 tomorrow"> + +) + "AUX" (HOUR <1 <2 .DATE-TIME>>) + (DAY >)) + #DECL ((VALUE) ANY (DATE-TIME) (HOUR DAY) FIX) + > + ;"Night is: between 1 am and 8 am" + <==? .DAY 0> ;"and Sundays" + > ;"and Mondays before 8 am" + > > ;"and MIT holidays" + >> >> + ;"and before 8, days after holidays"> + + (N) > + (L) ) + + "ID(s)" + '[ + "Please type the identification(s) of the task(s) you want to modify." + ""] + '["MULT" "SYM" "FIX"]>> + ;<=? .N #FALSE (#FALSE ())> + )> ;"^R typed" + >> + ) ;"no IDs typed" + (<1? > >>)> + ;"one ID typed" + + > + > + + ;"If modifying more than one," + + > + ;"signal if any output." + ) + ;"Replace LIST that OUTPUT-MODS munged." + ( )> + ,NULL) + (" +Task modification was aborted.")>>> + + ,TASK-IDS) (T )>> + +) (C )) + #DECL ((V) VECTOR (VALUE) SYMTABLE (U) STRING (C) ) + > ;"V = entire contents of disk file") + (T )> + > + !\. >> + <1 .V>> ;"Return user's name.numbers.") + (T )>> + ;"REST .L to remove name of queue">> + .V>> + > .V>> + ,TASK-IDS-NULL) + ;"If file OPEN fails or all queues empty, use empty symtab." + (T ) + ;"Make symtab out of vector.">>> + + (BUILD) + (OUTCHAN) CHANNEL) + ">>> + + + + + > + + + <>) + (T + + ;"maybe LIST in .BUILD" + .CHNL + ,ERROR + ,BATCHQ-OBL> + + + + + + T)>> + +) "AUX" F ICH FLT (OUTCHAN .OUTCHAN)) + ;"F=field ICH=test channel" + #DECL ((TASK VALUE) VECTOR (MOD?) (F) ANY (FLT) FLOAT + (ICH) (OUTCHAN) CHANNEL) + > STRING>> > + ;"not usable string" + >>) + ( ) + ( + )>)> + ;"no file-to-run either" + >> ;"false" + )>) + (> ;"not string either" + >) + (T )>)> + > STRING> + > ;"not usable string" + >)> + ) + > STRING> + > + ) ;"no output wanted" + (<=? .F "NUL:"> ) + ;"ditto" + (<=? <1 > "NUL"> + ) ;"ditto" + ( >> + ) ;"viable file" + (> + ) + (T + + + + + + >)>) + (.F >)>> + > LIST> ;"canonical" + >) + ( > '![!\N !\n!]>> + ;"now!" + >) + ( > + >)> + ;"else tonite" + > FLOAT>) ;"canonical" + ( >) ;"fix" + (>>)> ;"default" + >> ;"default" + >) + ( > ;"not canonical either" + )> + >> ;"not default" + "SHORT"> 5.0) (30.0)>>>) + ( 5.0> + )> ;"constraint" + >>) ;"default" + ( >>) + ;"float" + (> >>)> + ;"random" + > ;"constraint" + > ;"constraint" + > ;"Ignore if there's a scheduler." + > LIST> ;"interval" + >) + ;"canonicalize" + ( ;"sequence" + >) + ;"canonicalize" + (.F >)>)> + ;"Else must be null." + > LIST> + ;"date/time" + >) + ;"canonicalize" + (.F >)> + ;"else must be null" + FIX>> + ;"Only FIX allowed." + >>)> + > STRING> + >>) + ;"string -> vector" + (>) ;"no change" + (> ;"default" + > + "TS" + "MDL">]>)> + > VECTOR> + ;"EXISTENCE CHECK" + <4 .F> <1 .F> <2 .F>>> + ;"literal" + "SYS"> ;"or any SYSn dir" + <4 .F> "DSK" "SYS1">> + <4 .F> "DSK" "SYS2">>>>> + ) + (T ;"not there anywhere" + + + + + + >)>>> + '> + ;"from FSP-PARSE" + > + "MDL"> + "INPUT"]>)> + > VECTOR> + ;"EXISTENCE CHECK" + <4 .F> <1 .F> <2 .F>>> + ) + (T + + + + + + >)>>> + > STRING>> > + ;"either usable string or false" + >>)> + > + STRING>> + > ;"either usable string or false" + >>) + ( + ) (T .C)>> + .F>>)> ;"Remove unwanted ';'." + > STRING> + ;"EXISTENCE CHECK" + > + ) + (T + + + + + + >)>>> + ;"On new task," + + #FUNCTION ((SW "AUX" (E )) + #DECL ((SW) FIX (E) ANY) + + >)>) ;"user said no." + '![%,RESTART-SWITCH + %,NIGHT-RUN-SWITCH + %,BATCH-QUEUE-CHECK-SWITCH!]>)> + STRING>) ;"any string OK" + (> + + <=? <1 .F> "SYS"> + <=? <3 .F> "TS"> + '["TECO" "NTECO" "T" "NT"]>> + ;"LOOKS LIKE TECO" + ) ;"AN ALTMODE FOR TECO" + (>)> ;"let daemon decide" + > + ']>>]>>) + (.F >)> ;"default" + .TASK> + +)) + #DECL ((T-NUM) (CHNL) + (SYM?) ) + + "ID" + '[ +"Please type the identification of the task you want aborted immediately. +The task will remain in the queue in the 'ABORTED' state." + ""] + >>> + > ) + ;"actual ID" + (<=? .T-NUM #FALSE (#FALSE ())> >) ;"^R typed" + ( 0>) ;"use default if any" + (>)> ;"done -- return false for debugging" + ) + ;"DIRECT IPC MSG TO ABORT" + (T + ">> ;"DEMON NOT UP" + !\"> + TASK-STATE + "\"ABORTED\""] + .CHNL> + )>>> + +) + >>) + ( + )>> + +\ + +> ;"could be local but for this" + ", X A13)"> + !,PURELIST)>>> + +) (OUTCHAN .OUTCHAN)) + #DECL ((V) VECTOR (C) (OUTCHAN) CHANNEL) + + + + + > + + + ) + (T + )> + > + >> + >> ;"V = whole file" + ) + (T ;"or (2) from in-core queue" + + + + ,TASK-STATUS ,QUEUE>)>> + +) + >) + (T >)> + )>> + +) (OUTCHAN .OUTCHAN) + (TUP + + + + + .S>)) + #DECL ((VALUE TMPL) VECTOR (S) (TUP) TUPLE + (DT) >> (OUTCHAN) CHANNEL) + + ;"ID type name originator state" + ;"line up columns and get time" + + >) + (<=? .S "RUNNING"> + + >) + (> + >)> + )> ;"print time" + .TMPL> + + (OUTCHAN) CHANNEL) + > + + >)> + > + + (TMPL VALUE) + (OUTCHAN) CHANNEL) + + + "ID" + '[ + "Please type the identification of the task you want to inspect." + ""] + '["SYM" "FIX"]>>>> + <>) ;"^R typed" + (<==? > 0> <>) + ;"number defaulted" + (> .TMPL) + (T > <>)> ;"GET-TASK failed"> + + (N) FIX) + + + + " is not in the Batch queue.">) + FALSE>>> + + (N) FIX) + + #FUNCTION ((BT) + #DECL ((BT) VECTOR) + > + ;"ensure task is real" + > + <> ;"make compiler happy") + ,QUEUE>> + + (DIFF) (TEMP) ANY (N) FIX + (OBLIST) ) + >>) + ;"can't open directory" + ( <=? ,NEW-DIR ,DISK-DIR>>) + ;"no change in directory" + (T + > + ;"compare new&old SPECS no.s" + > ;"update all tasks" + ,INSERT-SPECS <1 .DIFF>> ;"new SPECS numbers" + ,REMOVE-SPECS <2 .DIFF>>) ;"gone SPECS numbers" + (> + ;"get new task" + 1>> + >>> + >)>) + ;"don't remember dir if other changes" + (> + ;"remove gone task" + 1>> + >>> + >)>) + ;"don't remember dir if other changes" + (> >)> + ;"CHECK FOR BOGUS NO." + > + ;"compare new&old MODS no.s" + ,UPDATE-SPECS <1 .DIFF>> + ;"Update specs for all new MODS." + ;"Read daemon-modified specs for all gone MODS." + #FUNCTION ((M) + #DECL ((M) FIX) + > + ) + ;"Forget modified-task number." + <2 .DIFF>> + + ;"remember how dir looks now." + )>)>> + + "DSK" ".BATCH">)) + #DECL ((N) FIX (TMPL) VECTOR (C) ) + > + ,TASK-ID-NUMBER ;"Make vector." + .N>> ;"If it's real, i.e. has a name," + ) + + >>>> + + > + >> + > ;"splice a la EDIT" + ) + (<==? .N >> + ;"replace previous" + ) + (> >)>>)> + )>> + + + #FUNCTION ((Q) + #DECL ((Q) ) + >> + + > + > + ;"unsplice a la EDIT" + ) + (T >)>) + ,QUEUE>> + + "DSK" ".BATCH">)) + #DECL ((VALUE X) ANY (M N) FIX (MODS) VECTOR (TASK) + (C) ) + ) + >> + ;"read MODS myself (makes smaller garbage vector)" + + > + ;"Find task number to modify." + 2> + >> ;"remember it" + > ;"Find task in core." + ) + ( ,TASK-FIELDNAMES> + > <2 .MODS>>)> + >>>> + +\ + + (TMPL) + (OBLIST) (OUTCHAN) CHANNEL) + + + #FUNCTION ((HDG FCN FLD) + #DECL ((HDG) STRING (FCN) ATOM (FLD) ANY) + + + )>) + + ,SPECS-PRINTERS + >) (T .TMPL)>>> + +>> (OUTCHAN) CHANNEL) + ) + ( + > + + >>>> + + >> )> + >) + (T )>> + + (OUTCHAN) CHANNEL + (TMPL) VECTOR) + ) + ( + + >) + ( + + #FUNCTION ((DT) #DECL ((DT) ) + + ) + .FLD>) + (T ;"PPRINT to right of current column.")>> + +> + + > + + > + + >> + + (OUTCHAN) CHANNEL) + ) + (<=? .FLD ""> ) + ( ) + (T )>> + +) + > + +> (OUTCHAN) CHANNEL) + + > + + (OUTCHAN) CHANNEL) + ) + (.FIL ) + ()>> + + + ) + (.SWITCH + )>> + + + ) + (.SWITCH )>> + + + ) + (.SWITCH + )>> + +\ + + !,PURELIST)>>> + + + + + + + + + + + + + + + + + + + + > + + !,PURELIST)>>> + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + !,PURELIST)>> + ,WHEN-ORIGINATED + "Modified at: "> + ,BY-WHOM-MODIFIED + "Modified by: ">> + + + diff --git a/src/_batch/taskm.ujm127 b/src/_batch/taskm.ujm127 new file mode 100644 index 00000000..58da5c3a --- /dev/null +++ b/src/_batch/taskm.ujm127 @@ -0,0 +1,2294 @@ + + + + + + + + (OUR-PGFLTS SYS-PGFLTS LAST-CHECKED-TIME MY-USER-INDEX T-INF-PAGES + MY-INIT-PAGES SYS-INIT-PAGES N-RUNS ) FIX + (*L *USIPRQ *USRTIM *USRTM1 *NSWXFR *NSRXFR *AUSOPG + *NFSTTY *NSTTYS *JNAME ) + (LAST-CHECK LOAD-REF1 LOAD-REF2 LOAD-REF3 LOAD-REF4 LOAD-REF5 + T-INF-CPU T-INF-REAL MY-INIT-CPU-TIME SYS-INIT-CPU-TIME ) FLOAT + (MY-INIT-REAL-TIME) LIST + (STY-OPEN-FAIL) >> + +> + )> + +;<'PACKAGE "TASKV"> + +; + +]> + (DELIMITER-STRINGS + JCL-LINES) + (HANG-COUNTS + STY-NUMBERS) + (JOB-CHANNELS + STY-INPUT-CHANNELS + STY-OUTPUT-CHANNELS) ]> + (INFERIOR-NUMBERS + JOB-ID-NUMBERS + JOB-SYSTEM-INDEXES) ]> + (LAST-CPU-CHECKS + OVERHD-REFS) + (OUTPUT-FILES) ]> + (OUTPUT-SCRIPTS) ]> + (SPECS-OF-JOBS) ]> + (STY-INPUT-IHEADERS + STY-OUTPUT-IHEADERS) ]>> + + + + + + +>> + +;"buffer of 640 chars (dump every 320)" + ;"overflow string buffer">>> + +>> + +>> + +>> + + >> + +> + +> + +>> + +>> + +>> + +>> + +> + +> + + + +>> + +> + +> + +> + +; + + +;"This is the main entry to the task manager (top level function). After +initializing the queue, batch calls START-RUNNING, which handles all task- +managing, then resets the wakeup time for the demon, and returns. + +START-RUNNING initializes some data bases, starts jobs running in each +run-slot, then enters a loop, seeing that all run-slots are checked on +once per minute. When there is nothing left to do, it waits for a short +time (in case something comes along) and quits." + +>> + (TIME-TILL-SYSDOWN) FIX (U) ) + + + + > 0> ;"SYSTEM GOING DOWN?" + + " initializing, but system going down at " + + ('(0 0 0) (0 0 )) >> + CR " No jobs will be started." CR>) + (ELSE >)> + + + >> ,JOB-CHANNELS> + > ,STY-NUMBERS> + >> ,INFERIOR-NUMBERS> + >> ,JOB-ID-NUMBERS> + ;"STD FOR 'THERE IS A JOB IN THIS Q SLOT NOW'" + > ;"RECORD OF LAST STY HASSLE" + ;"KILL MARKERS LEFT FROM BATCH/SYSTEM CRASH" + + + > + >> + )> + + + ;"MAIN LOOP, CHECKS ON ALL RUN SLOTS AND WATCHES SYSTEM LOAD" + + ;"ANYBODY HERE?" + 5) (T 1)> + ,SLEEP-INTERVAL>> ;"YES, SLEEP A BIT &" + )>> ;" GO CHECK AGAIN" + + ;"NO JOBS NOW - START MORE?" + > + >>) + + ;"YES, IF ANYTHING TO RUN" + (> + >> + 5.0>> ;" (IN NEXT 5 MINS)" + ;"NOTE THAT THIS IS NEGATIVE IF + THERE IS ALREADY SOMETHING WAITING, + E.G., IF THE SYSTEM IS LOADED" + 60.0>> ;"SLEEP TILL THEN" + )>> ;"OUTER LOOP AGAIN" + + + ".BATCH">) + ( + + > ;"just public info" + > + + ) + ( > + ) + (ELSE )>> + + +;"START-RUN-SLOTS simply starts a job running in each possible run-slot" + + (THE-Q) FIX) + ) + (> + > + )> + > >> + +;"CHECK-RUN-SLOTS is called upon once per minute while the task manager is +running to see that all run-slots are running smoothly. Running jobs are +checked for cpu usage over their limit and for no cpu usage, empty run-slots +are checked to see if they can start running jobs" + + )> + + > >> + +;"SCRIPT-START-STATS makes some statistical notes in the batch log about +starting up the demon (from login to start of task manager)" + + + " cpu mins, " .Q-PAGES " pages" CR + "Queue start used" + > + .Q-CPU-T>> + " cpu mins in" + > + .Q-REAL-T>> + " mins, " + <- >> + .Q-PAGES> + " pages"> + + <* 4.0E-6>> + 60.0>> + >>> + + +;"SCRIPT-END-STATS does the analogous thing when the task manager +finishes everything, and the demon is ready to logout" + + + ,MY-INIT-REAL-TIME>> ;"REAL MINUTES" + ,MY-INIT-CPU-TIME>> ;"RUN TIME" + > ;"PAGE FAULTS" + ,MY-INIT-PAGES>> + 0.01>> ;"AVG % OF CPU" + + <* 4.0E-6>> + 60.0> + ,SYS-INIT-CPU-TIME> + 0.001> + %>> ;"SYS IN SECS, MINE IN MINS" + ;"% OF PGFLTS" + > + ,SYS-INIT-PAGES>> + 0.001> + 0.01>> + 0.01>> + ;"% TOTAL DEMON CPU TIME TO TASK MANAGER" + ;" (AS OPPOSED TO INFERIORS) " + + ", inferiors" + " in " ,N-RUNS " runs" CR + " cpu mins" "," + "%," + "% of user time, inferiors" CR + " page faults " .PAGES "," + "%, inferiors " ,T-INF-PAGES CR + " cpu overhead" "%" CR + "********************************" CR>> + + +;"ALLOW-A-SYS-LOAD causes a normal demon to sleep long enough to get +a measurement of the system load (only really measured once per minute). +When debugging, the measurement is punted for speed" + + ,LAST-CHECKED-TIME>)) + #DECL ((VALUE) ANY (SINCE) FIX) + ;"SLEEP ENOUGH SO SYS-LOAD WILL DO SOMETHING" + >)>> + + +;"SETUP-INPUT-STRING sets up the input to be given to a task. +This must be gotten from the task descriptor, or read from a file +before the job is started" + +> + >> + >>) + (ELSE ;"RETURN FALSE FROM OPEN" + + .INPUT)>) + ( + >) + ( + >) + (ELSE )> > + +>)) + #DECL ((VALUE S) STRING (CHAN) CHANNEL) + >> + + .S> + +;"NO-LFS punts line feeds immediately following carriage returns" + +)) + #DECL((VALUE CSTRING) STRING (CHR) CHARACTER) + + .CSTRING>> .CSTRING) + (ELSE + > + <==? .CHR %>> + + )> + ) + .CSTRING>)>> + +;"ANY-JOBS-AROUND? decides if there are any jobs considered +'RUNNING', ie, if any of the run-slots are non-empty" + + 0>> + +;"RESCHEDULE-DEMON is an auxilliary function for setting the restart +time for the batch demon" + +)) + #DECL ((VALUE) ANY (MINUTES) (MINS) FIX) + > + +;"SETUP-SYSTEM-LOCATIONS does an ITS-EVAL on several needed symbols in +ITS' symbol table. This must be done every login, since new versions of +ITS will affect these locations. This function will report on any symbols +that have been outdated and removed from ITS" + +>> ;"LENGTH OF SYSTEM USER TABLE" + >> ;"PAGE FAULTS FOR ONE USER" + >> ;"CPU SECS____ FOR ALL USERS" + >> ;"EXTRA 4.0uSECS FOR USRTIM" + >> ;"ACTIVE JOB SWAPPED OUT PAGES" + >> ;"SYSTEM WRITE PAGE FAULTS" + >> ;"SYSTEM READ PAGE FAULTS" + >> ;"NO. OF FIRST PSEUDO-TTY" + >> ;"NO. OF PSEUDO-TTYS" + >> ;"LOCN OF JNAME FOR JOB 0" + + ) + ( + + )>) + '![*L *USIPRQ *USRTIM *USRTM1 *AUSOPG *NSWXFR *NSRXFR]>> + + > + + ) + (T >)> + + + >>> + >> + + "UIND"> FIX> ,*L>> + + > + >> + > + > + +;"SYS-LOAD returns the 'loadage' of the system, by the current algorithm. +This is measured no more often than once per minute." + +) + ;(PGFLTS >) + CHECK SS) + + #DECL ((VALUE CHECK) FLOAT + (OLD-INT-LEVEL ;OUR-PGFLTS-LAST ;SYS-PGFLTS-LAST + ;PGFLTS SS) FIX) + + > <+ ,LAST-CHECKED-TIME 60>> ;"ONLY CHECK SYS 1/MIN" + + ,LAST-CHECK) + + (ELSE + ; + ) + ( + + ,*USIPRQ>> + .PGFLTS>>)> + > > + + ; + ; >> + + ; + <- ,OUR-PGFLTS .OUR-PGFLTS-LAST>>> + > > > + + >> + + + )> > + +;"RUN-TIME computes the cpu time useage for some job -- either an +inferior or 'myself'" + +)) + #DECL ((VALUE) FLOAT (JB) ) + <* FIX> + %>> + +;"SCRIPTOR-INTERRUPT-ROUTINE is signalled (by ) +to happen at level 5; to output the internal buffer for a job; whenever +it fills up, and a few other times. This must happen at INT-LEVEL 5, +due to channel utilization problems" + +) + (JOB-CH ) + (CLOSE-SW )) + #DECL ((VALUE) ANY (Q-SLOT) FIX (FILE) + (JOB-CH) (CLOSE-SW) ) + + )> + .FILE> + + )> )> )> > + +;"SCRIPT-OUTPUT-BUFFER does the dirty work for the SCRIPTOR-INTERRUPT-ROUTINE. +It can be called directly at INT-LEVEL 5, or thru the \"SCRIPTOR\" interrupt" + +) (OLD-INT-LEV )) + #DECL ((VALUE FILE) ANY + (SCRIPT) + (LEN OLD-INT-LEV) FIX) + + ) + ( + + ) + ( 0 .LEN>) + (ELSE <2 .SCRIPT>)> + <3 .SCRIPT>> + + ) + ( >>DEVICE FULL: THIS PART OF TRANSCRIPT LOST!<<< +">)> + > + + (X) ANY (Y Z) STRING) + > + +;"SETUP-STYS (trys to) open the needed STY channels for a job in-loading. +If there is a free STY, it must open 2 channels to it, translate the +inferiors job into the other end of it, etc." + + + (Q WIDTH) FIX (STY-NAME) STRING (INT-HEADER) IHEADER + ;(STY-OPEN-FAIL) ;>) + + + ) + (> + <==? .N .Q>> + + > CHANNEL> + 0>> + > + )> + > CHANNEL> + 0>> + > + )> )> + > > + + > + + + 1> + )> + ) + ( + > + ) + ( + ":">> >>> + > + )> ;"TRY FOR ANOTHER STY NUMBER" + + + + > ;"GOT AN OUTPUT STY" + ,STY-OUTPUT-INTERRUPT-ROUTINE ;"GET IHEADER" +
> ;"SAVE RELEVENT INFO" + + > + >> ;"OPEN INPUT; FAILED?" + ;"YEP, SO RESET CRAP AND NOTE FAILRURE" + + + 1> + )> + )> ;"RETURN FALSE FROM OPEN" + + + > + ,STY-INPUT-INTERRUPT-ROUTINE +
> + + + ) ;"NOW TRANSLATE STY TO LOOK LIKE" + ;" A TTY FOR THE JOB" + (ELSE + > + > + + + 1> + )> + )> + + ;"FLUSH ANYTHING SITTING IN STY NOW" + -1> + )>> + T>> + + (FI) FIX) + + >> + 8>) + (LASTY -1> 8>) + (CR >) (TBUF )) + #DECL ((TTY UNM JNM FIRSTY LASTY CR TBUF) STRING (CLI) ) + > ;"GOBBLE UP CR" + >> ) + (> .FIRSTY> 0> + 0>> + > + 8>>>>>>) + (T "HACTRN")>> + > + + + )>)>>)>> + +;"STY-INPUT-INTERRUPT-ROUTINE gets signalled every time an inferior +outputs something to its TTY. It does a GET-OUTPUT-OF-TASK" + +) + + > + ) + (ELSE + "TTY"> + )>)>> + +;"GET-OUTPUT-OF-TASK soaks up any characters an inferior has output to +its TTY" + +) + "AUX" (SCRIPT ) + (SOFAR <1 .SCRIPT>) + (ALREADY ) INF SW) + #DECL ((VALUE) ANY (Q SOFAR) FIX + (CHAN INF SW) + (SCRIPT) (ALREADY) ) + + + .SOFAR> + .CHAN + <- 640 .SOFAR> > + .SOFAR>> >)> + ;"THIS GUY IS OUTPUTTING A LOT" + >> ;"STOP HIM TEMPORARILY" + > + + >)> + + + + CHARACTER> + ) + (T )>>>>> + > 640>>>)> + + >) + ( + )> )> > + +;"TERMINATE-TASK is called at INT-LEVEL 5 to end a task's execution, for +any reason except (sometimes) early abort in START-RUNNING" + +) ;"CALLED AT INT LEVEL 5" + (ACKN2 "unknown") + "AUX" (REAL 0.0) (CPU 0.0) (PAGES 0) (OVERHD 0.0) + (JOB-CH ) + (OLD-INT-LEVEL ) TEMP FI FL OF F L) + + #DECL ((Q OLD-INT-LEVEL PAGES FI) FIX + (ACKN1 TEMP VALUE) ANY + (CPU REAL OVERHD FL) FLOAT + (JOB-CH) + (ACKN2 OF) STRING + (F) + (TASK) (L) LIST) + + >) ;"MAKE SURE THERE IS A TASK HERE" + (> ;"AND IT IS THE RIGHT ONE" + >)> + + + + )> + + > + )> + > CHANNEL> + + >)> + > + )> + > CHANNEL> + + >)> + + + 0> + > ;"CPU MINS" + > + ,*USIPRQ>>>;"PAGE FAULTS FOR JOB" + >)> + ) + ( + <==? .ACKN1 ON-COMPLETION:RUN-TEST-FALSE> + + <=? .ACKN2 "ERROR in run test" >> > + ) + (ELSE + >>> + ,CR + "Reason: " .ACKN2 + "/" + >>> + " CPU/Real minutes used (" + 0.01>> + "%), " " Page faults" ,CR + " Uncompensated cpu overhead " + 0.001> + 0.01>>> + "%" ,CR>)> ) + (ELSE + )> + + !\. !\. + ", reason: " .ACKN2 + " used" + " in" ", pages " .PAGES + ", comp. ovrhd=" "%"> + > + > + > + > + > + > + > + + > + + > .CPU>> + > 1>>)> + ;" ERROR" + )> + ;" ACKNOWLEDGEMENT REQUESTED" + + + > 3>> + > + ()>)> + ) ;"STATE MAY BECOME 'REMOVED'" + ;"RESCHEDULE-TASK UPDATES DISK Q" + (T + > 3>> + >> + )> + >> + + > > + + )> + + >>>> + > CHANNEL> + >>> + > + )>)> + > + + <=? .ACKN2 "user device full">> + + + " SLEEPING FOR 30 MINS"> + >)> + + )> + " >">> + >> + +;"KILLER-INTERRUPT-ROUTINE is TERMINATE-TASK's alias, for the +\"KILLER\" interrupt; which is signalled when a task's termination +is determined at some other interrupt level" + + ;"AT INT-LEVEL 5" + +;"STOP-ALL-JOBS will put any running inferiors into 10!0 mode" + + (QN) FIX) + ) + ( + > > + )> >> + +;"IPC-INTERRUPT-ROUTINE handles any info coming in on the IPC +device. Possible (understood) are the following message types: + (1) 'send this back to me' -- tells you that the demon + is alive and well + (2) 'immediate task abort' -- the message itself must be + a uvector of 1 fix, that task will be aborted + (10) 'evaluate this' -- will batch-script and then evaluate + a random form + (else) 'look at the disk queue' -- someone says they have + written new data out on the disk" + +)) + #DECL ((VALUE MSG MSG-TYPE) ANY (TUP) TUPLE + (BORROWED) >) + + ;"SOME PROTECTION AGAINST" + ;" IPC MESSAGES 'TO EVAL' " + 1> > + <2 .TUP> + " + .MSG " >"> + 1> + ) + + ( + > + + " by " .TUP> + > <1 .TUP>>) + + ( + > + + >) + + (ELSE + + ;"READ IN ANY NEW TASK SPECS FROM DISK" + )> ;"MODS -- MIGHT CALL TASK-ABORT" + > ;"GIVE THE CHANNEL BACK" + + +;"GRAB-A-CHANNEL is a hack to allow 3 jobs to be run simultaneously. +It is supposed to temporarily close a channel not needed at a lower +interrupt level (stopping the appropriate job) so that the IPC interrupt +can have an extra channel to play with" + +>) + ;"CLOSES A CHANNEL NOT NEEDED BY STY-OUTPUT-INTERRUPT-ROUTINE" + + 3>> ;"NO NEED TO IF < 3 JOBS GOING"> + +;"RETURN-CHANNEL resets the mischief of GRAB-A-CHANNEL" + +> + (VALUE) ANY) + > ;"RESET CHANNEL AND INTERRUPT HANDLER" + >)>> + +;"TASK-ABORT is called during disk-queue update, to cause a running +task to be aborted. This is called at INT-LEVEL 20 during IPC-driven +queue update, at INT-LEVEL 0 during initial queue starting" + + + ,JOB-ID-NUMBERS>)) + #DECL ((VALUE) ANY (TASK) VECTOR + (Q) (USER NEW-STATE) STRING) + + + + "Manual abort +" ) + (ELSE )> >)> > + ;"GET LEVEL 5 TO KILL THE JOB" + +;"SYSDOWN-INTERRUPT-ROUTINE gets signalled whenever the system tells +everyone that it has been set to go down. A note is put in the batch log +as well as the output script of every running job" + +) LEFT) + #DECL ((VALUE) ANY (TIME-LEFT) FIX + (TIME-NOW LEFT) STRING (Q) FIX) + + + T) + (T + + ('(0 0 0) (0 0 >>))>> + >> + + + ) + ( ;"TELL ALL THE CURRENT JOBS" + + )> ;"AND SPEED MSGS TO OUTPUT FILE" + > >)>> + +;"CLOSE-A-CHANNEL is part of the ERROR handling scheme. The idea is to +get a channel from somewhere to allow scripting of error messages, and +to FSAVE the losing demon" + +)) + #DECL ((VALUE) (C-LIST) LIST) + + 0> + "TTY"> + >>> + .C-LIST>> + +;"ERROR-INTERRUPT-ROUTINE happens at INT-LEVEL 50 whenever an error occurs. +It tries to be smart about a few types of errors, especially errors happening +while evaluating a user form (run-test or rescheduler). It also tries to +signal some help." + + (X) STRING) + + ;"ERROR IN A USER TEST?" + > + ) FALSE> + .user-test-activation>) + + ( > + + .READ-TASK-ACT>) + ( > + ; + .SCRIPTOR-ACT>) + ( ;"IF DEBUGGING, LET ,ERROR DO ITS THING" + > + + > + ) + + (<==? <2 .TUP> READER-SYNTAX-ERROR-ERRET-ANYTHING-TO-GO-ON!-ERRORS!- > + CR + CR "ERRETting T" CR> + ) + (<==? <2 .TUP> END-OF-FILE!-ERRORS!- > + CR + CR "ERRETting []" CR> + ) + (<==? <2 .TUP> NO-ITS-CHANNELS-FREE!-ERRORS!- > + > + CR + CR + "channel " .NOMORE " closed (in .NOMORE)" CR>) + (ELSE + CR + CR>)> + + > ;"TRY AND FLAG SOME HELP" + ;"AHA! " + )> + + >> ;"three hours from now" + + > + ) + (ELSE )>)> + NO-ITS-CHANNELS-FREE!-ERRORS!- > + DANGEROUS-INTERRUPT-NOT-HANDLED!-ERRORS!-> + <==? <3 .TUP> PARITY!-INTERRUPTS!->> + 4> + <==? <2 .TUP> FILE-SYSTEM-ERROR!-ERRORS!- > + <==? <4 .TUP> #FALSE ("DEVICE FULL")>>> + >)> + + " T>> "RESTORED"> + + + ) ;"LET ,ERROR HANDLE IT NOW" + + (> > + ;"GIVE SOMEONE A CHANCE TO GRAB ME" + + + + ) ;"MAKE WAY FOR ,ERROR" + (<=? .SAVED "SAVED"> + ">> + > + + ) + (T + > + + )>) + + (ELSE + + + )>> + + + " ]" CR> + ;"MUDDLE LOGOUT MAY GET ANOTHER ERROR." + + )> >> + + +;"HELP-ME sends mail to everyone listed in .BOXES" + +)) + #DECL ((VALUE) ANY (BOXES) (MSGS) + (M) STRING) + > .BOXES>> + +;"DEBUG-MODE sets things up for debugging the demon. Usually debugging +is done with a local (not the main system) queue of tasks, and with less +discriminating system load allowances." + +> + >> + )> + + '["DSK" "*" "*" ".BATCH"] + ["DSK" "*" "*" ] + "INPUT" "OUTPUT" %<> %<> >)> + + + + + + > + +;"NORMAL-MODE is just the opposite of DEBUG-MODE" + +> + > + )> + "ME" %<>> + + + + + + >> + +;"LIGHT-MODE is special -- intended to get the demon to work +slower should it be bothering online users" + + + + + + > + +;"MSNAME tries to decide the debugger's master sname; like DDT" + +)) + #DECL ((U) STRING) + T) + (.C)>) + .U>> + +;"STY-OUTPUT-INTERRUPT-ROUTINE feeds characters to a +task that asks for some" + +) + FEED NUMBER + JOB-CH CLOSE-SW) ;"SEND CHARS TO A JOB" + #DECL ((VALUE) ANY (CHAN) CHANNEL + (Q-SLOT) (FEED) STRING (NUMBER) FIX + (JOB-CH CLOSE-SW) ) + + + + "TTY"> + )> ) + (>> + + ON-COMPLETION:OUT-OF-INPUT + "Input requested when none was left +" > + T) + (> + > + + .FEED>>> + ; + > + >> + CHARACTER> .CHAN> ;"FORCE LAST TO BE AN ACTIVATION CHAR" + > + > + )> + )> )> > + +)) + #DECL ((VALUE LEN) FIX (THINGS OBJECT) STRING + ;(THINGS) ;ANY ;(OBJECT) ;STRUCTURED) + ; + >)> + + ) + (ELSE + ) + > + <- -1>) + (T .LEN)>) + .THINGS>)>> + + + %<>> + +;"OK-TO-LOAD-A-JOB? decides if the system is lightly loaded enough to +support another batch task. It also watches for STY-OPEN-FAIL, which gets +set whenever the system was known to run out of STYs." + +) "AUX" TLIM LD STOF) + #DECL ((VALUE) ANY + ;(STY-OPEN-FAIL) ;> (STOF) + (TASK) + (TLIM) (LD) FLOAT) + + ) + (> )>> + > ;"QUICKIE OR TLIM < 5*EXP(1-LOAD/REF)" + > ,LOAD-REF1>>>>>>>) + (> ,LOAD-REF1> + + + <1 >> + <2 .STOF>> + 20.0> >) + (T %<>)> > + + ;"initial value to remember" + + +;"OK-TO-START-RUNNING? decides if the system is lightly loaded enough to +support one more active job" + +> + +;"OK-TO-KEEP-RUNNING? decides if a task should be left running +now, or stopped temporarily" + +> + +;"Here is common code for previous 2 functions." + + (QN) FIX (CH SW) + (LD) FLOAT) + > )>> + > + > + > + > + > + ) + ( 0.95> .TLIM> + + >) + (.SW )> + > .LR3/5> + + )> + %<>) + ( + + )> + T) + (<=? "SHORT"> + + )> + T) + ( + + %<>)>>> + +;"CHECK-Q-SLOT checks up on a q-slot (run-slot). Sees if there is a task +in that slot (if not, ok to start one?), and decides if it should be started/ +stopped/killed..." + +) ;"ASSURED INT LEVEL 5" + (TASK ) + (CLOSE-SW %<>) + CH STATUS JCODE RUNT JOB2 TSK FL FI) + #DECL ((VALUE) ANY (CLOSE-SW) + (Q OLD-INT-LEVEL JCODE FI) FIX + (CH) (TASK JOB2) (TSK) VECTOR + (STATUS) + (RUNT FL) FLOAT) + + > + >> + )> ) + (> + > + >>> + + %<>) + (T)>) + (> .95> ;"5% LEEWAY AT THESE ONCE/MIN CHECKS" + ) + (<=? "SHORT"> + 5.0) + (30.0)>>> + + + ) + ;"SEE IF IDLE" + ( ;"STOPPED (BY ME?), DON'T COUNT" + <==? 8 .JCODE>> ;" OR NEVER STARTED" + %<>) + (<==? .RUNT> ;"HASN'T USED ANY TIME" + 1>> + + <* ) + (3)>> + % 0.5>> >> + ) + (3)>> + " minutes elapsed with no CPU time used. +" >> + + T)> ) + (ELSE + + + %<>)> ) + + ( ;"SHOULD HAVE GENERATED AN INTERRUPT" + ;> ;"QUESTIONABLE" + + )> ) + (<==? 5 .JCODE> ;"IF JOB STOPPED (SUPPOSEDLY BY ME)" + ;"ASSUMES HERE THAT NOBODY WILL WANT INPUT WITHOUT INTERRUPTING FOR IT" + + )> + )> ) + (<==? 6 .JCODE> ;"JOB MAY BE .HANGing FOR INPUT" + )> ) + (<==? 7 .JCODE> ;"JOB IS RUNNING" + > + )> + )> ) + (.CLOSE-SW )> + > + +;"JOB-RESTART simply continues a job, while resetting the HANG-COUNTS +(count of how long the job has been considered 'dead')" + +)) + #DECL ((VALUE) ANY (JOB-CHA) CHANNEL (R-Q) ) + 0> > + >> + +;"JOB-SCRIPT puts batch messages in a job's output script file, as if +they were output by the job itself" + +)) + #DECL ((VALUE) ANY (Q-SLOT OLD-INT-LEVEL) FIX (THINGS) ) + 1> + >) + (ELSE >)> + > + +;"JOB-SCRIPT-1 does the dirty work for the previous fcn" + +) + (COUNT <1 .SCRIPT>) + (C <+ .COUNT >)) + #DECL ((VALUE) ANY (MSG-STRING) STRING (Q-SLOT COUNT C) FIX + (SCRIPT) ) + + + .COUNT> .MSG-STRING>) + (<==? .COUNT 640> + ) + ( + .COUNT> .MSG-STRING> + > >) + (ELSE + .MSG-STRING> >)> + + + ;"MAKE SURE THERE IS A JOB" + > ;" AND JOB HAS BEEN LOADED" + )> > ;" BEFORE ASKING FOR SCRIPT + TO OUTPUT FILE (WHICH HAPPENS AT INT-LEVEL 5)" + +)) + #DECL ((VALUE TARGET SOURCE) STRING + (MOST) ) + > + ) + ( > + )> + > + > + > + >> >> + +;"START-Q-SLOT starts something running in a given run-slot, assuming +there is nothing already running in that slot" + +) ;"ASSURED INT LEVEL 5" + "AUX" ID TEMP NUM JOB-CH H STR (OLD-INT-LEVEL ) S V) + ;"RETURNS FALSE IF CALLER SHOULD TRY ANOTHER IN THIS + SLOT IMMEDIATELY (I.E., THIS ONE LOST)" + + #DECL ((VALUE TEMP) ANY + (CR STR) STRING (H) + (Q ID NUM OLD-INT-LEVEL) FIX + (JOB-CH) + (TASK) + (S) + (V) VECTOR) + ;"DO NOTHING IF THAT SUB-QUEUE IN USE" + > ;"OR NOTHING TO START" + )> + ;"ALLOW ANY INFERIOR INTERRUPTS (ETC) TO RUN" + + > ;"MY CPU TIME" + + >> + " " > + ;"LEAVE A NOTE IN .BATCH DIR" + " task # " ;"FOR EASY CHECK ON HAPPENINGS" + .ID> + > + 1 0> + 3 ""> + !\. !\. .ID + ", run " 1>> + ", run-slot " .Q> + > + + + " for " + ", ID " ", ready for run " ,CR + "It is now " + > ) (,CR)>> + + + >> + + + ) + (ELSE + )> + %<>) + + (> >>> + + + + + T) + (ELSE + > + " into job:" ,CR " " + > + " ****"> + + %<>)>) + + ( .Q>>> + > + " ***"> + + %<>) + + (> + >> + > + <=? > ;"NO STYS, AND SOME NEEDED" + #FALSE ("NO FREE STYS")>> + > + > ,CR + "Will try again in 20 minutes****"> + ) + + (ELSE + + > + FIX> ,*L>> + >> + >>>> + ) + (ELSE )>> > + ) + (ELSE "")> > + >>> + ;"TELL IT THERE IS JCL" + )> + > + " ".LPTR."] + %<> "OUTPUT" "INFERIORS"> + + + + + )> + + T)>> + > + +;"EVAL-RUN-TEST will evaluate the RUN-TEST for a task" + +) + (R-T-INFO ) + (OLD-CHANLIST ) + CHANNELS-LEFT-OPEN FILE + (WHO ) + ANSWER + (MY-TASK .TASK) + (INFO-FIELD .R-T-INFO)) + #DECL ((VALUE TEST ANSWER R-T-INFO) ANY (INFO-FIELD) + (TASK) VECTOR (MY-TASK) (OLD-CHANLIST) LIST + (Q CHANNELS-LEFT-OPEN) FIX + (CR WHO FILE) STRING) + )> + + > + " " >> + "EVALing RUN TEST for " + .WHO + " task # " + > + > + > + + )> + > + + 1> + <=? <1 .ANSWER> "***ERROR CAUSED***">> + + ) + LIST>>> + ,CR + + + " channel(s) open! " + ,CR>) + (ELSE "")>> + > + ,BATCHQ-OBL>> + > ", +but your run-test for task " ", ID " ", +caused an error when evaluated. The task has been made +unrunnable. Please be more careful when you try again. +" +! + ("You also left " " channel(s) open.")) + (T '(""))> +" + Love and kisses, + Batch N. Demon">> + + " " " returned:" + CR .ANSWER> + #FALSE ("ERROR in run test") ) + ( + + ,CR + + + " channel(s) open. PLEASE DON'T DO IT AGAIN! " ,CR> + .ANSWER) + (.ANSWER + ,CR> + .ANSWER) + (ELSE + ,CR + "Task not started" ,CR> + .ANSWER)>>> + +) + > + +;"SETUP-OUTPUT-FILE sets-up the output-file for a task, just +before the run. If it is impossible to open one, It is assumed +that this will remain the case, and information will be kept such +that the job-output will be (partly) ignored" + +) C F R N) + #DECL ((VALUE FILE) ANY (TASK) VECTOR (Q N) FIX + (C) (F R) ) + %<>) + ( + + !\: + <2 .FILE> + !\; + <3 .FILE> + !\ + <4 .FILE> >) + ( + .FILE) + (ELSE + + ";DSK:" + + " OUTPUT">)> > + > + >>> + 1 5 .R>) + (> + >>>)>)> + + %<>) + ( .F> >> + ;"So CHARAPPEND will use it." + + T) + ( >> + + T) + (ELSE + > + %<>)>> + +;"RESCHEDULE-TASK determines when a task should next be run (if ever). +This may involve evaluating an arbitrary form" + +) + "AUX" (RESCHEDULER ) + (RESCHED-INFO ) + (THIS-TIME ) + NEXT-TIME F) + #DECL ((VALUE RESCHEDULER RESCHED-INFO) ANY + (TASK) VECTOR + (JOB-Q F) FIX + (DELAY) + (THIS-TIME NEXT-TIME) ) + + (()(0 .DELAY))>) + (.RESCHEDULER + ) + ( + .RESCHED-INFO>) + ( + %<>) + (ELSE + > + <1 .RESCHED-INFO>)>) + ( '["UNRUNNABLE" "ABORTED"]> + .THIS-TIME)> > + + + ) + ( ;"NOT RESCHEDULED" + + + ) + (;"IF PAST LAST RESCHEDULE DATE" + > 0.0>> + + + ) + ( + ;"ALREADY UPDATED BY TERMINATE-TASK" + > + >>> + + + ) + + ( + '["RUNNING" "UNRUNNABLE"]> + "RUNNING"> + > + + + ;"PUT INTO THE RIGHT PLACE IN THE QUEUE" + )> + ) + (ELSE + )> > + +;"REL-RESCHED determines new time-of-next-run by 'add increment' method; +increment is added until the new time computed has past." + +>>> + ) + () + ()> >> + +;"EVAL-RESCHEDULER will evaluate a user's rescheduler form. It tries +to protect the demon against nastiness, but the protection is quite limited" + +) + "AUX" (OLD-CHANLIST ) + CHANNELS-LEFT-OPEN RESULT + (R-INFO ) + (WHO ) + (MY-TASK .TASK) + (INFO-FIELD .R-INFO) + FILE) + #DECL ((VALUE RESULT RESCHEDULER R-INFO) ANY (INFO-FIELD) + (TASK) VECTOR (MY-TASK) + (JOB-Q CHANNELS-LEFT-OPEN) FIX + (CR WHO FILE) STRING + (OLD-CHANLIST) LIST) + + > + " " >> + "EVALing RESCHEDULER for " .WHO " task # " > + > LIST> + ) + ( > + ('(0 0 0) (0 0))>) + ( + .RESULT)>> + + > + + + )> + + + >)> + + + 1> + <=? <1 .RESULT> "***ERROR CAUSED***">> + + + + + " CHANNEL(S) OPEN! " ,CR>) + (ELSE "")>> + > ". +Your rescheduler for task " ", ID " ", +is faulty. Please repair it. +" +! + ("It also left " " channel(s) open.")) + (T '(""))> +" + Sincerely, + Your loving Batch Daemon">> + + + #FALSE ("ERROR in rescheduler")) + ( + + " CHANNEL(S) OPEN! " ,CR> + .RESULT) + (ELSE .RESULT)>> + +;"CLOSE-LITTERED-CHANNELS closes any channels a user form may have left open" + +)) + #DECL ((VALUE CHANNELS-LEFT-OPEN) FIX + (CLIST OLD-CHANLIST) ) + + + ) + ( .OLD-CHANLIST> + >) + (ELSE > + > + >)>>> + +;"ACKNOWLEDGE handles acknowledgements for all tasks." + +;<'PACKAGE "ACKN"> + +; + +; + +; "ACKNOWLEDGE will modify task STATEs and send messages to users + according to the ACKNOWLEDGEMENT-INFO field of a task at any + predefined condition" + +; ;"added by SWG 10/26/78 -- what's it for?" + +) + "AUX" (A-INFO ) + A-GUTS NOTICE) + #DECL ((VALUE) ANY (TASK-D) VECTOR + (CONDITION) ATOM (REASON) + (A-INFO A-GUTS) + (NOTICE) STRING) + + >> + !\. + !\. + > + " condition: " + .CONDITION !\, CR + " reason: " + .REASON + " to do: " + .A-GUTS> + + > " (named +'" "' for user '" +"') encountered the condition " " +on run #" > " on " + !>> + + + #FUNCTION ((P) + #DECL ((P VALUE) ANY) + + ) + ( + ) + ;(ELSE + )>) + .A-GUTS>)>> + +; "DIRECT-ACKNS looks in the ACKNOWLEDGEMENT-INFO field of a task + and determines what actions (or, if any) are to be performed given + the current 'condition'. There are 3 'catch-alls' for ease in use" + + (ACKN-INFO) VECTOR (CONDIT) ATOM) + > ;"LOOK FOR THIS CONDITION" + ) + ( + >> + ) + ( + >> + ) + (> ; "OR 'ON-ANY-OTHER'" + ) + (ELSE %<>)>> + + ) + )>> + .X>>> + + +; "ACKN-TO-TASK changes a task's state when requested by + an acknowledgement. For the sake of timing problems, + changes to 'UNRUNNABLE' will not abort 'RUNNING' tasks, + but changes to 'ABORTED' will." + +>)) + #DECL ((VALUE) ANY (NUM) FIX (NOTICE) STRING (TASK) ) + ) + (T )>)>> + +;">) + () + (> STRING>>) + (ELSE + + #FUNCTION ((TID \"AUX\" TASKO) + #DECL ((VALUE TID) ANY (TASKO) ) + FIX>> + > + >) + >)>>" + +; "C-STATE changes the STATE of a single task. Only a change to + 'ABORTED' is allowed to stop a running task" + +) + (<=? .TO-STATE >) + (<=? "RUNNING"> + + >) + ( + )> > + +; "NOTIFY-TASK puts a note in a task's output-file if + an acknowledgement changes its state" + +)) + #DECL ((VALUE OUTF) ANY (TTASK) VECTOR (NSTATE NOTE) STRING) + + + ";DSK:" + + " OUTPUT">>) + ( + !\: + <2 .OUTF> !\; + <3 .OUTF> !\ + <4 .OUTF>>>) + (ELSE >)> + + CR + "Task state changed to " + .NSTATE + " by " + .NOTE>>> + + +; "ACKN-TO-USER sends a note to some luser about a task. It tries + a :SEND first; if that fails, sends DDT style mail." + +;) + > + + > + + + + ) + (T )>> + +; + +;"INFERIOR-INTERRUPT-ROUTINE catches inferior interrupts: requests for +JCL, suicide, valrets, etc." + +) + ITASK JOB-CH CLOSE-SW STATUS JCODE) + #DECL ((VALUE) ANY + (JOB-NUM JCODE) FIX + (Q) + (JOB-CH) (CLOSE-SW) + (STATUS) + (ITASK) + (CR) STRING) + + >> + > + > + > + > + ;"JOB-STATUS PROBLEM, BAD CHANNEL/JOB" + + ", inferior " .JOB-NUM + " JOB-STATUS reports: " .STATUS CR + " for channel " .JOB-CH> + >) + (<==? 1 .JCODE> ;"SUICIDE REQUESTED" + >) + (<==? 2 .JCODE> ;"NOT CONTINUABLE" + >) + (<==? 3 .JCODE> ;".VALRET" + "' + was .VALUEd. +"> >) + (<==? 4 .JCODE> ;".BREAK 12," + .JOB-CH> + )> ) + (<==? 5 .JCODE> + >) + (.CLOSE-SW )> )> > + +;"VALRET-CHECKER is a questionable processor for handleing valrets from +an inferior. Currently, all valrets will cause scripting and termination +of the run, as the demon cannot parse arbitrary ddt-like commands" + +; + + > ON-VALRET .VALRET-STRING> + + + )> > + +;"PROCED-DISOWN decides if a job has valretted something equivalent. +This may be caught specially in the future -- the demon could actually +disown the inferior" + +;) + > + >> + +;"BREAK-12-CHECKER handles all .BREAK 12, 's from inferiors. Only +cases usefully handled are requests to pass/clear JCL" + +)) + #DECL ((VALUE) ANY (Q) FIX + (REQUESTS) + (JOB-CH) CHANNEL (REQ) WORD + (THE-LINE) STRING + (P) ) + + > + #WORD *5*> ;"JOB WANTS A JCL-LINE" + + ) ;"OOPS -- NONE THERE" + (> + FIX>> >) + (ELSE + + " ****" ,CR>)>) + (<==? > + #WORD *400005*> + )>> + .REQUESTS> + ;"CLEAR THE .BREAK" + > ;"& MAYBE RESTART JOB" + )> > + +;"GC-INTERRUPT-ROUTINE makes a log note of Garbage Collections" + + " sec, " + > + .NAME>> + +;"TIME-NOW returns a string for the current time, like HH:MM ZONE " + +) (TN2 <2 .TN>)) + #DECL ((VALUE) STRING (TN) + (TN2) ) + > !\: + 100>>> !\ + <3 .TN>>> + + +;"KILL-OLD-MARKERS wipes out old .BATCH;#Qn xxxxxx files. It should also +check for any that might point to jobs that have killed the demon with a +bad rescheduler/run-test." + + + " >" >> + ) + (> 0> + )>> > + +>> + + +;"SETUP-ERROR-INTERRUPT-HANDLER ON's the error handler, ONCE." + + + ;"SETUP THE INTERRUPT HANDLER" + ;"RESET IPC WITH PROPER NAMES" + ;"GET RID OF DEFAULT HANDLER" + )>> + + +;"SETUP-INTERRUPT-HANDLERS ON's all the appropriate handlers, ONCE." + + ;"IF NOT ALREADY ..." + ;"SETUP THE OTHER HANDLERS" + + + + + + + ) + (T )>> + +) + (RIGHT > 1000> 1000.5>>)) + #DECL ((VALUE) STRING (LEFT RIGHT) FIX (NUM) FLOAT) + !\. >>> + +;) + (RIGHT > 100> 100.5>>)) + #DECL ((VALUE) STRING (LEFT RIGHT) FIX (NUM) FLOAT) + !\. >>> + +)) + #DECL ((VALUE FX) FIX (X) FLOAT) + .FX) + (<=? .X .FX> .FX) + (>)>> + +) + > >> + +> + .OBJECT>> + +) + "AUX" (MEM )) + #DECL ((VALUE ELSE THING) ANY (OBJECT) VECTOR (MEM) ) + -1>) + (ELSE .ELSE)>> + +)) + #DECL ((VALUE) ANY (FILE) STRING (THINGS) TUPLE (CH) ) + + #FUNCTION ((YOU) #DECL ((YOU) ANY) ) + .THINGS> + )>> + +) + + 30>> + + (TTYSTATUS) FIX) + *2*> FIX>> ;"SUSET .RTTY " + + .TTYSTATUS)>> + +) + 4> + [<3 .FILESPEC> <4 .FILESPEC> <1 .FILESPEC> <2 .FILESPEC>]) + (ELSE + [<3 .FILESPEC> "COMMON" <1 .FILESPEC> <2 .FILESPEC>])>> + + (OUTCHAN) ) + ">> + + + ,PRINTSTRING + ( +"FROM-JOB:" " +SENT-BY:" " +RCPT:(" .TO ") +RCPT:(.BATCH (R-OPTION CC)) +TEXT;-1 +" .MSG)> + )>> + + diff --git a/src/_batch/tcheck.ujhm26 b/src/_batch/tcheck.ujhm26 new file mode 100644 index 00000000..729a9755 --- /dev/null +++ b/src/_batch/tcheck.ujhm26 @@ -0,0 +1,202 @@ + + + + + + + + + (TSK) VECTOR + (FIELD H-LIM T-LIM) ANY (C) ) + + ;"FILE-TO-RUN & TASK-NAME" + '> + STRING>> + )>) + (> STRING> + "TS" .FIELD]>) + (ELSE + + + + >)> + + + >> ;"TASK-STATE" + ) + (> + ) + (<=? .FIELD "RUNNING"> + + + + ) + (ELSE + + + )>) + (<=? .FIELD "REMOVED"> + )> + + > LIST> ;"TIME-OF-NEXT-RUN" + >) + ( + >) + ( + >) + (ELSE ;"USE 1:00 TOMORROW" + >)> + + + > FIX>) ;"HANG-LIMIT" + ( + >>) + (.H-LIM + >>)> + ;> + >)> + + >FLOAT>);"TASK-TYPE & TIME-LIMIT" + ( + >>) + (.T-LIM + >>)> + + STRING>> ;"NEEDS A TASK TYPE" + + > + + ) + (ELSE + + )>) + ( > + ) + (ELSE + )>) + ( ;"NEEDS A TIME-LIMIT" + "SHORT"> + 5.0) + (ELSE 30.0)> >)> + + LIST>> ;"WHEN-ORIGINATED" + >)> + + + > STRING>) ;"ORIGINATOR" + ( + >) + (ELSE + )> + + + > VECTOR> ;"OUTPUT-FILE" + >) + (<=? .FIELD "NUL:"> + ) + ( + > + <=? <5 .C> "NUL"> + >) + (.FIELD + >)> + + STRING>> ;"DELIMITER-STRING" + > >)> + ;"DEFAULT DELIMITER STRING IS [ESC] [CR] " + + > LIST> ;"WHEN-ORIGINATED" + + >)>) + (ELSE + >)> + + + > ;"RESCHEDULE-INFO" + > LIST> + >) + ( + >) + (.FIELD + >) > )> + + ;"WHEN-TO-STOP-RESCHEDULING" + > LIST> + >) + (.FIELD + >)> + + > + ;"MAXIMUM-NUMBER-OF-RUNS" + > > + >)> + + > ;"JCL-LINE" + > > + >)> + + > + > > + >)> + + ;"ACKNOWLEDGEMENT-INFO" + + ']>>]>>> + >)> + .TSK>> + + + (TSK FSPEC) VECTOR) + + "") + (>> + %<>) + ( + ) + .FSPEC>) + ( 4> + .FSPEC) + (<==? 1> + ["DSK" <1 .FSPEC> "OUTPUT"]) + (<==? 2> + ["DSK" <1 .FSPEC> <2 .FSPEC>]) + (<==? 3> + ["DSK" <1 .FSPEC> <2 .FSPEC> <3 .FSPEC>])> > + +) + >) + .FIL> > + +; %<>) + (<1 .PQR>) + (ELSE + > + )>>> + + diff --git a/src/_batch/templt.ujhm09 b/src/_batch/templt.ujhm09 new file mode 100644 index 00000000..cf59a393 --- /dev/null +++ b/src/_batch/templt.ujhm09 @@ -0,0 +1,106 @@ + + + + + + + + + (INDIRECT-MOD) > + + + TASK-NAME <> + TASK-STATE <> + TIME-OF-NEXT-RUN <> + NIGHT-RUN-SWITCH <> + TASK-TYPE <> + WHEN-ORIGINATED <> + SCHEDULER <> + RESCHEDULE-INFO <> + WHEN-TO-STOP-RESCHEDULING <> + MAXIMUM-NUMBER-OF-RUNS <> + FILE-TO-RUN <> + INPUT-STREAM <> + OUTPUT-FILE <> + JCL-LINE <> + DELIMITER-STRING <> + WORKING-DIRECTORY <> + TIME-LIMIT <> + ACKNOWLEDGEMENT-INFO <> + RUN-TEST <> + RUN-TEST-INFO <> + HANG-LIMIT <> + RESTART-SWITCH <> + BATCH-QUEUE-CHECK-SWITCH <> + LAST-STARTING-TIME <> + LAST-COMPLETION-TIME <> + LAST-CPU-TIME-USED <> + ACCUMULATED-CPU-TIME 0 + NUMBER-OF-TIMES-RUN 0 +] >> + + + TASK-NAME <> + TASK-STATE <> + TIME-OF-NEXT-RUN <> + NIGHT-RUN-SWITCH <> + TASK-TYPE <> + WHEN-MODIFIED <> + SCHEDULER <> + RESCHEDULE-INFO <> + WHEN-TO-STOP-RESCHEDULING <> + MAXIMUM-NUMBER-OF-RUNS <> + FILE-TO-RUN <> + INPUT-STREAM <> + OUTPUT-FILE <> + JCL-LINE <> + DELIMITER-STRING <> + WORKING-DIRECTORY <> + TIME-LIMIT <> + ACKNOWLEDGEMENT-INFO <> + RUN-TEST <> + RUN-TEST-INFO <> + HANG-LIMIT <> + RESTART-SWITCH <> + BATCH-QUEUE-CHECK-SWITCH <> + BY-WHOM-MODIFIED <> +] >> + + + + + + + + diff --git a/src/combat/crowd.contrl b/src/combat/crowd.contrl new file mode 100644 index 00000000..9939a122 --- /dev/null +++ b/src/combat/crowd.contrl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/combat/gunner.down b/src/combat/gunner.down new file mode 100644 index 00000000..953693c0 Binary files /dev/null and b/src/combat/gunner.down differ diff --git a/src/combat/master.undr78 b/src/combat/master.undr78 new file mode 100644 index 00000000..f3aa747e --- /dev/null +++ b/src/combat/master.undr78 @@ -0,0 +1,330 @@ +)> + +WARNS NOTES INCONS ERRS BATCH-COMPIL ;"For communication with COMFIL" + + + + )> + + + + + + +;"PERFORM THE COMBAT" + +) (NOTES <>) (WARNS <>) (INCONS <>)) + #DECL ((CH) (TIM) + (ERRS NOTES WARNS INCONS) > + (TP) ) + + > + ;"LOG IN" + + > + >) + (ELSE >)> + + <6 .CH>> ;"If directory not same, have to hack link" + >) + (>) + (> ;"Huh?")> + + > + > + + + + > + ; "IPC hack" + + + + > + + ;"Run the PLAN" + ) + ("NO MORE FUNCTIONS NOW GO AWAY FOR 60 MINUTES, THEN CHECK" + > + ; "Flush permission file" + <* 20> + <- 44 <1 .TIM>>) + (ELSE <1 .TIM>)> 60> + <2 .TIM> -5>> + )>> + +' + +\ + + + " MAIL">>) NN) + #DECL ((OUTCHAN) (NN) FIX) + + ) + ( + )> + + + + > + + + + + 0>> + '(ERRS INCONS WARNS NOTES)>> + + + >> + ) + ( )>)>> + '(ERRORS NOTES WARNINGS COMPILER-PROBLEMS) + '(ERRS NOTES WARNS INCONS)>)> + + + > + + " MAIL">>)) + #DECL ((MES) STRING (OUTCHAN) (FT) TUPLE) + + ) + ( + )> + + + + > + + + + + ,& .FT>)> + + + "> + >> + +) + ,PLANNED