*DECK NAMI PRGM NAMI; # NAMI GENERAL DESCRIPTION NAMI IS THE NETWORK (NAM) INITIATOR PROGRAM. THE OBJECTIVE OF NAMI IS TO ROUTE A NUMBER OF JOBS, THE NETWORK JOBS, TO THE INPUT QUEUE, FROM WHENCE THEY ARE INITIATED. AS PART OF THIS EFFORT, CERTAIN NETWORK PARAMETERS (EG., INVOCATION NUMBER) ARE UPDATED AND GENERAL PARAMETER SUBSTITUTIONS MAY BE PERFORMED ON THE JOB CONTROL STATEMENTS PRIOR TO THE JOBS BEING SUBMITTED TO THE INPUT QUEUE. THE JOB CONTROL STATEMENT SKELETONS ARE PREPARED AND MAINTAINED ON A MASTER FILE. THE MASTER FILE NAME AND USER NUMBER ARE SELECTABLE/CHANGEABLE BY THE USER (MFN AND UN PARAMETERS), ASSUMING THE USER HAS PERMITTED THE MASTER FILE TO SYSTEMX. THE MASTER FILE CONTAINS BOTH JOB SKELETONS (WHICH IN THEIR UPDATED FORM ARE SELECTABLY SENT TO THE INPUT QUEUE) AND PARAM- ETER RECORDS (WHICH CONTAIN THE KEYWORD-VALUE SUBSTITUTION PAIRS FOR UPDATING THE JOB SKELETONS). THE PARAMETER RECORDS ALSO CONTAIN THE NAMES OF THE JOB SKELETONS TO BE USED DURING PROCESSING. IN THIS WAY, ONE SET OF JOB SKELETONS MAY BE USED IN VARIOUS COMBINATIONS BY DIFFERENT PARAMETER RECORDS TO INITIATE, RESTART OR PARTIALLY RESTART THE NETWORK. THE OPERATION OF NAMI IS LOGICALLY STRAIGHT-FORWARD. FOLLOWING OPERATOR INITIATION OF NAMI, ANY ENTERED PARAMETERS ARE PROCESSED (THEY MAY AFFECT MASTER FILE SELECTION) AND THE MASTER FILE IS ACCESSED. THE MASTER FILE IS READ AND A TABLE OF PARAMETER RECORD NAMES AND JOB RECORD NAMES IS BUILT. NEXT, THE SELECTED PARAMETER RECORD IS READ. TWO LISTS ARE CONTSTRUCTED FROM THE PARAMETER RECORD-- A LIST OF JOBS TO BE LOADED AND A KEYWORD-VALUES REPLACEMENT PAIR LIST FOR UPDATING THE SELECTED JOB RECORDS. THE MASTER FILE IS THEN READ (AGAIN) AND THE SELECTED JOB RECORDS ARE READ THE THE REQUIRED KEYWORD-VALUE SUBSTITUTIONS ARE MADE. A LOCAL FILE VERSION OF THE JOB RECORD IS CREATED. WHEN ALL OF THE JOBS HAVE BEEN CREATED, THEY ARE ROUTED TO THE INPUT QUEUE, ONE RIGHT AFTER THE OTHER. FINALLY, IF NIP IS ONE OF THE JOBS SELECTED, CONTROL IS PASSED DIRECTLY TO THE NIP CONTROL RECORD, OTHERWISE, NAMI IS TERMINATED. NAMI IS PRIMARILY INTENDED FOR USE AT THE CYBER CONSOLE. HOWEVER, NAMI MAY BE EXERCISED INTERACTIVELY BY SPECIFYING =TEST= AS ONE OF THE PARAMETERS ON THE CALL STATEMENT. FOR EXAMPLE--- NAMI,TEST,RN=RESTRT,MFN=MYMSTR,UN=BAR1234. RUNNING NAMI REQUIRES SYSTEM ORIGIN PRIVILEGES (*SYOT* OR *CSOJ* VALIDATION WITH *DEBUG*) # CONTROL EJECT; # ILLEGAL KEYWORDS AND ERRONEOUSLY UNEQUIVALENCED KEYWORDS ARE DIAGNOSED. AN ERROR MESSAGE IS WRITTEN TO THE DAYFILE AND THE *GO* PARAMETER, IF SPECIFIED, IS IGNORED. NAMI WILL WAIT FOR ANOTHER CFO COMMAND. IF THE NUMBER OF KEYWORDS IS CHANGED, THE VALUE OF *NUMKWDS* MUST BE UPDATED AS WELL AS THE ARRAY *KWARRY*, THE SWITCH *KEYWORD* AND ITS USE IN PROCS CRACK$CALL AND NEWBASE, AND THIS LIST. LEGAL KEYWORDS ARE GO MFN = MASTER FILE NAME OIN = OLD INVOCATION NUMBER OPTION = SELECTED OPTION PW = PASSWORD RN = RECORD NAME RS = RECORD NAME TO RESTART TEST STOP TERM UN = USER NUMBER # CONTROL EJECT; # NAMI MAIN PROCESSOR P R O C E D U R E C O N T E N T S ------------------------------------ ITEM DECLARATIONS LINK DECLARATIONS ARRAY DECLARATIONS COMMON DECLARATIONS COMMON DECLARATIONS MISC DECLARATIONS FUNC KEYLINE PROC CLEAR$PW PROC READ$CFO PROC SHOTERM PROC CLR$OPMSG PROC WEEKDAY PROC INITCPA PROC DS$DEFAULT PROC SETUP$NAMI PROC DFL$RCDS PROC GET$NXT$OP PROC ROUT$FILES PROC FILL55 PROC PRELOAD PROC INTRACT PROC EXTRACT PROC FIND$JOB PROC CLRTABLE PROC NEWBASE PROC DSPLAY$LIN PROC SELJOB$LOD PROC SELJOB$SAVE PROC SELJOB$ROUTE PROC RLOD$DISP PROC GNXT$CCL PROC SCAN$CCLS PROC LOAD$JOB PROC SAVE$JOB PROC SELJOB$MODFY PROC OPTIONLOOP PROC NAMIN (MAIN PROCESS) NAMI COPYRIGHT CONTROL DATA SYSTEMS INC. 1994. # CONTROL EJECT; #ITEM DECLARATIONS # BEGIN ITEM STATS U; # STATUS USED IN READ MACROS # ITEM I I; ITEM RECORDTYPE C(10); ITEM INDX1 I=0; ITEM INDX2 I=0; ITEM INDX3 I=0; ITEM INDXC I=0; ITEM INDXR I=-1; ITEM UPIX I=-1; ITEM MODFYNDX I=0; ITEM WORDCNT I=3; ITEM TBLPTR I=0; ITEM SKPLNS I=0; ITEM JOBINDX I=0; ITEM CTLRCDS I=0; ITEM RUNRCDS I=0; ITEM NXT2LOD I=0; ITEM ABTCODE I=0; ITEM K I=0; ITEM J1 I=0, J2 I=0, J3 I=0; ITEM N I=0, N1 I=0, N2 I=0; ITEM NR1 R=0, NR2 R=0; ITEM SPACES C(10) = " "; ITEM EDITX C(10); ITEM SCANK C(10); ITEM SCANV C(10); ITEM CALL$OIN C(10); ITEM JOBNAME C(10) = " "; ITEM SUBSYSNAM C(10) = " "; ITEM JOBOT U; ITEM JOBSC U; ITEM PAKWPTR U; ITEM LIN4SCAN C(180); ITEM DISEND B=TRUE; ITEM FIRST B=TRUE; ITEM RT$IMMED B=FALSE; ITEM CTLJOB B=FALSE; ITEM RUNJOB B=FALSE; ITEM NEED$OPRES B=TRUE; ITEM RDY$2$ROUT B=FALSE; ITEM RDY$4$ROUT B=FALSE; ITEM DSPLYMODE B=TRUE; ITEM TESTING B=FALSE; ITEM AUTO$GO B=FALSE; ITEM START$SUBS B=FALSE; ITEM UPCFLAG B=FALSE; ITEM INV$INCR B=FALSE; ITEM NET$START B=FALSE; ITEM DISDFLT B=FALSE; ITEM RNCHANGED B=FALSE; # TRUE IF NEW RN IS SPECIFIED # ITEM RNKEYWORD C(10); # TEMPORARY FOR RN KEYWORD # ITEM RNVALUE C(10); # NEW RN VALUE WHEN SPECIFIED # ITEM LASTENTRY I=0; # LAST ENTRY OF DIRECTORY TABLE # ITEM FOUND B; # TEMPORARY BOOLEAN # CONTROL EJECT; #LINK DECLARATIONS # XREF PROC READSKP; XREF PROC READH; XREF PROC RECALL; XREF PROC ABTRUN; XREF PROC CFOWAIT; XREF PROC CFOBCLR; XREF PROC CFOBSET; XREF PROC CHEKORG; XREF PROC FINSHIO; XREF PROC GETLINE; XREF PROC GNETCCL; XREF PROC NEWMAST; XREF PROC OFLUSH; XREF PROC PRLDNIN; XREF PROC PUTRTO; XREF PROC PUTRTR; XREF PROC PUTRTC; XREF PROC PUTRTL; XREF PROC PUTLINE; XREF PROC PUTTERM; XREF PROC PUTTRMX; XREF PROC ROUTEM; XREF PROC SENDMSG; XREF PROC SETNUN; XREF PROC SETUPC; XREF PROC SETUPC2; XREF PROC SIERRA; XREF PROC STARTIO; XREF PROC TERMRD; XREF PROC UPD8NIN; XREF PROC UPD8MFN; XREF FUNC XCDD C(10); XREF FUNC XCOD C(10); XREF FUNC XSFW C(10); XREF FUNC XCFD C(10); XREF FUNC STRIPSP C(10); COMMON IDINFO; BEGIN ITEM IDVERSN C(40); # NAMI DATE/TIME/VERSION STAMP # ITEM COPYRIGHT C(50); # NAMI COPYRIGHT # END CONTROL EJECT; # * * NAMI * * CALLED FROM,LOADER * * NAMI ENTRY POINT FOR PRIMARY PROCESS. * * * XREF PROC CFOWAIT * * CALLED FROM READ$CFO, ROUT$FILES * * WAIT FOR RA+0 CFO FLAG BIT TO BE CLEARED. THIS IS * IS CALLED AFTER A MESSAGE HAS BEEN DISPLAYED TO THE * OPERATOR TO ENTER A CFO TYPE MESSAGE AND THE BIT HAS * BEEN SET. * * * XREF PROC CFOBCLR * * CALLED FROM *NOREF * * THIS IS USED WHEN WE ARE SIMULATING CONSOLE INPUT. THE * ROUTINE IS CALLED TO CLEAR THE CFO FLAG BIT. * * * XREF PROC CFOBSET * * CALLED FROM READ$CFO, ROUT$FILES * * THIS ROUTINE USED TO SET THE CFO FLAG BIT AFTER ASKING * THE OPERATOR TO ENTER A CFO MESSAGE. THE OPERATING * SYSTEM WILL CLEAR THE BIT WHEN THE CFO MESSAGE HAS BEEN * ENTERED AND POSTED IN THE JOB CONTROL AREA. * * * XREF PROC CHEKORG * * CALLED FROM NAMI * * ABORT IF NOT SYOT OR CSOJ IN DEBUG. * * * XREF PROC FINSHIO * * CALLED FROM *NOREF * * CLOSE CCL INPUT FILE (LFN=INFIL), TRACE FILE * (LFN=OUTFIL) AND OUTPUT FILE. CALLED AT END * OF JOB. * # CONTROL EJECT; # * * XREF PROC GETLINE * * CALLED FROM FIND$JOB, LOAD$JOB * * READ ONE LINE OF DATA FROM THE NETWORK CCL FILE (LFN= * INFIL). THE DATA IS RETURNED BASED UPON THE SETTING * OF THE VARIABLE IOFWA. * * * XREF PROC GNETCCL * * CALLED FROM PRELOAD, FIND$JOB * * GET AND OPEN THE NETWORK CCL FILE (LFN=INFIL). THE * FILE NAME AND USER NUMBER IS PASSED IN COMMON BLOCK * NETCTRL. * * * XREF PROC NEWMAST * * CALLED FROM NEWBASE * * INSTALL THE DEFAULT PARAMETERS INTO THE NEW NETWORK * (MASTER) CCL FILE. * * * XREF PROC OFLUSH * * CALLED FROM NAMIN * * ISSUE A WRITER TO LFN=OUTFIL. THIS FLUSHES THE TERMINAL * OUTPUT BUFFER AND IS USED PRIMARILY FOR TESTING. * * * XREF PROC PRLDNIN * * CALLED FROM PRELOAD, LOAD$JOB * * PRELOAD THE NETWORK INVOCATION NUMBER. THIS PLACES THE * THE NEW NIN INTO THE DEFAULT FILE NAMES. * * * XREF PROC PUTRTO * * CALLED FROM SAVE$JOB * * OPEN THE ROUTE FILE FOR THE JOB TO BE LOADED AND SENT * TO THE INPUT QUEUE. * # CONTROL EJECT; # * * XREF PROC PUTRTR * * CALLED FROM SAVE$JOB * * WRITE AN END OF RECORD ON THE JOB ROUTE FILE. * * * XREF PROC PUTRTC * * CALLED FROM SAVE$JOB * * ISSUE A WRITER ON THE ROUTE FILE AND CLOSE THE * FILE. * THE FILE IS NOT RETURNED, BUT REMAINS LOCAL AT THIS * CONTROL POINT. * * * XREF PROC PUTRTL * * CALLED FROM SAVE$JOB * * WRITE A SINGLE LINE TO THE ROUTE FILE. THIS IS A * WRITEH COMMAND AND STRIPS OFF TRAILING BLANKS. * * * XREF PROC PUTLINE * * CALLED FROM READ$CFO * * WRITE A SINGLE LINE TO THE TRACE FILE. THIS ALSO * IS A WRITEH FUNCTION. * * * XREF PROC PUTTERM * * CALLED FROM SHOTERM * * WRITE A SINGLE LINE (WRITEH) TO THE OUTPUT FILE. * * * XREF PROC PUTTRMX * * CALLED FROM SHOTERM * * ISSUE A WRITER TO THE OUTPUT FILE TO FLUSH THE * BUFFER. THIS IS NECESSARY WHEN TESTING AT A TERMINAL * TO INSURE THAT THE ENTIRE MESSAGE GETS TO THE OPERATOR. * # CONTROL EJECT; # * * XREF PROC READLN * * CALLED FROM READ$CFO * * READ ONE LINE OF INPUT FROM TERMINAL INPUT. THIS IS USED * DURING TESTING. SEE PROC READ$CFO. * * * XREF PROC ROUTEM * * CALLED FROM ROUT$FILES * * ROUTE THE FILE SPECIFIED IN COMMON AREA ROUTCOM TO THE QUEUE * ALSO SPECIFIED IN ROUTCOM. USED PRIMARILY TO ROUTE FILES TO * THE INPUT QUEUE. * * * XREF PROC SENDMSG * * CALLED FROM READ$CFO, SETUP$NAMI, DFL$RCDS, SELJOB$LOD, NAMIN * * SEND THE MESSAGE IN COMMON AREA MSGCOM TO THE OPERATOR AND * DAYFILE (A AND B DISPLAYS). * * * XREF PROC SETNUN * * CALLED FROM SETUP$NAMI * * SET NAMI USER NUMBER * * * XREF PROC SIERRA * * CALLED FROM INITCPA * * SIERRA IS A GROUP (CLUB) OF SYSTEM REQUESTS USED TO DETERMINE * THE ENVIRONMENT (DATE, TIME, CM FL). THE INFORMATION IS * RETURNED IN COMMON AREA SIERRAC. SEE THE ERS FOR AN IMPACT * STUDY. # CONTROL EJECT; # * * * XREF PROC STARTIO * * CALLED FROM *NOREF * * STARTIO GETS THE NETWORK CCL FILE (LFN=INFIL) AND OPENS IT. * IT ALSO OPENS THE TRACE AND TERMINAL OUTPUT FILE. * * * XREF PROC UPD8MFN * * CALLED FROM NEWBASE, SELJOB$LOD, NAMIN * * THIS ROUTINE UPDATES THE NETWORK MEMORY FILE WITH THE CURRENT * NETWORK INVOCATION NUMBER, NETWORK CCL FILE NAME AND DEFAULT * (LAST USED) CONTROL RECORD NAME. * * * XREF PROC UPD8NIN * * CALLED FROM PRELOAD, FIND$JOB * * THE NETWORK INVOCATION NUMBER IS UPDATED- THIS RESULTS IN THE * VARIOUS DEFAULT FILE NAMES AND PARAMETER RECORDS BEGIN UPDATED. * * * XREF FUNC XCDD C(10) * * CALLED FROM INITCPA, DSPLAY$LIN * * THIS IS A CONVERSION ROUTINE - INTEGER TO DECIMAL DISPLAY CODE. * * * XREF FUNC XCOD C(10) * * CALLED FROM INITCPA, DS$DEFAULT, ROUT$FILES * * THIS IS A CONVERSION ROUTINE - INTEGER TO OCTAL DISPLAY CODE. * * * XREF FUNC XSFW C(10) * * CALLED FROM DS$DEFAULT, ROUT$FILES, INTRACT, FIND$JOB, * LOAD$JOB * * THIS IS A CONVERSION ROUTINE - SPACE FILL A WORD ENDING IN 00B. * # CONTROL EJECT; #ARRAY DECLARATIONS # ARRAY LINE[0:10] S(1); BEGIN ITEM LIN6 C(0, 0, 6); ITEM LINX C(0, 0, 10); ITEM LIN80 C(0, 0, 80); ITEM LINX1A C(0, 0, 110); ITEM LIN4 C(0, 0, 4); END ARRAY ONELINE[0:0] S(10); BEGIN ITEM LIN$4 C(00,00,04); ITEM LIN$6 C(00,00,06); ITEM LIN$10 C(00,00,10); ITEM LIN$100 C(00,00,100); END ARRAY ENVIRONS [0:0] S(20); BEGIN ITEM ENV1 C(0, 0, 10) = [" "]; ITEM ENV2 C(1, 0, 10) = ["CFO=YES "]; ITEM ENV3 C(2, 0, 10) = ["CMU=YES "]; ITEM ENV4 C(3, 0, 10) = ["C/MEJ=YES "]; ITEM ENV5 C(4, 0, 10) = [" "]; ITEM ENV6 C(5, 0, 10) = ["PPUS=00 "]; ITEM ENV7 C(6, 0, 10) = ["CM=000000B"]; ITEM ENV8 C(7, 0, 10) = [" "]; ITEM ENV9 C(8, 0, 20) = ["CONTROL STATEMENT = "]; ITEM ENV10 C(08, 0, 50); ITEM ENV11 C(11, 0, 10); ITEM ENV12 C(12, 0, 10); ITEM ENV13 C(13, 0, 10) = [" "]; ITEM ENV14 C(14, 0, 10) = ["SUNDAY "]; ITEM ENV15 C(15, 0, 20) = [" MM/DD/YY HH.MM.SS "]; END ARRAY DIR$TABLE [0:200] S(1); BEGIN ITEM DIR$NAME C(0, 0, 7); ITEM PRU$ADDR U(0, 42,12); # NUMBER OF PRUS FROM BOI # ITEM DIR$TYPE U(0, 54, 6); END DEF ZTYPE #0#; DEF PTYPE #1#; DEF JTYPE #3#; DEF STAT$EOR #O"000023"#; DEF STAT$EOF #O"740033"#; DEF STAT$EOI #O"741033"#; ARRAY REPLACE$TBL [0:200] S(3); BEGIN ITEM REPKEY C(0, 0, 10); ITEM REPVAL C(1, 0, 10); ITEM REPSIZ U(2, 0, 60); END CONTROL EJECT; #COMMON DECLARATIONS # COMMON PASSIT; BEGIN ITEM IOFWA I; ITEM IOCNT I; ITEM IOCMP I; ITEM IOLVL I; ITEM IOFLG I; END COMMON THEFET; BEGIN ARRAY INFIL [0:0] S(15); BEGIN ITEM FET$WORD0 U(00,00,60); ITEM FET$LFN C(00,00,07) =["INFIL "]; ITEM FET$STAT U(00,42,18); ITEM FET$WORD1 U(01,00,60); ITEM FET$FIRST U(01,42,18); ITEM FET$RANDOM U(01,12,01); ITEM FET$WORD2 U(02,00,60); ITEM FET$IN U(02,42,18); ITEM FET$WORD3 U(03,00,60); ITEM FET$OUT U(03,42,18); ITEM FET$WORD4 U(04,00,60); ITEM FET$LIMIT U(04,42,18); ITEM FET$WORD6 U(06,00,60); ITEM FET$CRI U(06,00,30); # CURRENT RANDOM INDEX # ITEM FET$RR U(06,31,29); # RANDOM REQUEST # END END COMMON PARAMS; BEGIN ITEM CMODE I; ITEM CSTAT I; ARRAY CMSG [0:7] S(1); BEGIN ITEM CMESS C(0, 0, 10); ITEM CMSG80 C(0, 0, 80); END END COMMON NETCOM; BEGIN ARRAY NETCOMA [0:27] S(1); BEGIN ITEM NETINVN C(0, 0, 10); ITEM NETINCR U(1, 0, 60); ITEM NCOM80 C(2, 0, 180); ITEM NCOM80A C(17,0, 80); END END COMMON UPAR; BEGIN ARRAY UPARMS [0:40] S(8); BEGIN ITEM UPARAM C(0, 0, 80); END END COMMON PACKING; BEGIN ITEM PACK80 C(80); ITEM PACK160 C(100); ITEM PACKEND C(10); ARRAY PACK01 [0:79] S(1); BEGIN ITEM PACKW C(0, 0, 10); ITEM PACKZW U(0, 0, 60); ITEM PACKWE C(0,54, 01); END ITEM UPCSTAT U; ITEM UPCOUNT U; END CONTROL EJECT; #COMMON DECLARATIONS # COMMON ROUTCOM; BEGIN ITEM ROUTNAM C(10); ITEM ROUTCOD I; ITEM ROUTYPE I; ITEM RTEOT U; ITEM RTESC U; END DEF ROUTIQ #0#; DEF ROUTOQ #1#; DEF ROUTSS #O"0400"#; DEF ROUTNIP #O"1000"#; DEF ROUTSYOT #O"4000"#; COMMON SIERRAC; BEGIN ARRAY SIE [0:0] S(7); BEGIN ITEM SIECM U(0, 00, 30); ITEM SIEDATE C(1, 00, 10); ITEM SIEJDATE C(2, 00, 10); ITEM SIEJYR C(2, 30, 02); ITEM SIEJDAY C(2, 42, 03); ITEM SIETIME C(3, 00, 10); ITEM SIECPUS U(4, 24, 24); ITEM SIECPUMS U(4, 48, 12); ITEM SIEUSER C(5, 00, 07); ITEM SIEMID C(6, 00, 10); END END COMMON PFEMSG; BEGIN ITEM PFERMSG C(40); END COMMON ROUTABL; BEGIN ARRAY RTFT [0:200] S(1); BEGIN ITEM RTFN C(0, 00, 8); ITEM RTFNOT U(0, 48, 3); ITEM RTFNSC U(0, 51, 3); ITEM RTFNCD U(0, 54, 6); END END COMMON MSGCOM; BEGIN ARRAY MSGCOMA [0:8] S(1); BEGIN ITEM OPMSG1 C(0, 00, 10); ITEM OPMSG C(0, 00, 80); ITEM OPMSGZB U(0, 00, 60); END END CONTROL EJECT; COMMON NETCTRL; BEGIN ARRAY NETMASTR [0:63] S(1); BEGIN ITEM NETMSTR C(00,00,200); ITEM MSTRMFN C(21,00,07); ITEM MSTRUN C(23,00,07); ITEM MSTRPW C(25,00,07); ITEM MSTRFM C(27,00,07); ITEM MSTRRN C(29,00,10); ITEM MSTRUNM C(23,00,07); ITEM MSTRPWM C(25,00,07); ITEM MSTRLIN C(31,00,03); ITEM MSTRUIN C(33,00,03); ITEM MSTRMEMUN C(35,00,07); ITEM MSTROIN C(37,00,03); ITEM MSTRMACHID C(39,00,10); ITEM MSTRRS C(41,00,07); END END COMMON TBLADR; BEGIN ARRAY TABLAD [0:6] S(1); BEGIN ITEM TADR U(0, 0, 30); ITEM TLEN U(0, 30, 30); END END COMMON TERMCOM; BEGIN ITEM TERMRDLN I; ITEM TERMRDBFR C(240); ITEM TERMRDB2 C(240); ITEM TERMRDB3 C(170); END COMMON RESTART; BEGIN ITEM RESTRT B = FALSE; # RESTART APPLICATION FLAG # ITEM RSAPPL C(7); # APPLICATION TO RESTART # ITEM JOBDI B; # FLAG - DI SPECIFIED ON JOB STATEMENT # ITEM APFOUND B; # APPL JOB RECORD FOUND FLAG # ITEM JOBFOUND B; # JOB FOUND FLAG # ITEM DONE B; # COMPLETION FLAG # ITEM JBNAME C(10); # JOB NAME # END CONTROL EJECT; #MISC DECLARATIONS # ITEM OPTION I=0; DEF OPTDISP #1#; DEF OPTLOAD #2#; DEF OPTMOD #3#; DEF OPTSAVE #4#; DEF OPTSBMT #5#; DEF OPTTERM #6#; DEF OPTROUT #7#; DEF DISPOPT #0#; DEF DISPJBS #1#; DEF DISPCCB #2#; DEF DISPZRO #5#; DEF EOR #O"1"#; DEF EOF #O"3"#; DEF EOI #O"3"#; ARRAY JOBLISTS [0:200] S(3); BEGIN ITEM JBL1 C(0, 0, 10); # JOB NAME # ITEM JBL2 C(1, 0, 10); # ROUTE FILE NAME # ITEM JBL3 C(2, 0, 9); # SUBSYSTEM NAME # ITEM JBL3OT U(2,54, 3); # ORIGIN TYPE # ITEM JBL3SC U(2,57, 3); # SERVICE CLASS # END # CALL STATEMENT KEYWORDS # DEF NUMKWDS #11#; #NUMBER LEGAL KEYWORDS # ARRAY KWARRY [1:NUMKWDS] S(1); #CORRESPONDS TO SWITCH KEYWORD # BEGIN ITEM KWORD C(0,0,10) = ["GO ", "MFN ", "OIN ", "OPTION ", "PW ", "RN ", "RS ", "STOP ", "TERM ", "TEST ", "UN "]; END CONTROL EJECT; BASED ARRAY MSGTBL [0:99] S(1); BEGIN ITEM CHLOW C(0, 48, 2); ITEM CHX C(0, 0, 10); ITEM CWC U(0, 0, 6); ITEM CZZ C(0, 0, 70); END XREF ARRAY RAZERO [0:0] S(64); BEGIN ITEM JCACFO B(00, 45, 01); ITEM JCACMU B(53, 00, 01); ITEM JCACME B(54, 00, 01); ITEM JCAPPU U(54, 07, 05); ITEM JCA70 C(56, 00, 30); ITEM JCAOPMSG C(56, 00, 80); END ARRAY CCLBUFR [0:300] S(8); BEGIN ITEM CCLE C(0, 0, 80); ITEM CCL01 C(0, 0, 01); ITEM CCL04 C(0, 0, 04); END ARRAY DATALNX [0:0] S(9); BEGIN ITEM DLX1 C(0, 0, 1) = [" "]; ITEM DLNUM1 C(0, 6, 3); ITEM DLX2 C(0, 24, 1) = ["."]; ITEM DLNUM2 C(0, 30, 3); ITEM DLX3 C(0, 48, 2) = ["= "]; ITEM DATALN C(1, 0, 80); END ARRAY DATALNY [0:0] S(12); BEGIN ITEM LNY0 C(0, 0, 20) = [" MODE = 00B"]; ITEM LNY1 C(2, 0, 20) = [" OPTION = 00B"]; ITEM LNY2 C(4, 0, 20) = [" MID = --"]; ITEM LNY3 C(6, 0, 20) = [" CIN = 000D"]; ITEM LNY4 C(8, 0, 20) = [" OIN = 000D "]; ITEM LNY5 C(10,0, 20) = [" UIN = 000D"]; ITEM LNY1A C(1, 42, 2); ITEM LNY1B C(3, 42, 2); ITEM LNY1C C(5, 48, 2); ITEM LNY1D C(7, 36, 3); ITEM LNY1E C(9, 24, 3); ITEM LNY1F C(11,36, 3); ITEM LNY C(0, 30, 55); ITEM LNYA C(6, 30, 55); END CONTROL EJECT; ARRAY DATALNZ [0:0] S(14); BEGIN ITEM LNZ0 C(0, 0, 20) = [" RN = LSTPR"]; ITEM LNZ1 C(2, 0, 20) = ["CD MFN = NETCTR"]; ITEM LNZ2 C(4, 0, 20) = ["L UN = BAR12"]; ITEM LNZ3 C(6, 0, 10) = ["34 "]; ITEM LNZ4 C(7, 0, 20) = [" UN = XXXX"]; ITEM LNZ5 C(9, 0, 20) = ["XXX FM = (N/A) "]; ITEM LNZ6 C(11,0, 20) = [" PW = YYYY"]; ITEM LNZ7 C(13,0, 10) = ["YYY "]; ITEM LNZ4A C(8, 36, 7); ITEM LNZ4B C(10, 18, 7); ITEM LNZ4C C(12, 36, 7); ITEM LNZ1A C(1, 30, 7); ITEM LNZ1B C(3, 24, 7); ITEM LNZ1C C(5, 30, 7); ITEM LNZ C(0, 30, 65); ITEM LNZ2ND C(7, 30, 65); END ARRAY DAY2DAY [0:6] S(1); BEGIN ITEM DAY0 C(0, 0, 10) = ["SUNDAY "]; ITEM DAY1 C(1, 0, 20) = ["MONDAY TUESDAY "]; ITEM DAY3 C(3, 0, 20) = ["WEDNESDAY THURSDAY "]; ITEM DAY5 C(5, 0, 20) = ["FRIDAY SATURDAY "]; END ARRAY DATALNR [0:0] S(5); BEGIN ITEM LNR0 C(0, 0, 20) = [" NETWORK IN"]; ITEM LNR2 C(2, 0, 20) = ["VOCATION NUMBER 000 "]; ITEM LNR4 C(4, 0, 10) = [" "]; ITEM LNR2A C(3, 36, 3); ITEM LNR C(0, 0, 60); END CONTROL EJECT; ARRAY DATALNW [0:0] S(3); BEGIN ITEM UPD8M0 C(0, 0, 10) = [" "]; ITEM UPD8MSG C(1, 0, 20) = [" UPDATED BUFFER: "]; END ARRAY DATALNV [0:0] S(4); BEGIN ITEM RSTM0 C(0, 0, 20) = [" FILNAME RO"]; ITEM RSTM1 C(2, 0, 20) = ["UTED, STAT = 0000B "]; ITEM RSTM2 C(3, 18, 4); ITEM RSTM3 C(1, 0, 7); END ARRAY DATALNU [0:0] S(4); BEGIN ITEM FSV0 C(0, 0, 20) = [" FILE SAVED"]; ITEM FSV1 C(2, 0, 20) = [" ON ROUTFIL "]; END ARRAY DATALNT [0:0] S(4); BEGIN ITEM FLS0 C(0, 0, 20) = [" FILNAME LO"]; ITEM FLS1 C(2, 0, 20) = ["ADED, STAT = 0000B "]; ITEM FLS2 C(1, 0, 7); END ARRAY DATALNS [0:0] S(4); BEGIN ITEM LDF0 C(0, 0, 20) = [" LOADING "]; ITEM LDF1 C(2, 0, 20) = [" "]; ITEM LDF2 C(2, 0, 7); ITEM LDF C(0, 0, 40); END CONTROL EJECT; # * ABORT ROUTINES # PROC ABORTRUN (ABTCD); BEGIN ITEM ABTCD I; ABTCODE = ABTCD; CLR$OPMSG; IF ABTCODE EQ 0 THEN OPMSG[0] = " NAMI ABORT CODE 0"; IF ABTCODE EQ 1 THEN OPMSG[0] = " JOB/PARAM RECORD COUNT EXCEEDS 200"; IF ABTCODE EQ 2 THEN OPMSG[0] = " JOB STATEMENTS IN PARAM RECORD EXCEED 200"; IF ABTCODE EQ 3 THEN OPMSG[0] = " PARAM STATEMENTS IN PARAM RECORD EXCEED 40"; IF ABTCODE EQ 4 THEN OPMSG[0] = " KEYWORD/VALUE COUNT IN PARAM RECORD EXCEEDS 200"; IF ABTCODE EQ 5 THEN OPMSG[0] = " TOTAL KEYWORD/VALUE COUNT EXCEEDS 200"; IF ABTCODE EQ 101 THEN OPMSG[0] = " INVALID PARAMETER(S) IN JOB STATEMENT"; IF ABTCODE EQ 102 THEN OPMSG[0] = " OT, IF SPECIFIED, MUST BE SY OR BC"; IF ABTCODE EQ 103 THEN OPMSG[0] = " SC, IF SPECIFIED, MUST BE SY, NS, OR BC"; IF ABTCODE EQ 104 THEN OPMSG[0] = " SC, IF SPECIFIED, MUST BE BC IF OT=BC"; OPMSGZB[7] = 0; SHOTERM (LOC(OPMSG[0]), 8, TRUE); SENDMSG; IF ABTCODE GQ 100 THEN BEGIN CLR$OPMSG; FOR K = 0 STEP 1 WHILE CPACK80 NQ C<0,1>PACKEND DO COPMSG[0] = CPACK80; OPMSGZB[7] = 0; SHOTERM (LOC (OPMSG[0]),8,TRUE); SENDMSG; END ABTRUN; # ABORT EXIT... NO RETURN# END # ABORTRUN # CONTROL EJECT; # * * FUNC KEYLINE * * CALLED FROM SELJOB$LOD, RLOD$DISP * * THE LINE BUFFER (CONTAINING THE CURRENT OPERATOR ENTERED OR * DEFAULT PARAMETER RECORD) IS SCANNED TO DETERMINE IF THERE * ARE ANY KEY=VAL PAIRS FOR RECORD MODIFICATION. WE ARE JUST * LOOKING FOR AN EQUAL SIGN (=). * # FUNC KEYLINE B; BEGIN ITEM NX I; KEYLINE = FALSE; FOR NX = 0 STEP 1 UNTIL 79 DO BEGIN IF CLIN80[0] EQ "=" THEN KEYLINE = TRUE; IF CLIN80[0] EQ "=" THEN RETURN; IF CLIN80[0] EQ " " THEN RETURN; END END #KEYLINE# CONTROL EJECT; # * FUNC DCODE * * DCODE CONVERTS A TEN CHARACTER DISPLAY CODED * FIELD TO AN DECIMAL INTEGER. ONLY THE CHARACTERS * FROM 0 THROUGH 9 ARE CONVERTED. * # FUNC DCODE (CHARS) I; BEGIN ITEM CHARS C(10); ITEM TVAL I; ITEM J1 I; DCODE = 0; TVAL = 0; FOR J1 = 0 STEP 1 UNTIL 9 DO BEGIN IF (CCHARS GQ "0") AND (CCHARS LQ "9") THEN BEGIN TVAL = TVAL * 10 + (CCHARS - "0"); END END DCODE = TVAL; END #DCODE# CONTROL EJECT; # * PROC CALC$OIN (CHARS, SUBTR) * * DECIMAL DISPLAY CODE NUMBER *CHARS* IS EXPANDED TO THREE * DIGITS. IF *SUBTR*, ONE IS SUBTRACTED FROM *CHARS*. THE * NEW NUMBER IS STORED IN MSTROIN. # PROC CALC$OIN (CHARS,SUBTR); BEGIN ITEM CHARS C(10); ITEM SUBTR B; ITEM VAL1 I; VAL1 = DCODE (CHARS); IF SUBTR THEN VAL1 = VAL1 - 1; IF VAL1 LS 0 THEN VAL1 = 999; VAL1 = VAL1 + 10000; EDITX = XCDD (VAL1); C<0,3>MSTROIN[0] = C<7,3>EDITX; END #CALC$OIN# CONTROL EJECT; # * PROC CLEAR$PW * * CALLED FROM READ$CFO, NAMI * * SEARCH BUFFER MSGCOMA FOR THE STRING *PW=*. IF FOUND, * THEN THE PASSWORD IS DELETED. * UP TO 7 CHARACTERS ARE CLEARED, OR UNTIL A NON ALPHA- * NUMERIC CHARACTER IS ENCOUNTERED. THE BUFFER IS * EXPECTED TO BE 8 WORDS LONG OR TERMINATED WITH A * ZERO WORD. ALL OCCURRENCES OF A PASSWORD ARE CLEARED. * # PROC CLEAR$PW; BEGIN ITEM CPCHR I; #CURRENT CHAR TO READ # ITEM CPPOS I; #CURRENT CHAR POSITION TO WRITE # ITEM CPEND I; #LAST CHARACTER IN STMT # ITEM CP1 I; #LOOP INDEX # CPCHR = 0; CPPOS = 0; FOR CPEND = 0 WHILE #DETERMINE END OF STATEMENT # B<48,12>OPMSGZB[CPEND] NQ 0 AND CPEND LS 7 DO CPEND = CPEND + 1; #WORD WITH ZERO BYTE TERM # CPEND = CPEND*10 + 9; #LAST POSSIBLE CHARACTER # FOR CPCHR=0 WHILE CPCHR LQ CPEND DO BEGIN #STATEMENT LOOP # IF COPMSG[0] EQ "PW=" #KEYWORD FOUND # THEN BEGIN #IF PW= FOUND# COPMSG[0] = COPMSG[0]; #WRITE PW= # CPPOS = CPPOS + 3; #INCREMENT POINTERS PAST PW= # CPCHR = CPCHR + 3; FOR CP1=1 STEP 1 UNTIL 7 DO #INCREMENT CPCHR TO AFTER PW # BEGIN #PASSWORD LOOP# IF COPMSG[0] GQ "A" AND COPMSG[0] LQ "9" THEN CPCHR = CPCHR + 1; ELSE TEST CPCHR; #RESUME MAIN LOOP AT END OF PW # END #PASSWORD LOOP# END #IF PW= FOUND# ELSE BEGIN #NOT AT PW= # COPMSG[0] = COPMSG[0]; #WRITE THIS CHARACTER# #TO NEXT POSITION. # CPPOS = CPPOS + 1; #INCREMENT POINTERS # CPCHR = CPCHR + 1; END #ELSE NOT AT PW= # END #MAIN LOOP# FOR CP1=CPPOS STEP 1 UNTIL CPEND DO #ZERO REST OF BUFFER # COPMSG[0] = 0; RETURN; END #PROC CLEAR$PW# CONTROL EJECT; # * * PROC READ$CFO * * CALLED FROM GET$NXT$OP, SELJOB$LOD, SELJOB$MOD * * THE MESSAGE BUFFER IS CLEARED. IF WE ARE A CONSOLE JOB THEN * WE ISSUE A MESSAGE TO THE B-DISPLAY AND WAIT FOR A CFO INPUT * MESSAGE. IF WE ARE TESTING (IE., USING A REMOTE TERMINAL AND * NOT AT THE CONSOLE) THEN ISSUE A MESSAGE TO THE TERMINAL * AND WAIT FOR A RESPONSE. IN ANY CASE, THE CFO FLAG BIT IN RA+0 * IS SET AND CLEARED. * * * CALLS CFOBSET, READLN, CFOWAIT, PUTLINE, SENDMSG * # PROC READ$CFO; BEGIN ITEM SAVEFWA I; IF CSTAT EQ 2 THEN CMSG80[0] = " ENTER OPTION "; IF CSTAT EQ 4 THEN CMSG80[0] = " ENTER CHANGES "; SHOTERM (LOC(CMSG80[0]), 2, TRUE); FOR K = 0 STEP 1 UNTIL 7 DO CMESS[K] = SPACES; CFOBSET; IF TESTING THEN BEGIN CFOBCLR; TERMRD; JCAOPMSG[0] = TERMRDBFR; IF TERMRDLN EQ 0 THEN CSTAT = 0; ELSE CSTAT = CSTAT +1; END CFOWAIT; C<1,79>CMSG80[0] = JCAOPMSG[0]; C<0,1>CMSG80[0] = " "; SAVEFWA = IOFWA; IOFWA = LOC(CMSG80[0]); IOCNT = 7; PUTLINE; OPMSG[0] = CMSG80[0]; OPMSGZB[8] = 0; FOR K=0 WHILE K LQ 6 DO IF B<54,6>OPMSGZB[K] EQ 0 #IF 0-BYTE TERMINATOR # AND B<0,6>OPMSGZB[K+1] EQ 0 #SPLIT ACROSS WORD BOUNDARY # THEN BEGIN OPMSGZB[K+1] = 0; #FORCE END OF MESSAGE # K = 8; #TERMINATE LOOP # END ELSE K = K + 1; SENDMSG; IOFWA = SAVEFWA; CMSG80[0] = JCAOPMSG[0]; JCAOPMSG[0] = SPACES; END #READ CFO# CONTROL EJECT; # * * PROC SHOTERM (FWA, COUNT, FLUSH) * * CALLED FROM INITCPA, DS$DEFAULT, ROUT$FILES, DSPLA * SELJOB$LOD, SELJOB$SAV, SELJOB$MOD, OPTIONLOOP * * THE MESSAGE STARTING AT FWA (IF FWA IS 0 THEN USE THE LAST * FWA) CONSISTING OF COUNT NUMBER OF 10 CHARACTER WORDS IS SENT * TO THE TERMINAL OPERATOR (FILE LFN=OUTPUT). IF FLUSH IS * TRUE THEN WE ALSO ISSUE A WRITER TO THE OUTPUT FILE TO * FLUSH THE BUFFER (USED AT THE END OF A SERIES OF MESSAGES). * * CALLS PUTTERM, PUTTRMX * # PROC SHOTERM (FWA, COUNT, FLUSH); BEGIN ITEM FWA I; ITEM COUNT I; ITEM FLUSH B; IF FWA NQ 0 THEN IOFWA = FWA; IF COUNT NQ 0 THEN IOCNT = COUNT; IF TESTING THEN BEGIN PUTTERM; IF FLUSH THEN PUTTRMX; END END #SHOTERM# # * * PROC CLR$OPMSG * * CALLED FROM SETUP$NAMI, DFL$RCDS, SELJOB$LOD, NAMIN * * CLEAR THE OPERATOR MESSAGE BUFFER - OPMSG. * # PROC CLR$OPMSG; BEGIN ITEM NN I; FOR NN = 0 STEP 1 UNTIL 7 DO OPMSG1[NN] = SPACES; END #CLR$OPMSG# CONTROL EJECT; # * * PROC WEEKDAY * * CALLED FROM INITCPA * * GIVEN THE JULIAN DATE, THE DAY OF THE WEEK IS CALCULATED. THIS * IS USED DURING INITIALIZATION TIME AS PART OF THE ENVIRONMENTAL * IMPACT PROCESSING. * # PROC WEEKDAY; BEGIN EDITX = SIEJYR; N1 = C<0,1>EDITX - "0"; N2 = C<1,1>EDITX - "0"; N = (N1 * 10) + N2; IF N LS 70 THEN N = N + 100; # ADJUST FOR CENTURY # NR1 = 365.25 * N; EDITX = SIEJDAY; N1 = (C<0,1>EDITX - "0") * 100; N1 = N1 + ((C<1,1>EDITX - "0") * 10); N1 = N1 + (C<2,1>EDITX - "0"); NR1 = NR1 + N1; N = NR1; NR2 = N; IF NR1 EQ NR2 THEN NR1 = NR1 - 1.0; N = NR1; FOR K=0 WHILE N GR 6 DO N = N -7; ENV14 = DAY0[N]; END #WEEKDAY# CONTROL EJECT; # * * PROC INITCPA * * CALLED FROM SETUP$NAMI * * VARIOUS VALUES IN THE JOB CONTROL AREA ARE EXAMINED AND DISPLAYED * TO THE OPERATOR. THIS IS DONE DURING INITIALIZATION PROCESSING * FOR INFORMATIONAL PURPOSES ONLY. * * CALLS SIERRA, WEEKDAY, SHOWTERM * # PROC INITCPA; BEGIN SIERRA; IF NOT JCACFO THEN C<4,3>ENV2 = "NO "; IF NOT JCACMU THEN C<4,3>ENV3 = "NO "; IF NOT JCACME THEN C<6,3>ENV4 = "NO "; N = JCAPPU; EDITX = XCDD(N); C<5,2>ENV6 = C<8,2>EDITX; N = SIECM; EDITX = XCOD(N); C<3,6>ENV7 = C<4,6>EDITX; C<00,10>ENV15 = SIEDATE; C<10,10>ENV15 = SIETIME; WEEKDAY; SHOTERM (LOC(ENV1), 1, FALSE); SHOTERM (LOC(ENV1), 4, FALSE); SHOTERM (LOC(ENV5), 3, FALSE); SHOTERM (LOC(ENV8), 3, FALSE); ENV10 = JCAOPMSG; JCAOPMSG[0] = SPACES; FOR K = 0 STEP 1 UNTIL 29 DO IF CENV10 EQ 0 THEN CENV10 = " "; SHOTERM (LOC(ENV8), 6, FALSE); SHOTERM (LOC(ENV13), 1, FALSE); SHOTERM (LOC(ENV13), 4, FALSE); SHOTERM (0, 1, TRUE); NR1 = SIECPUS * 1000.0; NR2 = SIECPUMS; NR1 = NR1 + NR2; END #INITCPA# CONTROL EJECT; # * * PROC DS$DEFAULT * * CALLED FROM NEWBASE, OPTIONLOOP * * THE CURRENT DEFAULT CONTROL VALUES ARE DISPLAYED TO THE OPERATOR. * THIS INCLUDES, BUT IS NOT LIMITED TO, THE CURRENT MASTER FILE * NAME, NETWORK INVOCATION NUMBER, AND CURRENT DEFAULT PARAMETER * RECORD NAME. * * CALLS SHOTERM, XCOD, XSFW * # PROC DS$DEFAULT; BEGIN EDITX = XCDD(DCODE(MSTRLIN[0])); C<0,3>MSTRLIN[0] = C<7,3>EDITX; EDITX = XCDD(DCODE(MSTRUIN[0])); C<0,3>MSTRUIN[0] = C<7,3>EDITX; EDITX = XCOD(CMODE); LNY1A = C<8,2>EDITX; EDITX = XCOD(OPTION); LNY1B = C<8,2>EDITX; LNY1D = C<4,3>NETINVN[0]; LNR2A = C<4,3>NETINVN[0]; EDITX = XSFW(SIEMID); LNY1C = C<8,2>EDITX; IF C<0,1>MSTRUN[0] EQ 0 THEN MSTRUN[0] = SIEUSER; LNY1E = MSTROIN[0]; LNY1F = MSTRUIN[0]; LNZ1A = XSFW(MSTRRN[0]); LNZ1B = XSFW(MSTRMFN[0]); LNZ1C = XSFW(MSTRUN [0]); LNZ4A = XSFW(MSTRUN[0]); LNZ4B = XSFW(MSTRFM[0]); LNZ4B = SPACES; # T E M P O R A R Y # LNZ4C = XSFW(MSTRPW[0]); IF LNZ1C EQ SPACES THEN LNZ1C = "(UNDEF)"; IF LNZ4A EQ SPACES THEN LNZ4A = "(UNDEF)"; IF LNZ4B EQ SPACES THEN LNZ4B = "(N/A) "; IF LNZ4C EQ SPACES THEN LNZ4C = "(UNDEF)"; IF DISDFLT THEN BEGIN SHOTERM (LOC(LNY0), 1, FALSE); SHOTERM (0, 6, FALSE); SHOTERM (LOC(LNY3), 6, FALSE); SHOTERM (LOC(LNZ0), 7, FALSE); SHOTERM (LOC(LNZ4), 7, FALSE); SHOTERM (0, 1, TRUE); END OPMSG[0] = LNR; OPMSGZB[4] = 0; SENDMSG; OPMSG[0] = LNZ; OPMSGZB[7] = 0; SENDMSG; END #DS$DEFAULT# CONTROL EJECT; # * PROC CRACK$CALL * * CALLED FROM SETUP$NAMI * * DEBLOCK THE PARAMETERS IN THE NAMI CALL * STATEMENT AND PRESET SELECTED VARIABLES * * VALIDATE ALL KEYWORDS, AND UNSET THE *GO* CONDITION * IF ANY ERRORS ARE DIAGNOSED. * * * CALLS SETUPC, UPD8NIN, NEWMAST, UPD8MFN * # PROC CRACK$CALL; BEGIN ITEM CCERROR B = FALSE; #ERROR FLAG # ITEM CCILLWD C(10); #MESSAGE WORD # ITEM I; #SCRATCH # SWITCH KEYWORD, #CORRESPONDS TO GLOBAL ARRAY KWARRY # KWGO, KWMFN, KWOIN, KWOPTION, KWPW, KWRN, KWRS, KWSTOP, KWTERM, KWTEST, KWUN; PROC CC$ERROR; # WRITE CALL STATEMENT ERROR MESSAGE AND SET ERROR FLAG # BEGIN #PROC CC$ERROR# OPMSG[0] = " NAMI ILLEGAL KEYWORD/VALUE "; OPMSG[3] = CCILLWD; SHOTERM (LOC(OPMSG[0]),4,TRUE); #ERROR MESSAGE TO TERMINAL # OPMSGZB[4] = 0; SENDMSG; #ERROR MESSAGE TO DAYFILE # CCERROR = TRUE; #SET ERROR FLAG # END #PROC CC$ERROR# PROC CC$UPD8; # UPDATE INVOCATION NUMBER AND MASTER FILE. CALL CC$ERROR IF # # NO VALUE SPECIFIED. # BEGIN #PROC CC$UPD8# IF PACKWE[J2] EQ "=" THEN #VALUE SPECIFIED # BEGIN NETINCR[0] = 0; UPD8NIN; NEWMAST(SCANK,SCANV); UPD8MFN; END ELSE #NO =VALUE SPECIFIED # BEGIN CCILLWD = SCANK; #KEYWORD # CC$ERROR; #ISSUE ERROR MESSAGE # END END #PROC CC$UPD8# # BEGIN CRACK$CALL PROCEDURE # PACK80 = SPACES; PACK80 = JCAOPMSG; SETUPC; FOR J2=1 WHILE PACKZW[J2] NQ 0 DO #LOOP THRU CALL STMT # BEGIN SCANK = PACKW[J2]; SCANV = PACKW[J2+1]; FILL55 (SCANK); FILL55 (SCANV); FOR I=1 STEP 1 UNTIL NUMKWDS DO #LOOP THRU LEGAL KEYWORDS # IF KWORD[I] EQ SCANK #MATCH FOUND # THEN GOTO KEYWORD[I]; #JUMP TO PROCESS KEYWORD # CCILLWD = SCANK; #ILLEGAL KEYWORD # CC$ERROR; #ISSUE ERROR MESSAGE # GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWGO: # GO # AUTO$GO = TRUE; GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWTEST: # TEST # TESTING = TRUE; GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWRN: # RN PARAMETER IS SPECIFIED # # WE WANT TO MAKE SURE THAT THE OPERATOR TYPED IN A GOOD RECORD # # NAME FOR THE RN PARAMETER. WHETHER THE TYPED-IN NAME IS GOOD # # CAN NOT BE KNOWN UNTIL WE READ THE NAMSTRT FILE. THIS WILL BE # # DONE IN PRELOAD. FOR NOW, JUST SAVE THE TYPED-IN NAME AND # # REMEMBER THAT RN PARAMETER HAS BEEN ENTERED. # IF PACKWE[J2] EQ "=" THEN BEGIN RNCHANGED = TRUE; # REMEMBER TO PROCESS RN PARAM LATER # RNVALUE = SCANV; # SAVE THE TYPED-IN RN VALUE # END ELSE BEGIN CCILLWD =SCANK; CC$ERROR; END GOTO ENDLOOP; # PROCESS NEXT KEYWORD # KWMFN: # MFN = FILENAM # KWPW: # PW = PASSWOR # KWUN: # UN = USERNUM # CC$UPD8; #UPDATE FILES # GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWRS: # RS = JOBNAME # RESTRT = TRUE; RSAPPL = SCANV; #APPLICATION TO RESTART # AUTO$GO = TRUE; #FORCE THE *GO* # CC$UPD8; #UPDATE FILES # GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWOIN: # OIN = NNN # CALC$OIN(SCANV,FALSE); #CNVERT OLD INVOCATION NUMBER# CALL$OIN = MSTROIN[0]; #STORE OLD INVOCATION NUMBER# SCANV = CALL$OIN; # SET UP FOR NEWBASE CALL # CC$UPD8; #UPDATE FILES # GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWOPTION: #OPTION = SELECTED OPTION # CCILLWD = " (OPTION) "; #ILLEGAL ON CALL STATEMENT # CC$ERROR; GOTO ENDLOOP; #PROCESS NEXT KEYWORD # KWSTOP: # STOP # KWTERM: # TERM # OPTION = OPTTERM; #TERMINATE NAMI # GOTO ENDLOOP; #PROCESS NEXT KEYWORD # ENDLOOP: # END OF LOOP # IF PACKWE[J2] EQ "=" #INCREMENT PARAMETER INDEX # THEN J2 = J2 + 2; ELSE J2 = J2 + 1; END #OF LOOP J2# IF CCERROR #ERROR(S) ON CONTROL STATEMENT # THEN AUTO$GO = FALSE; #ALLOW OPERATOR TO CORRECT PARAMETERS# IF TESTING #TEST MODE # THEN BEGIN #SET FLAGS # CMODE = 1; DISDFLT = TRUE; END END #CRACK$CALL# CONTROL EJECT; # * * PROC SETUP$NAMI * * CALLED FROM NAMIN * * THIS IS NAMI INITIALIZATION CODE. VARIOUS TABLES ARE INITIALIZED * AND MODES (EG., NORMAL/DEBUG) ARE CHECKED. CERTAIN VALUES ARE * ALSO PRESET. * * CALLS INITCPA, CLR$OP$MSG, SENDMSG, PRELOAD * # PROC SETUP$NAMI; BEGIN IOFLG = 2; STARTIO; RESTRT = FALSE; APFOUND = FALSE; MSTROIN[0] = "000"; CALL$OIN = SPACES; CMODE = 3; CRACK$CALL; INITCPA; IF NOT TESTING THEN BEGIN CHEKORG; # ABORT IF NOT SYS ORG OR CSOJ # SETNUN; # SET NAMI USER NUMBER # END FOR N = 0 STEP 1 UNTIL 200 DO BEGIN RTFN[N] = SPACES; RTFNCD[N] = 0; JBL1[N] = SPACES; JBL2[N] = SPACES; JBL3[N] = SPACES; END JOBNAME = SPACES; JOBINDX = 0; CTLRCDS = 0; RUNRCDS = 0; PRELOAD; IF RNCHANGED THEN # A NEW RN PARAMETER HAS BEEN ENTERED # BEGIN # PROCESSING RN PARAMETER # FOUND = FALSE; FOR N=0 STEP 1 WHILE (N LQ LASTENTRY) AND (NOT FOUND) DO BEGIN IF (DIR$NAME[N] EQ RNVALUE) AND (DIR$TYPE[N] EQ PTYPE) THEN # THE TYPED-IN RN VALUE IS GOOD # BEGIN FOUND = TRUE; NETINCR[0] = 0; UPD8NIN; RNKEYWORD = "RN"; NEWMAST (RNKEYWORD,RNVALUE); UPD8MFN; END #IF# END #FOR# IF N GR LASTENTRY THEN # NO PARAM RECORD MATCHED THE TYPED-IN RN VALUE # BEGIN AUTO$GO = FALSE; # BAD RN VALUE. DO NOT GO AHEAD # OPMSG[0] = " PARAMETER RECORD NOT FOUND :"; OPMSG1[3] = RNVALUE; SHOTERM (LOC(OPMSG[0]),4,TRUE); # ERROR MESSAGE TO TERMINAL # OPMSGZB[4] = 0; SENDMSG; # MESSAGE TO DAYFILE # END RNCHANGED =FALSE; # RESET RNCHANGED FLAG # END # PROCESSING RN PARAMETER # OPTION = OPTLOAD; TBLPTR = DISPJBS; NEED$OPRES = FALSE; END #SETUP$NAMI# CONTROL EJECT; # * * PROC DFL$RCDS * * CALLED FROM NEWBASE, SELJOB$LOD * * SEND A LIST THE OF JOB AND PARAMETER RECORDS TO THE JOB * DAYFILE. THIS IS DONE TO ASSIST THE OPERATOR IN SELECTING * A JOB/PARAMETER RECORD IN LIEU OF THE K/L-DISPLAY. * * CALLS CLR$OP$MSG, SENDMSG * # PROC DFL$RCDS; BEGIN ITEM TYPNDX I; FOR TYPNDX = JTYPE WHILE TYPNDX NQ ZTYPE DO BEGIN OPMSG[0] = " JOB RECORD NAMES--"; IF TYPNDX EQ PTYPE THEN C<0,6>OPMSG[0] = " PARAM"; SHOTERM (LOC(OPMSG[0]), 4, FALSE); OPMSGZB[4] = 0; SENDMSG; N1 = 0; FOR N2 = 0 STEP 1 WHILE DIR$NAME[N2] NQ SPACES DO BEGIN IF DIR$TYPE[N2] EQ TYPNDX THEN BEGIN IF N1 EQ 0 THEN CLR$OPMSG; C<1,7>OPMSG1[N1] = C<0,7>DIR$NAME[N2]; N1 = N1 + 1; END IF N1 NQ 0 #SOMETHING IN BUFFER # AND DIR$NAME[N2+1] EQ SPACES #AND END OF DIRECTORY # THEN N1 = 4; IF N1 EQ 4 THEN BEGIN SHOTERM (LOC(OPMSG[0]), 4, TRUE); OPMSGZB[4] = 0; SENDMSG; N1 = 0; END END IF TYPNDX EQ PTYPE THEN TYPNDX = ZTYPE; IF TYPNDX EQ JTYPE THEN TYPNDX = PTYPE; END END #DFL$RCDS# CONTROL EJECT; # * PROC CHECK$OPTION # PROC CHECK$OPTION (OPVALUE); BEGIN ITEM OPVALUE C(10); IF C<0,4>OPVALUE EQ "SHOW" THEN OPTION = OPTDISP; #SHOW OPTS# IF C<0,4>OPVALUE EQ "SELE" THEN OPTION = OPTLOAD; #SELECT JOB# IF C<0,4>OPVALUE EQ "MODI" THEN OPTION = OPTMOD; #MODIFY JOB# IF C<0,4>OPVALUE EQ "SAVE" THEN OPTION = OPTSAVE; #SAVE JOB# IF C<0,4>OPVALUE EQ "SUBM" THEN OPTION = OPTSBMT; #SUBMIT JOB# IF C<0,4>OPVALUE EQ "TERM" THEN OPTION = OPTTERM; #TERMINATE# IF C<0,4>OPVALUE EQ "STOP" THEN OPTION = OPTTERM; #TERMINATE# IF C<0,4>OPVALUE EQ "ROUT" THEN OPTION = OPTROUT; #ROUTE IMED# IF C<0,6>OPVALUE EQ "NODISP" THEN DSPLYMODE = FALSE; IF C<0,6>OPVALUE EQ "DISPLA" THEN DSPLYMODE = TRUE; TBLPTR = DISPOPT; IF OPTION EQ OPTLOAD THEN TBLPTR = DISPJBS; IF OPTION EQ OPTMOD THEN TBLPTR = DISPCCB; IF OPTION EQ OPTSAVE THEN TBLPTR = DISPCCB; IF OPTION EQ OPTSBMT THEN TBLPTR = DISPZRO; IF OPTION EQ OPTSBMT THEN RUNJOB = TRUE; IF OPTION EQ OPTSBMT THEN RT$IMMED = TRUE; END #CHECK$OPTION# CONTROL EJECT; # * * PROC GET$NXT$OP * * CALLED FROM NAMIN * * IF WE ARE IN AUTOMATIC MODE (OPERATOR HAS SELECTED A PARAMETER * RECORD WHICH INDICATES WHICH JOBS TO LOAD AND ROUTE TO THE INPUT * QUEUE), THE OPTION IS FORCED TO BE SELECT-SAVE-ROUTE. * * OTHERWISE, WE DISPLAY TO THE OPERATOR (K/L-DISPLAY OR TERMINAL) * THE LIST OF OPTIONS AND READ (VIA CFO OR TERMINAL INPUT) * THE OPERATOR CHOICE OF OPERATION. THE VALID OPTIONS ARE- * * DISPLAY OPTIONS * SELECT JOB/PARAMETER RECORD * MODIFY JOB RECORD * SAVE JOB RECORD * ROUTE JOB RECORD TO INPUT QUEUE * TERMINATE THE RUN * * ALL INPUT MUST BE OF THE FORM- * * CFO.MESSAGE * * WE COMPARE THE FIRST THREE CHARACTERS OF MESSAGE WITH THE LIST * OF OPTIONS (EG, SEL, MOD, TER). * * CALLS DISPLAY$L, READ$CFO, CSCAN * # PROC GET$NXT$OP; BEGIN NEED$OPRES = FALSE; IF NXT2LOD NQ 0 THEN BEGIN OPTION = OPTLOAD; TBLPTR = DISPJBS; IF JBL1[NXT2LOD-1] EQ SPACES THEN NXT2LOD = 0; END IF (NXT2LOD EQ 0) AND (AUTO$GO) THEN OPTION = OPTTERM; IF (NXT2LOD EQ 0) AND (NOT AUTO$GO) THEN BEGIN RUNJOB = FALSE; CTLJOB = FALSE; TBLPTR = DISPOPT; DISPLAY$L; FOR CSTAT = 2 WHILE CSTAT EQ 2 DO BEGIN CSTAT = 2; READ$CFO; # -- CONSOLE INPUT -- # OPTION = OPTROUT+1; EDITX = C<0,6>CMESS[0]; CHECK$OPTION (EDITX); IF OPTION GR OPTROUT THEN CSTAT = 2; END END END #GET$NXT$OP# CONTROL EJECT; # * * PROC ROUT$FILES * * CALLED FROM NAMIN * * THE ROUTE-FILE QUEUE (ARRAY IN COMMON AREA ROUTABL) IS * EXAMINED AND FOR EACH FILE NAME FOUND, THAT FILE IS * ROUTED TO THE INPUT QUEUE. THIS ROUTINE IS CALLED AS PART * OF THE JOB TERMINATION PROCESSING. IN THAT WAY, ALL * NETWORK JOBS ARE STARTED (ROUGHLY) SIMULTANEOUSLY. * * CALLS XSFW, ROUTEM, SHOTERM * # PROC ROUT$FILES; BEGIN FOR N = 0 STEP 1 WHILE RTFN[N] NQ SPACES DO BEGIN ROUTYPE = 0; IF TESTING THEN ROUTYPE = 63; ROUTNAM = RTFN[N]; RSTM3 = XSFW(ROUTNAM); ROUTCOD = ROUTIQ; IF C<0,2>ROUTNAM EQ "NI" THEN BEGIN ROUTCOD = ROUTCOD + ROUTNIP ; START$SUBS = TRUE; INDXC = N; END ELSE BEGIN IF RTFNCD[N] NQ 0 THEN BEGIN ROUTCOD = ROUTCOD + ROUTSS; END RTEOT = RTFNOT[N]; RTESC = RTFNSC[N]; IF RTESC EQ 1 THEN RTESC = "SY"; ELSE IF RTESC EQ 2 THEN RTESC = "BC"; ELSE IF RTESC EQ 3 THEN RTESC = "NS"; ROUTEM; ROUTCOD = 0; END EDITX = XCOD(ROUTCOD); RSTM2 = C<6,4>EDITX; SHOTERM (LOC(RSTM0), 4, TRUE); IF ROUTCOD EQ 0 THEN RTFN[N] = SPACES; IF ROUTCOD EQ 0 THEN RTFNCD[N] = 0; END RT$IMMED = FALSE; END #ROUT$FILES# CONTROL EJECT; # * * PROC FILL55 (FILET) * * CALLED FROM PRELOAD, FIND$JOB, SELJOB$LOD, LOAD$JOB * * THE 10 CHARACTER WORD (FILET) IS EXAMINED CHARACTER BY * CHARACTER AND EACH NON-ALPHANUMERIC CHARACTER IS REPLACED * BY A BLANK. * # PROC FILL55 (FILET); BEGIN ITEM FILET C(10); ITEM N2 I; FOR N2 = 0 STEP 1 UNTIL 9 DO IF (CFILET LS "A") OR (CFILET GR "9") THEN CFILET = " "; END #FILL55# CONTROL EJECT; # * PROC PRELOAD * * PRELAOD READS THE NETWORK MASTER FILE (LFN=INFILE) * AND BUILDS THE DIRECTORY TABLE. EACH ENTRY IN THE * TABLE CONSISTS OF THREE FIELDS: * - DIR$NAME : NAME OF THE CORRESPONDING RECORD. * - DIR$TYPE : TYPE OF THE RECORD -- EITHER * PARAMETER RECORD OR JOB RECORD. * - PRU$ADDR : THE RELATIVE SECTOR ADDRESS OF THE * RECORD. # PROC PRELOAD; BEGIN # PRELOAD # NETINCR[0] = 0; UPD8NIN; GNETCCL; FET$RR = 1; # PRESET THE CRI AND RR FIELD OF THE # FET$CRI = 1; # FET TO THE FIRST PRU OF THE FILE. # RUNRCDS = 0; # PRESET JOB-RECORD COUNTER. # CTLRCDS = 0; # PRESET PARAMETER-RECORD COUNTER. # IF C<0,1>PFERMSG NQ 0 THEN # COULD NOT GET NAMSTRT FILE # BEGIN SHOTERM (LOC(PFERMSG), 4, FALSE); PFERMSG = " MASTER FILE NOT PRESENT"; SHOTERM (LOC(PFERMSG), 4, TRUE); DIR$NAME[0] = SPACES; # TABLE END # DIR$TYPE[0] = ZTYPE; # INDICATORS # GOTO ENDLOOP; END FOR N=0 STEP 1 WHILE (FET$STAT NQ STAT$EOF) AND (FET$STAT NQ STAT$EOI) DO BEGIN IF N GR 200 THEN ABORTRUN(1); # DIRECTORY TABLE OVERFLOWED # PRU$ADDR[N]= FET$CRI[0]; #RELATIVE SECTOR ADDRESS OF RECORD# FET$IN = FET$FIRST; # RESET IN AND OUT POINTERS # FET$OUT = FET$FIRST; # IN THE FET.# READSKP (INFIL,0); # READ AND SKIP TO NEXT RECORD# RECALL (INFIL); IF (FET$STAT NQ STAT$EOF) AND (FET$STAT NQ STAT$EOI) THEN BEGIN READH (INFIL,ONELINE,9,STATS); #READ FIRST LINE OF RECORD # JOBNAME = LIN$10[0]; # EXTRACT RECORD NAME FROM 1ST LINE # FILL55 (JOBNAME); # SPACE FILL RECORD NAME # DIR$NAME[N] = JOBNAME; # STORE RECORD NAME IN DIRECTORY # READH (INFIL,ONELINE,9,STATS); #READ SECOND LINE OF RECORD# RECORDTYPE = C<6,3>LIN$100; # FIGURE OUT RECORD TYPE # IF RECORDTYPE EQ "PAR " THEN BEGIN # PARAMETER RECORD ENCOUNTERED # DIR$TYPE[N] = PTYPE; # STORE RECORD TYPE # CTLRCDS = CTLRCDS+1; #INCRECMENT PARAMETER RECORD COUNT# END ELSE IF RECORDTYPE EQ "JOB " THEN BEGIN # JOB RECORD ENCOUNTERED # DIR$TYPE[N] = JTYPE; # STORE RECORD TYPE # RUNRCDS = RUNRCDS + 1; # INCRECMENT JOB RECORD COUNT # END ELSE BEGIN # UNKNOWN RECORD TYPE # OPMSG[0]=" ERROR IN NAMSTRT FILE. UNKNOWN RECORD TYPE."; OPMSGZB[5] = 0; SENDMSG; # SEND A DAYFILE MESSAGE, # ABTRUN; # AND ABORT THE PROGRAM. # END END ELSE # EOF OR EOI ENCOUNTERED # BEGIN DIR$NAME[N] = SPACES; # AS AN END OF DATA INDICATOR # DIR$TYPE[N] = ZTYPE; LASTENTRY = N - 1; # LAST ENTRY IN THE TABLE # END END # FOR # ENDLOOP: PRLDNIN; END # PRELOAD # CONTROL EJECT; # * * PROC INTRACT * * CALLED FROM RLOD$DISP * * THE NEXT LINE OF DATA IS ENTERED INTO THE K/L-DISPLAY * BUFFER. * # PROC INTRACT (NDX1, NXT); BEGIN ITEM NDX1 I; ITEM CNT I; ITEM NXT I; ITEM MORE$2$DO B; NXT = NDX1; MORE$2$DO = TRUE; FOR CNT = 1 STEP 1 WHILE MORE$2$DO DO BEGIN CHX[NDX1+CNT] = XSFW(LINX[CNT-1]); IF (CNT+1) GQ CWC[NDX1] THEN MORE$2$DO = FALSE; END NXT = NDX1 + CWC[NDX1]; END #INTRACT# CONTROL EJECT; # * * PROC EXTRACT * * CALLED FROM DISPLAY$L * * THIS IS THE OPPOSITE OF INTRACT. HERE THE NEXT LINE OF THE * CURRENT K/L-DISPLAY BUFFER IS EXTRACTED AND MADE AVAILABLE * FOR PROCESSING. * # PROC EXTRACT (NDX1, CNT, NXT); BEGIN ITEM NDX1 I; ITEM CNT I; ITEM NXT I; ITEM MORE$2$DO B; NXT = 0; MORE$2$DO = TRUE; FOR CNT = 0 STEP 1 UNTIL 9 DO LINX[CNT] = SPACES; IF CWC[NDX1] GR 1 THEN BEGIN FOR CNT = 1 STEP 1 WHILE MORE$2$DO DO BEGIN LINX[CNT-1] = CHX[NDX1+CNT]; IF (CNT+1) EQ CWC[NDX1] THEN MORE$2$DO = FALSE; END END NXT = NDX1 + CWC[NDX1]; CNT = NXT - NDX1; END #EXTRACT# CONTROL EJECT; # * * PROC FIND$JOB * * CALLED FROM LOAD$JOB * * THE DIRECTORY TABLE IS SEARCHED FOR THE DESIRED RECORD * NAME. IF THE NAME IS FOUND, RETRIEVE THE RELATIVE SECTOR * ADDRESS FROM THE DIRECTORY TABLE AND STORE IT IN THE RR * FIELD OF THE FET TO UTILIZE A RANDOM READ. THE FIRST 3 * LINES OF THE RECORD ARE THEN READ OFF TO MAKE THE SITUA- * TION COMPATIBLE WITH THE EXITSTING CODE IN THE CALLER -- * LOAD$JOB. * * CALLS UPD8NIN, GNETCCL, GETLINE, CSCAN, FILL55, * # PROC FIND$JOB; BEGIN IF INV$INCR AND NOT RESTRT THEN # NIP APPEARS IN JOB STREAM # BEGIN NETINCR[0] = 1; UPD8NIN; GNETCCL; INV$INCR = FALSE; LNR2A = C<4,3>NETINVN[0]; OPMSG[0] = LNR; OPMSGZB[4] = 0; SENDMSG; SHOTERM (LOC(LNR0), 4, TRUE); END IF CALL$OIN EQ SPACES THEN CALC$OIN(NETINVN[0],TRUE); #STORE OIN = NIN-1 # IOFWA = LOC(LINX[0]); FOR I=0 STEP 1 WHILE I LQ LASTENTRY AND (DIR$NAME[I] NQ JOBNAME) DO BEGIN END IF DIR$NAME[I] EQ JOBNAME THEN BEGIN FET$RR[0] = PRU$ADDR[I]; #STORE THE SECTOR ADDRESS INTO THE FET # FET$IN[0] = FET$FIRST[0]; # RESET IN AND # FET$OUT[0] =FET$FIRST[0]; # OUT PONTERS. # GETLINE; GETLINE; GETLINE; END ELSE BEGIN OPMSG[0] = " COULD NOT FIND JOB NAME:"; OPMSG1[3] = JOBNAME; OPMSGZB[4] = 0; SENDMSG; ABTRUN; END END #FIND$JOB# CONTROL EJECT; # * * PROC CLRTABLE * * CALLED FROM LOADJOB * * CLEAR THE L-DISPLAY CARD/LINE BUFFER. * # PROC CLRTABLE; BEGIN N = CWC[0]; FOR N1 = 0 WHILE N LS TLEN[TBLPTR] DO BEGIN N2 = CWC[N]; IF N2 EQ 0 THEN N2 = N; IF N2 EQ 7 THEN BEGIN CHLOW[N] = "--"; FOR N1 = 1 STEP 1 UNTIL 6 DO CHX[N+N1] = SPACES; END N = N + N2; END END #CLRTABLE# CONTROL EJECT; # * * PROC NEWBASE * * CALLED FROM SELJOB$LOD * * WHEREIN WE SCAN THE OPERATOR INPUT (CFO) MESSAGE AND SEND * THE NEW NETWORK CCL FILE NAMING INFORMATION (PFN, UN, ETC) * TO NEWMAST WHICH GETS THE NEW MASTER FILE. * * AFTER THE NEW FILE IS OPENED, NAMI IS IN EFFECT RESTARTED * (ACUTALLY RESET) TO BEGIN AGAIN WITH THE NEW MASTER FILE. * * CALLS NEWMAST, UPD8MFN, PREL$JOBS, DFL$RCDS, DS$DEFAULT, DISPLAY$L * # PROC NEWBASE; BEGIN SWITCH KEYWORD, #CORRESPONDS TO ARRAY KWARRY # KWGO, KWMFN, KWOIN, KWOPTION, KWPW, KWRN, KWRS, KWSTOP, KWTERM, KWTEST, KWUN; ITEM I; #SCRATCH # ITEM IERROR B; #ERROR FLAG # IERROR = FALSE; PACK80 = CMSG80[0]; SETUPC; #UNPACK CFO COMMAND # UPCFLAG = TRUE; FOR K=0 WHILE UPCFLAG DO #LOOP THROUGH CFO COMMAND # BEGIN SCANK = PACKW[K]; SCANV = PACKW[K+1]; FILL55(SCANV); FILL55(SCANK); FOR I=1 STEP 1 UNTIL NUMKWDS DO #FIND KEYWORD MATCH # IF KWORD[I] EQ SCANK THEN GOTO KEYWORD[I]; IF SCANK EQ SPACES #END OF CFO COMMAND FOUND # THEN BEGIN UPCFLAG = FALSE; TEST K; END #FALL THRU TO HERE ON NO MATCH # KWTEST: #TEST NOT ALLOWED AS CFO COMMAND# OPMSG[0] = " ILLEGAL KEYWORD = "; OPMSG[2] = SCANK; SHOTERM (LOC(OPMSG[0]),3,TRUE); OPMSGZB[3] = 0; SENDMSG; IERROR = TRUE; GOTO ENDLOOP; KWGO: #GO # AUTO$GO = TRUE; GOTO ENDLOOP; KWMFN: #MFN = # KWPW: #PW = # KWUN: #UN = # NEWMAST (SCANK,SCANV); GOTO ENDLOOP; KWRN: #RN = # # BEFORE UPDATING THE RN VALUE IN THE MEMORY FILE, WE WANT TO BE # # SURE THAT THE TYPED-IN NAME FOR RN MATCHES ONE OF THE PARAMETER# # RECORDS IN THE LATEST MFN FILE. SINCE MFN AND RN MAY BE CHANGED# # BY THE SAME COMMAND, WE WILL DEFER THE PROCESSING OF THE RN # # PARAMETER UNTIL AFTER THE WHOLE COMMAND IS PROCESS, AND THE NEW# # MFN, IF ONE HAS BEEN ENTERED, IS READ. # RNCHANGED =TRUE; # REMEMBER TO PROCESS RN PARAM LATER # RNVALUE = SCANV; # SAVE THE TYPED-IN RN VALUE # GOTO ENDLOOP; # PROCESS NEXT KEYWORD # KWRS: #RS = # RESTRT = TRUE; RSAPPL = SCANV; AUTO$GO = TRUE; NEWMAST (SCANK,SCANV); GOTO ENDLOOP; KWOIN: #OIN = # CALC$OIN (SCANV,FALSE); #CONVERT OLD INVOCATION NUMBER # CALL$OIN = MSTROIN [0]; #STORE OLD INVOCATION NUMBER # SCANV = CALL$OIN; # SET UP FOR NEWBASE CALL # GOTO ENDLOOP; KWOPTION: CHECK$OPTION(SCANV); CSTAT = 0; GOTO ENDLOOP; KWSTOP: #STOP # KWTERM: #TERM # OPTION = OPTTERM; GOTO ENDLOOP; ENDLOOP: IF PACKWE[K] EQ "=" #INCREMENT PARAMETER INDEX # THEN K = K + 2; ELSE K = K + 1; END IF IERROR THEN AUTO$GO = FALSE; #NO GO YET IF ERRORS FOUND # IF OPTION EQ OPTLOAD THEN BEGIN UPD8MFN; PRELOAD; IF NOT RNCHANGED THEN BEGIN # NOTE: IF RN IS ENTERED, WE WILL CALL # # DS$DEFAULT AND DFL$RCDS LATER AFTER WE # # HAVE UPDATED RN. # DS$DEFAULT; DFL$RCDS; END END IF RNCHANGED THEN BEGIN # PROCESSING RN PARAMETER # FOUND = FALSE; FOR N=0 STEP 1 WHILE (N LQ LASTENTRY) AND (NOT FOUND) DO BEGIN IF (DIR$NAME[N] EQ RNVALUE) AND (DIR$TYPE[N] EQ PTYPE) THEN BEGIN # THE TYPED-IN RN VALUE IS GOOD # FOUND = TRUE; RNKEYWORD = "RN"; NEWMAST (RNKEYWORD,RNVALUE); END #IF# END #FOR# IF N GR LASTENTRY THEN BEGIN # NO PARAM RECORD MATCHED THE TYPED-IN RN VALUE # AUTO$GO = FALSE; # BAD RN VALUE. DO NOT GO AHEAD # OPMSG[0] = " PARAMETER RECORD NOT FOUND :"; OPMSG1[4] = RNVALUE; SHOTERM (LOC(OPMSG[0]),5,TRUE); # ERROR MESSAGE TO TERMINAL # OPMSGZB[5] = 0; SENDMSG; END RNCHANGED =FALSE; # RESET RNCHANGED FLAG # DS$DEFAULT; # DISPLAY CURRENT DEFAULT PARAMETER VALUES # DFL$RCDS; # DISPLAY PARAMETER/JOB RECORD NAMES # END # PROCESSING RN PARAMETER# END #NEWBASE# CONTROL EJECT; # * * PROC DSPLAY$LIN * * CALLED FROM DISPLAY$L * * DSPLAY$LIN IS RESPONSIBLE FOR DETERMINING WHETHER OR NOT THE * CURRENT LINE OF DATA IN THE K/L-DISPLAY BUFFER IS TO BE SENT * TO THE TERMINAL. THIS IS PRIMARILY USED FOR TESTING. * * CALLS SHOTERM * # PROC DSPLAY$LIN; BEGIN ITEM NO$DISP B; DLNUM1 = XCDD(INDX1*10000000); IF DLNUM2 EQ " " THEN DLNUM2 = " 0"; K = (WORDCNT + 1) * 10; C<0,K>DATALN = C<0,K>LINX1A[0]; IF (LINX[1] EQ SPACES) AND (LINX[2] EQ SPACES) THEN SKPLNS = SKPLNS +1; ELSE SKPLNS = 0; NO$DISP = FALSE; IF (NOT DSPLYMODE) THEN NO$DISP = TRUE; IF (NXT2LOD NQ 0) AND (TBLPTR EQ DISPJBS) THEN NO$DISP = TRUE; IF (NXT2LOD NQ 0) AND (TBLPTR EQ DISPOPT) THEN NO$DISP = TRUE; IF SKPLNS GQ 2 THEN NO$DISP = TRUE; IF TBLPTR EQ DISPZRO THEN NO$DISP = TRUE; IF (OPTION EQ OPTSAVE) THEN NO$DISP = TRUE; IF ((OPTION EQ OPTLOAD) AND (TBLPTR EQ DISPCCB)) THEN NO$DISP = TRUE; IF (NOT NO$DISP) THEN BEGIN IF (NOT DISEND) THEN SHOTERM (LOC(DATALN), WORDCNT+1, FALSE); ELSE SHOTERM (LOC(DATALN), WORDCNT+1, TRUE); END END #DSPLAY$LIN# CONTROL EJECT; # * PROC DISPLAY$L # PROC DISPLAY$L; BEGIN P = TADR[TBLPTR]; DISEND = FALSE; INDX3 = 0; FOR INDX1 = 0 STEP 1 WHILE NOT DISEND DO BEGIN #DISPLAY LOOP# INDX2 = INDX3; EXTRACT (INDX2, WORDCNT, INDX3); FOR N = 0 STEP 1 UNTIL 8 DO LINX[9-N] = LINX[8-N]; LINX[0] = CHX[INDX2]; FOR K = 0 STEP 1 UNTIL 5 DO CLINX[0] = " "; IF WORDCNT EQ 0 THEN BEGIN LINX[0] = SPACES; LINX[1] = SPACES; LINX[2] = " -DISEND- "; DISEND = TRUE; WORDCNT = 2; END DSPLAY$LIN; END #DISPLAY LOOP# END #DISPLAY$L# CONTROL EJECT; # * * PROC SELJOB$LOD * * CALLED FROM OPTIONLOOP * * WHEREIN WE SELECT WHICH PARAMETER OR JOB RECORD WE NEED FROM * THE NETWORK CCL FILE (LFN=INFIL). DURING THIS PROCESS, WE * ALSO CHECK FOR THE OPERATOR ENTERING NEW CCL FILE PARAMETERS * (EG., NAME, USER NUMBER, ETC.) AND SET UP TO USE A NEW CCL * FILE IF NECESSARY. * * TWO TYPES OF RECORDS MAY BE SELECTED - PARAMETER RECORDS AND * JOB RECORDS. PARAMETER RECORDS CONTAIN SUBSTITUTABLE PARAMETERS * FOR THE JOB CCL STATEMENTS, AS WELL AS A LIST OF WHICH JOB * RECORDS ARE TO BE LOADED. JOB RECORDS ARE JUST THAT- CCL * STATEMENTS FOR AN INDIVIDUAL JOB WHICH WILL BE ROUTED TO THE * INPUT QUEUE. * * THIS ROUTINE IS ALSO ENTERED DURING AUTOMATIC MODE. IF A PARAMETER * RECORD WITH A LIST OF JOBS WAS SELECTED, WE ENTER THIS AUTO * MODE AND RUN THROUGH THE VARIOUS ROUTINES REQUIRED TO PREPARE THE * JOB TO BE SENT TO THE INPUT QUEUE FOR EACH JOB IN THE LIST. THIS * DOES NOT REQUIRE OPERATOR INTERVENTION, HENCE, THE AUTO MODE. * * CALLS DFL$RCDS, DISPLAY$L, READ$CFO, KEYLINE, NEWBASE, CSCAN * CLR$OPMSG, SENDMSG, SHOTERM, UPD8MFN, FILL55 * # PROC SELJOB$LOD; BEGIN SJL$SEARCH: IF JOBINDX EQ 0 THEN BEGIN JOBNAME = SPACES; ROUTNAM = "ROUTFIL"; CTLJOB = FALSE; RUNJOB = FALSE; IF NXT2LOD EQ 0 THEN BEGIN TBLPTR = DISPJBS; DFL$RCDS; FOR CSTAT = 2 WHILE CSTAT NQ 0 DO BEGIN CSTAT = 2; IF AUTO$GO THEN DS$DEFAULT; IF AUTO$GO THEN CMSG80[0] = "GO. "; ELSE READ$CFO; LIN80[0] = CMSG80[0]; IF KEYLINE THEN BEGIN CSTAT = 2; NEWBASE; END ELSE CSTAT = 0; IF C<0,4>CMSG80[0] EQ "TERM" THEN OPTION = OPTTERM; IF C<0,4>CMSG80[0] EQ "STOP" THEN OPTION = OPTTERM; END END ELSE BEGIN JOBNAME = JBL1[NXT2LOD-1]; #JOB RECORD NAME# ROUTNAM = JBL2[NXT2LOD-1]; #ROUTE AND PRODUCT NAME# SUBSYSNAM = JBL3[NXT2LOD-1]; #SUBSYSTEM NAME# ROUTYPE = 0; IF SUBSYSNAM NQ SPACES THEN ROUTYPE = 1; IF SUBSYSNAM NQ SPACES THEN ROUTNAM = SUBSYSNAM; JOBOT = JBL3OT[NXT2LOD-1]; # JOB OT # JOBSC = JBL3SC[NXT2LOD-1]; # JOB SC # JOBINDX = NXT2LOD + CTLRCDS; NXT2LOD = NXT2LOD +1; RUNJOB = TRUE; END CONTROL EJECT; IF (JOBINDX EQ 0) AND (OPTION EQ OPTLOAD) THEN BEGIN PACK80 = CMSG80[0]; SETUPC; JOBNAME = PACKW[0]; FILL55 (JOBNAME); IF JOBNAME EQ "GO" #GO # AND PACKZW[1] EQ 0 # ALONE IN CFO COMMAND # THEN AUTO$GO = TRUE; IF AUTO$GO THEN JOBNAME = XSFW(MSTRRN[0]); FOR K = 0 STEP 1 WHILE JOBINDX EQ 0 DO BEGIN IF DIR$NAME[K] EQ SPACES THEN BEGIN CLR$OPMSG; OPMSG[0] = " ------- INVALID SELECTION"; OPMSGZB[3] = 0; SENDMSG; SHOTERM (LOC(OPMSG[0]), 3, TRUE); AUTO$GO = FALSE; GOTO SJL$SEARCH; END IF DIR$NAME[K] EQ JOBNAME THEN JOBINDX = K + 1; IF (NOT TESTING) AND (NOT AUTO$GO) THEN JOBINDX = 0; END IF DIR$TYPE[JOBINDX-1] EQ PTYPE THEN CTLJOB = TRUE; IF DIR$TYPE[JOBINDX-1] EQ JTYPE THEN RUNJOB = TRUE; IF RUNJOB THEN ROUTNAM = JOBNAME; END IF OPTION EQ OPTLOAD THEN TBLPTR = DISPCCB; IF CTLJOB THEN NXT2LOD = 1; IF CTLJOB THEN MSTRRN[0] = JOBNAME; IF CTLJOB THEN UPD8MFN; END ELSE BEGIN FLS2 = JOBNAME; SHOTERM (LOC(FLS0), 4, TRUE); OPTION = OPTDISP; TBLPTR = DISPOPT; NEED$OPRES = TRUE; #$$$# JOBINDX = 0; END END #SELJOB$LOD# CONTROL EJECT; # * * PROC SELJOB$SAVE * * CALLED FROM OPTIONLOOP * * THIS IS THE CLEAN-UP ROUTINE FOR SAVING A JCL RECORD. IT IS * CALLED AFTER THE JOB CCL STATEMENTS HAVE BEEN WRITTEN TO THE * ROUTE FILE, AND SETS SEVERAL FLAGS FOR LATER PROCESSING. * * CALLS SHOTERM * # PROC SELJOB$SAVE; BEGIN IF RUNJOB THEN BEGIN SHOTERM (LOC(FSV0), 4, TRUE); IF AUTO$GO THEN RDY$4$ROUT = TRUE; END OPTION = OPTDISP; TBLPTR = DISPOPT; NEED$OPRES = TRUE; #$$$# END #SELJOB$SAVE# CONTROL EJECT; # * * PROC SELJOB$ROUTE * * CALLED FROM OPTIONLOOP * * THIS IS THE CLEAN-UP ROUTINE FOR ROUTING A JOB TO THE * INPUT QUEUE. WHEN CALLED, THE JOB NAME IS ENTERED INTO A * TABLE (IN COMMON AREA ROUTABL) WHICH IS CHECKED AT THE * TERMINATION OF THE PROGRAM AT WHICH TIME THE FILES ARE * ACTUALLY ROUTED TO THE INPUT QUEUE. * # PROC SELJOB$ROUTE; BEGIN ITEM TEMPR C(10); TEMPR = ROUTNAM; IF (ROUTYPE EQ 1) AND (SUBSYSNAM NQ SPACES) THEN ROUTNAM = C<0,9>SUBSYSNAM; ROUTCOD = 0; FOR N = 0 STEP 1 WHILE ROUTCOD EQ 0 DO BEGIN IF RTFN[N] EQ SPACES THEN BEGIN FILL55 (ROUTNAM); RTFN[N] = ROUTNAM; RTFNCD[N] = ROUTYPE; RTFNOT[N] = JOBOT; RTFNSC[N] = JOBSC; END IF RTFN[N] EQ ROUTNAM THEN ROUTCOD = 1; END ROUTNAM = TEMPR; IF RT$IMMED THEN ROUT$FILES; OPTION = OPTDISP; TBLPTR = DISPOPT; NEED$OPRES = TRUE; #$$$# END #SELJOB$ROUTE# CONTROL EJECT; # * * PROC RLOD$DISP * * CALLED FROM LOAD$JOB, SELJOB$MODIFY * * THE CCL JOB SELECTED BY THE OPERATOR IS SCANNED FOR THOSE * LINES WHICH ARE PROBABLY CANDIDATES FOR VALUE MODIFICATION. * THESE LINES ARE MOVED TO THE K/L-DISPLAY BUFFER. * * CALLS KEYLINE, INTRACT * # PROC RLOD$DISP; BEGIN J1 = CWC[0]; N = 0; FOR INDX1 = 0 STEP 1 UNTIL INDXC DO BEGIN LIN80[0] = CCLE[INDX1]; IF KEYLINE THEN BEGIN INTRACT (J1, N); J1 = N; END END END #RLOD$DISP# CONTROL EJECT; # * * PROC SCAN$CCLS * * CALLED FROM LOAD$JOB, SELJOB$MODIFY * * GIVEN A LINE OF KEY=VAL PAIRS, THIS ROUTINE CHECKS EACH * LINE IN THE JOB CCL BUFFER AND MAKES ALL THE INDICATED * CHANGES. THAT IS, THE BUFFER IS SEARCHED FOR ALL OCCURANCES * OF -KEY- AND THESE OCCURANCES ARE REPLACED BY -VAL-. * * CALLS CSCAN, GNXT$CCL * # PROC SCAN$CCLS; BEGIN PACK80 = CMSG80[0]; SETUPC; N2 = 1; REPSIZ[INDXR+N2] = 0; FOR K = 0 STEP 2 WHILE PACKZW[K] NQ 0 DO BEGIN REPKEY[INDXR+N2] = PACKW[K]; REPVAL[INDXR+N2] = PACKW[K+1]; REPSIZ[INDXR+N2] = 1; REPSIZ[INDXR+N2+1] = 0; N2 = N2 + 1; END FOR INDX1= 0 STEP 1 WHILE INDX1 LQ INDXC DO BEGIN PACK80 = CCLE[INDX1]; SETUPC; UPCFLAG = FALSE; FOR N1 = (INDXR+1) STEP 1 WHILE REPSIZ[N1] NQ 0 DO BEGIN FOR K = 0 STEP 1 WHILE C<0,1>PACKW[K] NQ 0 DO BEGIN IF C<0,7>PACKW[K] EQ C<0,7>REPKEY[N1] THEN BEGIN C<0,7>PACKW[K] = C<0,7>REPVAL[N1]; UPCFLAG = TRUE; END END END IF UPCFLAG THEN REPACK; IF UPCFLAG THEN CCLE[INDX1] = PACK80; END END #SCAN$CCLS# CONTROL EJECT; PROC REPACK; BEGIN ITEM MORE2DO B; ITEM K1 I; ITEM K2 I; ITEM K3 I; PACK80 = SPACES; MORE2DO = TRUE; K1 = 0; FOR K2 = 0 STEP 1 WHILE MORE2DO DO BEGIN EDITX = PACKW[K2]; FOR K3 = 0 STEP 1 UNTIL 6 DO BEGIN IF CEDITX NQ 0 THEN BEGIN CPACK80 = CEDITX; K1 = K1 +1; END END IF C<9,1>EDITX EQ 0 THEN CPACK80 = " "; ELSE IF C<9,1>EDITX NQ "_" THEN CPACK80 = C<9,1>EDITX; IF PACKZW[K2+1] EQ 0 THEN MORE2DO = FALSE; IF C<9,1>EDITX NQ "_" THEN K1 = K1 +1; END END #REPACK LINE# CONTROL EJECT; # * PROC SCAN2$CCLS # PROC SCAN2$CCLS; BEGIN ITEM INDX I; FOR INDX = 0 STEP 1 WHILE INDX LQ INDXC DO BEGIN PACK80 = CCLE[INDX]; SETUPC; UPCFLAG = FALSE; FOR N1 = 0 STEP 1 WHILE REPSIZ[N1] NQ 0 DO BEGIN FOR K = 0 STEP 1 WHILE PACKZW[K] NQ 0 DO BEGIN IF C<0,7>PACKW[K] EQ C<0,7>REPKEY[N1] THEN BEGIN C<0,7>PACKW[K] = C<0,7>REPVAL[N1]; UPCFLAG = TRUE; END END END IF UPCFLAG THEN REPACK; IF UPCFLAG THEN CCLE[INDX] = PACK80; END END #SCAN2$CCLS# CONTROL EJECT; PROC FINDJRC; BEGIN ITEM I; # INDEX VARIABLE # # SEARCH FOR JOB RECORD # DONE = FALSE; JOBFOUND = FALSE; FOR I = 0 STEP 1 WHILE NOT DONE DO BEGIN IF DIR$NAME[I] EQ SPACES THEN DONE = TRUE; ELSE IF DIR$NAME[I] EQ JBNAME THEN BEGIN JOBFOUND = TRUE; DONE = TRUE; END END END CONTROL EJECT; PROC JNOTF; # CALLED WHEN JOB RECORD NOT FOUND # BEGIN RDY$2$ROUT = FALSE; CLR$OPMSG; OPMSG[0] = " RECORD NOT FOUND - "; OPMSG[2] = JBNAME; OPMSGZB[3] = 0; SENDMSG; SHOTERM(LOC(OPMSG[0]),5,TRUE); JOBINDX = 0; OPTION = OPTTERM; TBLPTR = DISPOPT; NXT2LOD = 0; NETINCR[0] = 0; UPD8NIN; NEED$OPRES = TRUE; RETURN; END CONTROL EJECT; # * * PROC LOAD$JOB * * CALLED FROM OPTIONLOOP * * GIVEN A PARTICUAR JOBNAME (IN THE VARIABLE OF THE SAME NAME), * THIS ROUTINE EFFECTS THE SEARCH THROUGH THE NETWORK CCL FILE * AND LOADS THE CCL BUFFER WITH THE JOB. * * IF THE SELECTED RECORD IS A PARAMETER RECORD, THE JOB EXTRACTION * TABLE IS SET UP FOR ADDITIONAL PASSES THROUGH OUR SYSTEM. * * CALLS FIND$JOB, GETLINE, PRLDNIN, CSCAN, FILL55, SCAN$CCLS * RLOD$DISP. * # PROC LOAD$JOB; BEGIN TBLPTR = DISPCCB; P = TADR[TBLPTR]; FIRST = TRUE; INDXC = -1; # CLRTABLE CALL HERE # FOR IOCMP = 0 WHILE IOCMP EQ 0 DO BEGIN IF FIRST THEN BEGIN FIND$JOB; LINX[IOCNT-1] = XSFW(LINX[IOCNT-1]); IF C<0,2>LINX[0] NQ ".*" THEN INDXC = INDXC + 1; IF C<0,2>LINX[0] NQ ".*" THEN CCLE[INDXC] = LIN80[0]; MODFYNDX = 0; IOCMP = 0; LDF2 = JOBNAME; OPMSG[0] = LDF; OPMSGZB[3] = 0; SHOTERM (LOC(DATALNS), 4, TRUE); SENDMSG; FIRST = FALSE; END ELSE BEGIN #NOT FIRST# IOCNT = 8; IOFWA = LOC(LINX[0]); FOR J2 = 0 STEP 1 UNTIL 9 DO LINX[J2] = SPACES; GETLINE; IF (LIN6[0] EQ "TITLE(") THEN IOCMP = EOR; IF IOCMP EQ 0 THEN BEGIN LINX[IOCNT-1] = XSFW(LINX[IOCNT-1]); IF C<0,2>LINX[0] NQ ".*" THEN INDXC = INDXC + 1; IF C<0,2>LINX[0] NQ ".*" THEN CCLE[INDXC] = LIN80[0]; END END END IF CTLJOB THEN BEGIN EDITX = NETINVN[0]; PRLDNIN; INV$INCR = FALSE; # ASSUME NIP NOT IN JOB LIST # NET$START = FALSE; # AND NOT NETWORK STARTUP # UPIX = -1; INDXR = -1; J3 = 0; FOR J2 = 0 STEP 1 WHILE J2 LQ INDXC DO BEGIN PACK80 = CCLE[J2]; FOR K = 0 STEP 1 WHILE CPACK80 NQ C<0,1>PACKEND DO BEGIN IF (CPACK80 EQ ")") OR (CPACK80 EQ ".") THEN CPACK80 = C<0,1>PACKEND; END SETUPC; IF UPCSTAT NQ 0 # IF ANY INVALID PARAMETER(S) FOUND # THEN ABORTRUN (101); IF C<0,3>PACKW[0] EQ "JOB" THEN BEGIN IF J3 GQ 200 THEN ABORTRUN(2); SCANK = PACKW[1]; SCANV = PACKW[2]; JOBDI = FALSE; IF (C<0,2>PACKW[3] EQ "DI" OR C<0,2>PACKW[4] EQ "DI") THEN JOBDI = TRUE; IF (RESTRT AND C<0,2>RSAPPL EQ C<0,2>PACKW[2]) OR (NOT JOBDI AND NOT RESTRT) THEN BEGIN FILL55 (SCANK); JBNAME = SCANK; JBL1[J3] = SCANK; # JOB NAME # JBL2[J3] = SCANV; # ROUTE AND PRODUCT NAME # IF C<0,2>SCANV EQ "NI" THEN INV$INCR = TRUE; IF C<0,2>SCANV EQ "NI" THEN NET$START = TRUE; IF C<0,2>PACKW[2] EQ C<0,2>PACKW[3] # SUBSYSTEM # THEN BEGIN # PARAM IS SUBSYSTEM ID # JBL3[J3] = PACKW[3]; PAKWPTR = 4; END ELSE PAKWPTR = 3; IF JOBDI THEN PAKWPTR = PAKWPTR+1; JOBOT = 0; # DEFAULT TO SY # JOBSC = 0; # DEFAULT TO DEFAULT # IF PAKWPTR LS UPCOUNT # CHECK OT # THEN BEGIN IF C<0,2>PACKW[PAKWPTR] EQ "SY" THEN JOBOT = 1; ELSE IF C<0,2>PACKW[PAKWPTR] EQ "BC" THEN JOBOT = 2; IF JOBOT EQ 0 # INVALID OT # THEN ABORTRUN (102); JOBOT = JOBOT-1; PAKWPTR = PAKWPTR+1; END IF PAKWPTR LS UPCOUNT # CHECK SC # THEN BEGIN IF C<0,2>PACKW[PAKWPTR] EQ "SY" THEN JOBSC = 1; ELSE IF C<0,2>PACKW[PAKWPTR] EQ "BC" THEN JOBSC = 2; ELSE IF C<0,2>PACKW[PAKWPTR] EQ "NS" THEN JOBSC = 3; IF JOBSC EQ 0 # INVALID SC # THEN ABORTRUN (103); IF JOBOT EQ 1 # OT EQ BC # AND JOBSC NQ 2 # SC NQ BC # THEN ABORTRUN (104); PAKWPTR = PAKWPTR+1; END JBL3OT[J3] = JOBOT; JBL3SC[J3] = JOBSC; IF PAKWPTR LS UPCOUNT # CHECK FOR EXTRA PARAMS # THEN BEGIN CLR$OPMSG; OPMSG[0] = "WARNING - UNRECOGNIZED EXTRA PARAMETER(S)"; OPMSGZB[7] = 0; SHOTERM (LOC (OPMSG[0]),8,FALSE); SENDMSG; CLR$OPMSG; FOR K = 0 STEP 1 WHILE CPACK80 NQ C<0,1>PACKEND DO COPMSG[0] = CPACK80; OPMSGZB[7] = 0; SHOTERM (LOC (OPMSG[0]),8,TRUE); SENDMSG; END J3 = J3 +1; JBL1[J3] = SPACES; JBL2[J3] = SPACES; JBL3[J3] = SPACES; IF RESTRT THEN APFOUND = TRUE; END END ELSE IF C<0,5>PACKW[0] EQ "PARAM" THEN #PARAM RECORD# BEGIN UPIX = UPIX +1; IF UPIX GQ 40 THEN ABORTRUN(3); UPARAM[UPIX] = CCLE[J2]; FOR K = 1 STEP 2 WHILE C<0,1>PACKW[K] NQ 0 DO BEGIN INDXR = INDXR +1; IF INDXR GQ 200 THEN ABORTRUN(4); REPKEY[INDXR] = PACKW[K]; REPVAL[INDXR] = PACKW[K+1]; REPSIZ[INDXR] = 1; REPSIZ[INDXR+1] = 0; END END END END IF RESTRT AND NOT APFOUND AND CTLJOB THEN BEGIN # APPL JOB RECORD NOT FOUND # C<0,3>JBNAME = "JOB"; # PUT THE RESTART RECORD NAME INTO# C<3,7>JBNAME = RSAPPL; # JBNAME SO THAT JNOTF CAN USE IT # JNOTF; RETURN; END IF RESTRT AND APFOUND AND CTLJOB THEN # APPL JOB RECORD FOUND IN PARAM RECORD # BEGIN # CHECK IF JOB RECORD EXISTS # FINDJRC; APFOUND = FALSE; IF NOT JOBFOUND THEN BEGIN JNOTF; RETURN; END END CONTROL EJECT; IF RUNJOB THEN BEGIN EDITX = ROUTNAM; #ROUTE AND PRODUCT NAME# LIN4SCAN = NCOM80[0]; FOR J2 = 0 STEP 1 UNTIL 178 DO BEGIN #SUBSTITUTE JOB ID IN KEYWORDS# IF CLIN4SCAN EQ "ZZ" THEN CLIN4SCAN = C<0,2>EDITX; END FOR J2 = 0 STEP 1 UNTIL 178 DO BEGIN #SUBSTITUTE NETINV IN FILE NAMES# IF CLIN4SCAN EQ C<0,3>NETINVN[0] THEN CLIN4SCAN = C<4,3>NETINVN[0]; END C<0,80>PACK80 = C<0,80>LIN4SCAN; C<0,100>PACK160 = C<80,100>LIN4SCAN; SETUPC2; IF XSFW(MSTRUN[0]) NQ SPACES THEN PACKW[4] = MSTRUN[0]; PACKW[6] = MSTRPW[0]; PACKW[8] = MSTROIN[0]; PACKW[8] = STRIPSP(PACKW[8]); N2 = 1; FOR K = 1 STEP 2 WHILE C<0,1>PACKW[K] NQ 0 DO BEGIN IF (INDXR+N2) GQ 200 THEN ABORTRUN(5); REPKEY[INDXR+N2] = PACKW[K]; REPVAL[INDXR+N2] = PACKW[K+1]; REPSIZ[INDXR+N2] = 1; REPSIZ[INDXR+N2+1] = 0; N2 = N2 + 1; END SCAN2$CCLS; END RDY$2$ROUT = TRUE; IOFLG = OPTLOAD; IF INDXC LQ 1 THEN # RECORD NOT FOUND # BEGIN RDY$2$ROUT = FALSE; CLR$OPMSG; OPMSG[0] = " RECORD NOT FOUND - "; OPMSG[2] = JOBNAME; OPMSGZB[3] = 0; SENDMSG; JOBINDX = 0; OPTION = OPTDISP; # SET FOR NEXT SELECTION # TBLPTR = DISPOPT; NEED$OPRES = TRUE; END END #LOAD$JOB # CONTROL EJECT; # * * PROC SAVE$JOB * * CALLED FROM OPTIONLOOP * * THIS ROUTINE LOOPS THROUGH THE CCL BUFFER, WRITING EACH LINE * TO THE ROUTE FILE. * * END OF RECORDS MAY BE WRITTEN AND ARE INDICATED IN THE SOURCE * FILE BY AN EQUAL SIGN (=) IN THE FIRST CHARACTER POSITION * OF THE RECORD. * * CALLS PUTRTO, PUTRTL, PUTRTR, PUTRTC * # PROC SAVE$JOB; BEGIN IF IOFLG EQ 0 THEN BEGIN PUTRTO; END FOR INDX1 = 0 STEP 1 UNTIL INDXC DO BEGIN IOFWA = LOC(CCLE[INDX1]); IOCNT = 8; IF CCL04[INDX1] NQ ".EOR" THEN BEGIN PUTRTL; END ELSE BEGIN IF CCL04[INDX1] EQ ".EOR" THEN BEGIN PUTRTR; END END END PUTRTR; IOFLG = OPTSAVE; PUTRTC; END # SAVE$JOB # CONTROL EJECT; # * * PROC SELJOB$MODFY * * CALLED FROM OPTIONLOOP * * IF THE MODIFY OPTION HAS BEEN SELECTED BY THE OPERATOR, WE DISPLAY * THE CCL RECORDS MOST LIKELY TO BE MODIFIED AND ALLOW THE OPERATOR * TO ENTER ONE OR MORE CFO COMMANDS OF THE KEY=VAL VARIETY. AS EACH * OF THESE COMMANDS ARE ENTERED, WE SCAN THE CCL BUFFER AND * PERFORM THE REPLACEMENT DISCUSSED ELSEWHERE (SEE SCAN$CCLS). * * IF THE COMMAND (CFO.GO.) IS ENTERED, THE JOB IS COPIED TO THE ROUTE * FILE AND SENT OFF TO THE INPUT QUEUE WITHOUT FURTHER OPERATOR * INTERVENTION. OTHERWISE, A SINGLE CFO COMMAND WITH NO DATA (CFO. ) * WILL TERMINATE THIS PROCESSING AND RETURN THE OPERATOR TO THE * OPTION SELECTION DISPLAY. * * CALLS DISPLAY$L, READ$CFO, SCAN$CCLS, RLOD$DISP, SHOTERM * # PROC SELJOB$MODFY; BEGIN ITEM MORE$2$DO B; DISPLAY$L; RLOD$DISP; FOR CSTAT = 1 WHILE CSTAT NQ 0 DO BEGIN MORE$2$DO = TRUE; CSTAT = 4; READ$CFO; # -- CONSOLE INPUT -- # IF CMESS[0] EQ "END. " THEN CSTAT = 0; IF CMESS[0] EQ "GO. " THEN BEGIN RDY$4$ROUT = TRUE; RUNJOB = TRUE; CSTAT = 0; END IF CSTAT EQ 0 THEN MORE$2$DO = FALSE; IF MORE$2$DO THEN SCAN$CCLS; END #PROCESS CFO LINES (CSTAT NQ 0)# RLOD$DISP; DISPLAY$L; RDY$2$ROUT = TRUE; RUNJOB = TRUE; DISEND = FALSE; OPTION = OPTDISP; INDX1 = 0; INDX3 = 0; SHOTERM (LOC(UPD8M0), 3, TRUE); END #SELJOB$MODFY# CONTROL EJECT; # * * PROC OPTIONLOOP * * CALLED FROM NAMIN * * THE CURRENT DEFAULT PARAMETERS ARE DISPLAYED TO THE OPERATOR * AFTER WHICH THE CURRENT OPTION IS PROCESSED VIA CALLS TO THE * APPROPRIATE PROCESSING ROUTINE. OPTIONS ALLOWED ARE DISPLAY * OF OPTIONS, SELECTION OF PARAMETER OR JOB RECORD, MODIFICATION * OF JOB RECORD, SAVING OF JOB RECORD, ROUTING OF JOB TO INPUT * QUEUE AND TERMINATION OF RUN. * * CALLS DS$DEFAULT, LOAD$JOB, SAVE$JOB, SHOTERM, SELJOB$LOD, * SELJOB$SAVE, SELJOB$ROUTE, SELJOB$MODFY * # PROC OPTIONLOOP; BEGIN INDX2 = 0; DISEND = FALSE; IOFLG = 0; IF (NOT AUTO$GO) THEN DS$DEFAULT; P = TADR[TBLPTR]; IF (OPTION EQ OPTLOAD) AND (JOBINDX NQ 0) THEN BEGIN LOAD$JOB; END IF (OPTION EQ OPTSAVE) AND RUNJOB THEN BEGIN SAVE$JOB; END IOFLG = 0; CONTROL EJECT; # MAIN OPTION LOOP # IF OPTION EQ OPTLOAD THEN BEGIN SELJOB$LOD; END ELSE IF OPTION EQ OPTSAVE THEN BEGIN SELJOB$SAVE; END ELSE IF OPTION EQ OPTSBMT THEN BEGIN SELJOB$ROUTE; END ELSE IF OPTION EQ OPTMOD THEN BEGIN SELJOB$MODFY; END ELSE BEGIN TBLPTR = DISPOPT; OPTION = OPTDISP; NEED$OPRES = TRUE; END END #OPTIONLOOP# CONTROL EJECT; # * * NAMI (MAIN PROCESS) * * CALLED FROM SYSTEM LOADER * * THE MAIN PROCESSING LOOP WHEREIN WE INITIALIZE NAMI AND * THEN LOOP BETWEEN GETTING THE NEXT OPERATOR COMMAND (WHICH * CAN BE AUTOMATIC, NOT REQUIRING ACTUAL OPERATOR ACTION) * AND PROCESSING THAT COMMAND. * * UPON RECEIVING THE TERMINATION COMMAND, THE ROUTE-FILE LIST * IS CHECKED AND FILES ROUTED. FOLLOWING CLEAN-UP PROCESSING, * THE JOB IS TERMINATED. * * CALLS SETUP$NAMI, OPTION$LOOP, GET$NXT$OP, OFLUSH, UPD8MFN, * CLO$OP$MSG, ROUT$FILES, SENDMSG * # OPMSG[0] = JCAOPMSG[0]; #NAMI CALL STATEMENT # CLEAR$PW; #CLEAR PASSWORD ON CALL STMT # SENDMSG; #WRITE CALL STATEMENT TO DAYFILE# CLR$OPMSG; OPMSG[0] = IDVERSN; SENDMSG; SETUP$NAMI; FOR OPTION = OPTION WHILE OPTION NQ OPTTERM DO BEGIN #MAIN OPTION LOOP# OPTIONLOOP; IF RDY$2$ROUT THEN BEGIN TBLPTR = DISPCCB; OPTION = OPTSAVE; NEED$OPRES = FALSE; RDY$2$ROUT = FALSE; END ELSE IF RDY$4$ROUT THEN BEGIN TBLPTR = DISPZRO; OPTION = OPTSBMT; RDY$4$ROUT = FALSE; NEED$OPRES = FALSE; END IF NEED$OPRES THEN BEGIN GET$NXT$OP; END END #MAIN OPTION LOOP# CONTROL EJECT; ROUT$FILES; OFLUSH; UPD8MFN; CLR$OPMSG; OPMSG[0] = " END R7 NAMI"; OPMSGZB[3] = 0; SENDMSG; SIERRA; NR2 = SIECPUS * 1000.0; NR2 = NR2 + SIECPUMS; NR2 = NR2 - NR1; J2 = NR2; EDITX = XCFD(J2); OPMSG[0] = " CPU MS REQD "; OPMSG1[2] = EDITX; OPMSGZB[3] = 0; SENDMSG; SHOTERM (LOC(OPMSG[0]), 3, TRUE); OFLUSH; FINSHIO; IF START$SUBS AND NOT RESTRT THEN BEGIN ROUTYPE = 0; IF TESTING THEN ROUTYPE = 4095; ROUTNAM = RTFN[INDXC]; ROUTCOD = ROUTIQ + ROUTNIP ; ROUTEM; END END #NAMI# TERM *CWEOR,0