User Tools

Site Tools


cdc:nos2.source:nam5871:nami

Table of Contents

NAMI

Table Of Contents

  • [00002] PRGM NAMI
  • [00101] FUNC KEYLINE
  • [00102] PROC CLEAR$PW
  • [00103] PROC READ$CFO
  • [00104] PROC SHOTERM
  • [00105] PROC CLR$OPMSG
  • [00106] PROC WEEKDAY
  • [00107] PROC INITCPA
  • [00108] PROC DS$DEFAULT
  • [00109] PROC SETUP$NAMI
  • [00110] PROC DFL$RCDS
  • [00111] PROC GET$NXT$OP
  • [00112] PROC ROUT$FILES
  • [00113] PROC FILL55
  • [00114] PROC PRELOAD
  • [00115] PROC INTRACT
  • [00116] PROC EXTRACT
  • [00117] PROC FIND$JOB
  • [00118] PROC CLRTABLE
  • [00119] PROC NEWBASE
  • [00120] PROC DSPLAY$LIN
  • [00121] PROC SELJOB$LOD
  • [00122] PROC SELJOB$SAVE
  • [00123] PROC SELJOB$ROUTE
  • [00124] PROC RLOD$DISP
  • [00125] PROC GNXT$CCL
  • [00126] PROC SCAN$CCLS
  • [00127] PROC LOAD$JOB
  • [00128] PROC SAVE$JOB
  • [00129] PROC SELJOB$MODFY
  • [00130] PROC OPTIONLOOP
  • [00131] PROC NAMIN (MAIN PROCESS)
  • [00945] PROC ABORTRUN (ABTCD)
  • [01007] FUNC KEYLINE B
  • [01034] FUNC DCODE (CHARS) I
  • [01065] PROC CALC$OIN (CHARS,SUBTR)
  • [01097] PROC CLEAR$PW
  • [01172] PROC READ$CFO
  • [01236] PROC SHOTERM (FWA, COUNT, FLUSH)
  • [01266] PROC CLR$OPMSG
  • [01288] PROC WEEKDAY
  • [01329] PROC INITCPA
  • [01383] PROC DS$DEFAULT
  • [01450] PROC CRACK$CALL
  • [01472] PROC CC$ERROR
  • [01486] PROC CC$UPD8
  • [01627] PROC SETUP$NAMI
  • [01721] PROC DFL$RCDS
  • [01766] PROC CHECK$OPTION (OPVALUE)
  • [01825] PROC GET$NXT$OP
  • [01877] PROC ROUT$FILES
  • [01933] PROC FILL55 (FILET)
  • [01960] PROC PRELOAD
  • [02050] PROC INTRACT (NDX1, NXT)
  • [02087] PROC EXTRACT (NDX1, CNT, NXT)
  • [02134] PROC FIND$JOB
  • [02195] PROC CLRTABLE
  • [02236] PROC NEWBASE
  • [02408] PROC DSPLAY$LIN
  • [02446] PROC DISPLAY$L
  • [02515] PROC SELJOB$LOD
  • [02628] PROC SELJOB$SAVE
  • [02658] PROC SELJOB$ROUTE
  • [02705] PROC RLOD$DISP
  • [02738] PROC SCAN$CCLS
  • [02776] PROC REPACK
  • [02812] PROC SCAN2$CCLS
  • [02841] PROC FINDJRC
  • [02868] PROC JNOTF
  • [02909] PROC LOAD$JOB
  • [03168] PROC SAVE$JOB
  • [03224] PROC SELJOB$MODFY
  • [03281] PROC OPTIONLOOP

Source Code

NAMI.txt
  1. *DECK NAMI
  2. PRGM NAMI;
  3.  
  4.  
  5.  
  6. #
  7.  
  8.  
  9.   NAMI GENERAL DESCRIPTION
  10.  
  11.   NAMI IS THE NETWORK (NAM) INITIATOR PROGRAM. THE OBJECTIVE
  12.   OF NAMI IS TO ROUTE A NUMBER OF JOBS, THE NETWORK JOBS, TO
  13.   THE INPUT QUEUE, FROM WHENCE THEY ARE INITIATED. AS PART OF
  14.   THIS EFFORT, CERTAIN NETWORK PARAMETERS (EG., INVOCATION
  15.   NUMBER) ARE UPDATED AND GENERAL PARAMETER SUBSTITUTIONS MAY
  16.   BE PERFORMED ON THE JOB CONTROL STATEMENTS PRIOR TO THE JOBS
  17.   BEING SUBMITTED TO THE INPUT QUEUE.
  18.  
  19.   THE JOB CONTROL STATEMENT SKELETONS ARE PREPARED AND MAINTAINED
  20.   ON A MASTER FILE. THE MASTER FILE NAME AND USER NUMBER ARE
  21.   SELECTABLE/CHANGEABLE BY THE USER (MFN AND UN PARAMETERS),
  22.   ASSUMING THE USER HAS PERMITTED THE MASTER FILE TO SYSTEMX. THE
  23.   MASTER FILE CONTAINS BOTH JOB SKELETONS (WHICH IN THEIR
  24.   UPDATED FORM ARE SELECTABLY SENT TO THE INPUT QUEUE) AND PARAM-
  25.   ETER RECORDS (WHICH CONTAIN THE KEYWORD-VALUE SUBSTITUTION
  26.   PAIRS FOR UPDATING THE JOB SKELETONS). THE PARAMETER
  27.   RECORDS ALSO CONTAIN THE NAMES OF THE JOB SKELETONS TO BE USED
  28.   DURING PROCESSING. IN THIS WAY, ONE SET OF JOB SKELETONS MAY
  29.   BE USED IN VARIOUS COMBINATIONS BY DIFFERENT PARAMETER RECORDS
  30.   TO INITIATE, RESTART OR PARTIALLY RESTART THE NETWORK.
  31.  
  32.   THE OPERATION OF NAMI IS LOGICALLY STRAIGHT-FORWARD. FOLLOWING
  33.   OPERATOR INITIATION OF NAMI, ANY ENTERED PARAMETERS ARE
  34.   PROCESSED (THEY MAY AFFECT MASTER FILE SELECTION) AND THE
  35.   MASTER FILE IS ACCESSED. THE MASTER FILE IS READ AND A TABLE
  36.   OF PARAMETER RECORD NAMES AND JOB RECORD NAMES IS BUILT.
  37.   NEXT, THE SELECTED PARAMETER RECORD IS READ. TWO LISTS
  38.   ARE CONTSTRUCTED FROM THE PARAMETER RECORD-- A LIST OF JOBS
  39.   TO BE LOADED AND A KEYWORD-VALUES REPLACEMENT PAIR LIST
  40.   FOR UPDATING THE SELECTED JOB RECORDS.
  41.  
  42.   THE MASTER FILE IS THEN READ (AGAIN) AND THE SELECTED JOB
  43.   RECORDS ARE READ THE THE REQUIRED KEYWORD-VALUE SUBSTITUTIONS
  44.   ARE MADE. A LOCAL FILE VERSION OF THE JOB RECORD IS CREATED.
  45.   WHEN ALL OF THE JOBS HAVE BEEN CREATED, THEY ARE ROUTED TO
  46.   THE INPUT QUEUE, ONE RIGHT AFTER THE OTHER. FINALLY, IF
  47.   NIP IS ONE OF THE JOBS SELECTED, CONTROL IS PASSED DIRECTLY
  48.   TO THE NIP CONTROL RECORD, OTHERWISE, NAMI IS TERMINATED.
  49.  
  50.   NAMI IS PRIMARILY INTENDED FOR USE AT THE CYBER CONSOLE.
  51.   HOWEVER, NAMI MAY BE EXERCISED INTERACTIVELY BY SPECIFYING
  52.   =TEST= AS ONE OF THE PARAMETERS ON THE CALL STATEMENT. FOR
  53.   EXAMPLE---
  54.   NAMI,TEST,RN=RESTRT,MFN=MYMSTR,UN=BAR1234.
  55.   RUNNING NAMI REQUIRES SYSTEM ORIGIN PRIVILEGES
  56.   (*SYOT* OR *CSOJ* VALIDATION WITH *DEBUG*)
  57.  
  58.  
  59. #
  60. CONTROL EJECT;
  61. #
  62.   ILLEGAL KEYWORDS AND ERRONEOUSLY UNEQUIVALENCED KEYWORDS
  63.   ARE DIAGNOSED. AN ERROR MESSAGE IS WRITTEN TO THE DAYFILE
  64.   AND THE *GO* PARAMETER, IF SPECIFIED, IS IGNORED. NAMI
  65.   WILL WAIT FOR ANOTHER CFO COMMAND.
  66.  
  67.   IF THE NUMBER OF KEYWORDS IS CHANGED, THE VALUE OF
  68.   *NUMKWDS* MUST BE UPDATED AS WELL AS THE ARRAY *KWARRY*,
  69.   THE SWITCH *KEYWORD* AND ITS USE IN PROCS CRACK$CALL
  70.   AND NEWBASE, AND THIS LIST.
  71.  
  72.   LEGAL KEYWORDS ARE
  73.  
  74.   GO
  75.   MFN = MASTER FILE NAME
  76.   OIN = OLD INVOCATION NUMBER
  77.   OPTION = SELECTED OPTION
  78.   PW = PASSWORD
  79.   RN = RECORD NAME
  80.   RS = RECORD NAME TO RESTART
  81.   TEST
  82.   STOP
  83.   TERM
  84.   UN = USER NUMBER
  85. #
  86. CONTROL EJECT;
  87. #
  88.   NAMI MAIN PROCESSOR
  89.  
  90.  
  91.   P R O C E D U R E C O N T E N T S
  92.   ------------------------------------
  93.  
  94.  
  95.   ITEM DECLARATIONS
  96.   LINK DECLARATIONS
  97.   ARRAY DECLARATIONS
  98.   COMMON DECLARATIONS
  99.   COMMON DECLARATIONS
  100.   MISC DECLARATIONS
  101.   FUNC KEYLINE
  102.   PROC CLEAR$PW
  103.   PROC READ$CFO
  104.   PROC SHOTERM
  105.   PROC CLR$OPMSG
  106.   PROC WEEKDAY
  107.   PROC INITCPA
  108.   PROC DS$DEFAULT
  109.   PROC SETUP$NAMI
  110.   PROC DFL$RCDS
  111.   PROC GET$NXT$OP
  112.   PROC ROUT$FILES
  113.   PROC FILL55
  114.   PROC PRELOAD
  115.   PROC INTRACT
  116.   PROC EXTRACT
  117.   PROC FIND$JOB
  118.   PROC CLRTABLE
  119.   PROC NEWBASE
  120.   PROC DSPLAY$LIN
  121.   PROC SELJOB$LOD
  122.   PROC SELJOB$SAVE
  123.   PROC SELJOB$ROUTE
  124.   PROC RLOD$DISP
  125.   PROC GNXT$CCL
  126.   PROC SCAN$CCLS
  127.   PROC LOAD$JOB
  128.   PROC SAVE$JOB
  129.   PROC SELJOB$MODFY
  130.   PROC OPTIONLOOP
  131.   PROC NAMIN (MAIN PROCESS)
  132.  
  133.  
  134.  
  135.   NAMI COPYRIGHT CONTROL DATA SYSTEMS INC. 1994.
  136.  
  137.  
  138. #
  139.  
  140. CONTROL EJECT;
  141.  
  142. #ITEM DECLARATIONS #
  143.  
  144. BEGIN
  145.  
  146.  
  147. ITEM STATS U; # STATUS USED IN READ MACROS #
  148. ITEM I I;
  149. ITEM RECORDTYPE C(10);
  150. ITEM INDX1 I=0;
  151. ITEM INDX2 I=0;
  152. ITEM INDX3 I=0;
  153. ITEM INDXC I=0;
  154. ITEM INDXR I=-1;
  155. ITEM UPIX I=-1;
  156. ITEM MODFYNDX I=0;
  157. ITEM WORDCNT I=3;
  158. ITEM TBLPTR I=0;
  159. ITEM SKPLNS I=0;
  160. ITEM JOBINDX I=0;
  161. ITEM CTLRCDS I=0;
  162. ITEM RUNRCDS I=0;
  163. ITEM NXT2LOD I=0;
  164. ITEM ABTCODE I=0;
  165. ITEM K I=0;
  166. ITEM J1 I=0, J2 I=0, J3 I=0;
  167. ITEM N I=0, N1 I=0, N2 I=0;
  168. ITEM NR1 R=0, NR2 R=0;
  169.  
  170. ITEM SPACES C(10) = " ";
  171. ITEM EDITX C(10);
  172. ITEM SCANK C(10);
  173. ITEM SCANV C(10);
  174. ITEM CALL$OIN C(10);
  175. ITEM JOBNAME C(10) = " ";
  176. ITEM SUBSYSNAM C(10) = " ";
  177. ITEM JOBOT U;
  178. ITEM JOBSC U;
  179. ITEM PAKWPTR U;
  180. ITEM LIN4SCAN C(180);
  181.  
  182. ITEM DISEND B=TRUE;
  183. ITEM FIRST B=TRUE;
  184. ITEM RT$IMMED B=FALSE;
  185. ITEM CTLJOB B=FALSE;
  186. ITEM RUNJOB B=FALSE;
  187. ITEM NEED$OPRES B=TRUE;
  188. ITEM RDY$2$ROUT B=FALSE;
  189. ITEM RDY$4$ROUT B=FALSE;
  190. ITEM DSPLYMODE B=TRUE;
  191. ITEM TESTING B=FALSE;
  192. ITEM AUTO$GO B=FALSE;
  193. ITEM START$SUBS B=FALSE;
  194. ITEM UPCFLAG B=FALSE;
  195. ITEM INV$INCR B=FALSE;
  196. ITEM NET$START B=FALSE;
  197. ITEM DISDFLT B=FALSE;
  198. ITEM RNCHANGED B=FALSE; # TRUE IF NEW RN IS SPECIFIED #
  199. ITEM RNKEYWORD C(10); # TEMPORARY FOR RN KEYWORD #
  200. ITEM RNVALUE C(10); # NEW RN VALUE WHEN SPECIFIED #
  201. ITEM LASTENTRY I=0; # LAST ENTRY OF DIRECTORY TABLE #
  202. ITEM FOUND B; # TEMPORARY BOOLEAN #
  203.  
  204. CONTROL EJECT;
  205. #LINK DECLARATIONS #
  206. XREF PROC READSKP;
  207. XREF PROC READH;
  208. XREF PROC RECALL;
  209. XREF PROC ABTRUN;
  210. XREF PROC CFOWAIT;
  211. XREF PROC CFOBCLR;
  212. XREF PROC CFOBSET;
  213. XREF PROC CHEKORG;
  214. XREF PROC FINSHIO;
  215. XREF PROC GETLINE;
  216. XREF PROC GNETCCL;
  217. XREF PROC NEWMAST;
  218. XREF PROC OFLUSH;
  219. XREF PROC PRLDNIN;
  220. XREF PROC PUTRTO;
  221. XREF PROC PUTRTR;
  222. XREF PROC PUTRTC;
  223. XREF PROC PUTRTL;
  224. XREF PROC PUTLINE;
  225. XREF PROC PUTTERM;
  226. XREF PROC PUTTRMX;
  227. XREF PROC ROUTEM;
  228. XREF PROC SENDMSG;
  229. XREF PROC SETNUN;
  230. XREF PROC SETUPC;
  231. XREF PROC SETUPC2;
  232. XREF PROC SIERRA;
  233. XREF PROC STARTIO;
  234. XREF PROC TERMRD;
  235. XREF PROC UPD8NIN;
  236. XREF PROC UPD8MFN;
  237.  
  238. XREF FUNC XCDD C(10);
  239. XREF FUNC XCOD C(10);
  240. XREF FUNC XSFW C(10);
  241. XREF FUNC XCFD C(10);
  242. XREF FUNC STRIPSP C(10);
  243.  
  244.  
  245.  
  246.  
  247. COMMON IDINFO;
  248. BEGIN
  249. ITEM IDVERSN C(40); # NAMI DATE/TIME/VERSION STAMP #
  250. ITEM COPYRIGHT C(50); # NAMI COPYRIGHT #
  251. END
  252. CONTROL EJECT;
  253. #
  254.  *
  255.  * NAMI
  256.  *
  257.  * CALLED FROM,LOADER
  258.  *
  259.  * NAMI ENTRY POINT FOR PRIMARY PROCESS.
  260.  *
  261.  *
  262.  * XREF PROC CFOWAIT
  263.  *
  264.  * CALLED FROM READ$CFO, ROUT$FILES
  265.  *
  266.  * WAIT FOR RA+0 CFO FLAG BIT TO BE CLEARED. THIS IS
  267.  * IS CALLED AFTER A MESSAGE HAS BEEN DISPLAYED TO THE
  268.  * OPERATOR TO ENTER A CFO TYPE MESSAGE AND THE BIT HAS
  269.  * BEEN SET.
  270.  *
  271.  *
  272.  * XREF PROC CFOBCLR
  273.  *
  274.  * CALLED FROM *NOREF
  275.  *
  276.  * THIS IS USED WHEN WE ARE SIMULATING CONSOLE INPUT. THE
  277.  * ROUTINE IS CALLED TO CLEAR THE CFO FLAG BIT.
  278.  *
  279.  *
  280.  * XREF PROC CFOBSET
  281.  *
  282.  * CALLED FROM READ$CFO, ROUT$FILES
  283.  *
  284.  * THIS ROUTINE USED TO SET THE CFO FLAG BIT AFTER ASKING
  285.  * THE OPERATOR TO ENTER A CFO MESSAGE. THE OPERATING
  286.  * SYSTEM WILL CLEAR THE BIT WHEN THE CFO MESSAGE HAS BEEN
  287.  * ENTERED AND POSTED IN THE JOB CONTROL AREA.
  288.  *
  289.  *
  290.  * XREF PROC CHEKORG
  291.  *
  292.  * CALLED FROM NAMI
  293.  *
  294.  * ABORT IF NOT SYOT OR CSOJ IN DEBUG.
  295.  *
  296.  *
  297.  * XREF PROC FINSHIO
  298.  *
  299.  * CALLED FROM *NOREF
  300.  *
  301.  * CLOSE CCL INPUT FILE (LFN=INFIL), TRACE FILE
  302.  * (LFN=OUTFIL) AND OUTPUT FILE. CALLED AT END
  303.  * OF JOB.
  304.  *
  305. #
  306. CONTROL EJECT;
  307. #
  308.  *
  309.  * XREF PROC GETLINE
  310.  *
  311.  * CALLED FROM FIND$JOB, LOAD$JOB
  312.  *
  313.  * READ ONE LINE OF DATA FROM THE NETWORK CCL FILE (LFN=
  314.  * INFIL). THE DATA IS RETURNED BASED UPON THE SETTING
  315.  * OF THE VARIABLE IOFWA.
  316.  *
  317.  *
  318.  * XREF PROC GNETCCL
  319.  *
  320.  * CALLED FROM PRELOAD, FIND$JOB
  321.  *
  322.  * GET AND OPEN THE NETWORK CCL FILE (LFN=INFIL). THE
  323.  * FILE NAME AND USER NUMBER IS PASSED IN COMMON BLOCK
  324.  * NETCTRL.
  325.  *
  326.  *
  327.  * XREF PROC NEWMAST
  328.  *
  329.  * CALLED FROM NEWBASE
  330.  *
  331.  * INSTALL THE DEFAULT PARAMETERS INTO THE NEW NETWORK
  332.  * (MASTER) CCL FILE.
  333.  *
  334.  *
  335.  * XREF PROC OFLUSH
  336.  *
  337.  * CALLED FROM NAMIN
  338.  *
  339.  * ISSUE A WRITER TO LFN=OUTFIL. THIS FLUSHES THE TERMINAL
  340.  * OUTPUT BUFFER AND IS USED PRIMARILY FOR TESTING.
  341.  *
  342.  *
  343.  * XREF PROC PRLDNIN
  344.  *
  345.  * CALLED FROM PRELOAD, LOAD$JOB
  346.  *
  347.  * PRELOAD THE NETWORK INVOCATION NUMBER. THIS PLACES THE
  348.  * THE NEW NIN INTO THE DEFAULT FILE NAMES.
  349.  *
  350.  *
  351.  * XREF PROC PUTRTO
  352.  *
  353.  * CALLED FROM SAVE$JOB
  354.  *
  355.  * OPEN THE ROUTE FILE FOR THE JOB TO BE LOADED AND SENT
  356.  * TO THE INPUT QUEUE.
  357.  *
  358. #
  359. CONTROL EJECT;
  360. #
  361.  *
  362.  * XREF PROC PUTRTR
  363.  *
  364.  * CALLED FROM SAVE$JOB
  365.  *
  366.  * WRITE AN END OF RECORD ON THE JOB ROUTE FILE.
  367.  *
  368.  *
  369.  * XREF PROC PUTRTC
  370.  *
  371.  * CALLED FROM SAVE$JOB
  372.  *
  373.  * ISSUE A WRITER ON THE ROUTE FILE AND CLOSE THE
  374.  * FILE.
  375.  * THE FILE IS NOT RETURNED, BUT REMAINS LOCAL AT THIS
  376.  * CONTROL POINT.
  377.  *
  378.  *
  379.  * XREF PROC PUTRTL
  380.  *
  381.  * CALLED FROM SAVE$JOB
  382.  *
  383.  * WRITE A SINGLE LINE TO THE ROUTE FILE. THIS IS A
  384.  * WRITEH COMMAND AND STRIPS OFF TRAILING BLANKS.
  385.  *
  386.  *
  387.  * XREF PROC PUTLINE
  388.  *
  389.  * CALLED FROM READ$CFO
  390.  *
  391.  * WRITE A SINGLE LINE TO THE TRACE FILE. THIS ALSO
  392.  * IS A WRITEH FUNCTION.
  393.  *
  394.  *
  395.  * XREF PROC PUTTERM
  396.  *
  397.  * CALLED FROM SHOTERM
  398.  *
  399.  * WRITE A SINGLE LINE (WRITEH) TO THE OUTPUT FILE.
  400.  *
  401.  *
  402.  * XREF PROC PUTTRMX
  403.  *
  404.  * CALLED FROM SHOTERM
  405.  *
  406.  * ISSUE A WRITER TO THE OUTPUT FILE TO FLUSH THE
  407.  * BUFFER. THIS IS NECESSARY WHEN TESTING AT A TERMINAL
  408.  * TO INSURE THAT THE ENTIRE MESSAGE GETS TO THE OPERATOR.
  409.  *
  410. #
  411. CONTROL EJECT;
  412. #
  413.  *
  414.  * XREF PROC READLN
  415.  *
  416.  * CALLED FROM READ$CFO
  417.  *
  418.  * READ ONE LINE OF INPUT FROM TERMINAL INPUT. THIS IS USED
  419.  * DURING TESTING. SEE PROC READ$CFO.
  420.  *
  421.  *
  422.  * XREF PROC ROUTEM
  423.  *
  424.  * CALLED FROM ROUT$FILES
  425.  *
  426.  * ROUTE THE FILE SPECIFIED IN COMMON AREA ROUTCOM TO THE QUEUE
  427.  * ALSO SPECIFIED IN ROUTCOM. USED PRIMARILY TO ROUTE FILES TO
  428.  * THE INPUT QUEUE.
  429.  *
  430.  *
  431.  * XREF PROC SENDMSG
  432.  *
  433.  * CALLED FROM READ$CFO, SETUP$NAMI, DFL$RCDS, SELJOB$LOD, NAMIN
  434.  *
  435.  * SEND THE MESSAGE IN COMMON AREA MSGCOM TO THE OPERATOR AND
  436.  * DAYFILE (A AND B DISPLAYS).
  437.  *
  438.  *
  439.  * XREF PROC SETNUN
  440.  *
  441.  * CALLED FROM SETUP$NAMI
  442.  *
  443.  * SET NAMI USER NUMBER
  444.  *
  445.  *
  446.  * XREF PROC SIERRA
  447.  *
  448.  * CALLED FROM INITCPA
  449.  *
  450.  * SIERRA IS A GROUP (CLUB) OF SYSTEM REQUESTS USED TO DETERMINE
  451.  * THE ENVIRONMENT (DATE, TIME, CM FL). THE INFORMATION IS
  452.  * RETURNED IN COMMON AREA SIERRAC. SEE THE ERS FOR AN IMPACT
  453.  * STUDY.
  454. #
  455. CONTROL EJECT;
  456. #
  457.  *
  458.  *
  459.  * XREF PROC STARTIO
  460.  *
  461.  * CALLED FROM *NOREF
  462.  *
  463.  * STARTIO GETS THE NETWORK CCL FILE (LFN=INFIL) AND OPENS IT.
  464.  * IT ALSO OPENS THE TRACE AND TERMINAL OUTPUT FILE.
  465.  *
  466.  *
  467.  * XREF PROC UPD8MFN
  468.  *
  469.  * CALLED FROM NEWBASE, SELJOB$LOD, NAMIN
  470.  *
  471.  * THIS ROUTINE UPDATES THE NETWORK MEMORY FILE WITH THE CURRENT
  472.  * NETWORK INVOCATION NUMBER, NETWORK CCL FILE NAME AND DEFAULT
  473.  * (LAST USED) CONTROL RECORD NAME.
  474.  *
  475.  *
  476.  * XREF PROC UPD8NIN
  477.  *
  478.  * CALLED FROM PRELOAD, FIND$JOB
  479.  *
  480.  * THE NETWORK INVOCATION NUMBER IS UPDATED- THIS RESULTS IN THE
  481.  * VARIOUS DEFAULT FILE NAMES AND PARAMETER RECORDS BEGIN UPDATED.
  482.  *
  483.  *
  484.  * XREF FUNC XCDD C(10)
  485.  *
  486.  * CALLED FROM INITCPA, DSPLAY$LIN
  487.  *
  488.  * THIS IS A CONVERSION ROUTINE - INTEGER TO DECIMAL DISPLAY CODE.
  489.  *
  490.  *
  491.  * XREF FUNC XCOD C(10)
  492.  *
  493.  * CALLED FROM INITCPA, DS$DEFAULT, ROUT$FILES
  494.  *
  495.  * THIS IS A CONVERSION ROUTINE - INTEGER TO OCTAL DISPLAY CODE.
  496.  *
  497.  *
  498.  * XREF FUNC XSFW C(10)
  499.  *
  500.  * CALLED FROM DS$DEFAULT, ROUT$FILES, INTRACT, FIND$JOB,
  501.  * LOAD$JOB
  502.  *
  503.  * THIS IS A CONVERSION ROUTINE - SPACE FILL A WORD ENDING IN 00B.
  504.  *
  505. #
  506. CONTROL EJECT;
  507. #ARRAY DECLARATIONS #
  508.  
  509. ARRAY LINE[0:10] S(1);
  510. BEGIN
  511. ITEM LIN6 C(0, 0, 6);
  512. ITEM LINX C(0, 0, 10);
  513. ITEM LIN80 C(0, 0, 80);
  514. ITEM LINX1A C(0, 0, 110);
  515. ITEM LIN4 C(0, 0, 4);
  516. END
  517.  
  518. ARRAY ONELINE[0:0] S(10);
  519. BEGIN
  520. ITEM LIN$4 C(00,00,04);
  521. ITEM LIN$6 C(00,00,06);
  522. ITEM LIN$10 C(00,00,10);
  523. ITEM LIN$100 C(00,00,100);
  524. END
  525.  
  526.  
  527.  
  528. ARRAY ENVIRONS [0:0] S(20);
  529. BEGIN
  530. ITEM ENV1 C(0, 0, 10) = [" "];
  531. ITEM ENV2 C(1, 0, 10) = ["CFO=YES "];
  532. ITEM ENV3 C(2, 0, 10) = ["CMU=YES "];
  533. ITEM ENV4 C(3, 0, 10) = ["C/MEJ=YES "];
  534. ITEM ENV5 C(4, 0, 10) = [" "];
  535. ITEM ENV6 C(5, 0, 10) = ["PPUS=00 "];
  536. ITEM ENV7 C(6, 0, 10) = ["CM=000000B"];
  537. ITEM ENV8 C(7, 0, 10) = [" "];
  538. ITEM ENV9 C(8, 0, 20) = ["CONTROL STATEMENT = "];
  539. ITEM ENV10 C(08, 0, 50);
  540. ITEM ENV11 C(11, 0, 10);
  541. ITEM ENV12 C(12, 0, 10);
  542. ITEM ENV13 C(13, 0, 10) = [" "];
  543. ITEM ENV14 C(14, 0, 10) = ["SUNDAY "];
  544. ITEM ENV15 C(15, 0, 20) = [" MM/DD/YY HH.MM.SS "];
  545. END
  546.  
  547.  
  548. ARRAY DIR$TABLE [0:200] S(1);
  549. BEGIN
  550. ITEM DIR$NAME C(0, 0, 7);
  551. ITEM PRU$ADDR U(0, 42,12); # NUMBER OF PRUS FROM BOI #
  552. ITEM DIR$TYPE U(0, 54, 6);
  553. END
  554.  
  555. DEF ZTYPE #0#;
  556. DEF PTYPE #1#;
  557. DEF JTYPE #3#;
  558. DEF STAT$EOR #O"000023"#;
  559. DEF STAT$EOF #O"740033"#;
  560. DEF STAT$EOI #O"741033"#;
  561.  
  562. ARRAY REPLACE$TBL [0:200] S(3);
  563. BEGIN
  564. ITEM REPKEY C(0, 0, 10);
  565. ITEM REPVAL C(1, 0, 10);
  566. ITEM REPSIZ U(2, 0, 60);
  567. END
  568.  
  569. CONTROL EJECT;
  570. #COMMON DECLARATIONS #
  571. COMMON PASSIT;
  572. BEGIN
  573. ITEM IOFWA I;
  574. ITEM IOCNT I;
  575. ITEM IOCMP I;
  576. ITEM IOLVL I;
  577. ITEM IOFLG I;
  578. END
  579.  
  580. COMMON THEFET;
  581. BEGIN
  582. ARRAY INFIL [0:0] S(15);
  583. BEGIN
  584. ITEM FET$WORD0 U(00,00,60);
  585. ITEM FET$LFN C(00,00,07) =["INFIL "];
  586. ITEM FET$STAT U(00,42,18);
  587. ITEM FET$WORD1 U(01,00,60);
  588. ITEM FET$FIRST U(01,42,18);
  589. ITEM FET$RANDOM U(01,12,01);
  590. ITEM FET$WORD2 U(02,00,60);
  591. ITEM FET$IN U(02,42,18);
  592. ITEM FET$WORD3 U(03,00,60);
  593. ITEM FET$OUT U(03,42,18);
  594. ITEM FET$WORD4 U(04,00,60);
  595. ITEM FET$LIMIT U(04,42,18);
  596. ITEM FET$WORD6 U(06,00,60);
  597. ITEM FET$CRI U(06,00,30); # CURRENT RANDOM INDEX #
  598. ITEM FET$RR U(06,31,29); # RANDOM REQUEST #
  599. END
  600. END
  601.  
  602. COMMON PARAMS;
  603. BEGIN
  604. ITEM CMODE I;
  605. ITEM CSTAT I;
  606. ARRAY CMSG [0:7] S(1);
  607. BEGIN
  608. ITEM CMESS C(0, 0, 10);
  609. ITEM CMSG80 C(0, 0, 80);
  610. END
  611. END
  612.  
  613. COMMON NETCOM;
  614. BEGIN
  615. ARRAY NETCOMA [0:27] S(1);
  616. BEGIN
  617. ITEM NETINVN C(0, 0, 10);
  618. ITEM NETINCR U(1, 0, 60);
  619. ITEM NCOM80 C(2, 0, 180);
  620. ITEM NCOM80A C(17,0, 80);
  621. END
  622. END
  623.  
  624. COMMON UPAR;
  625. BEGIN
  626. ARRAY UPARMS [0:40] S(8);
  627. BEGIN
  628. ITEM UPARAM C(0, 0, 80);
  629. END
  630. END
  631.  
  632. COMMON PACKING;
  633. BEGIN
  634. ITEM PACK80 C(80);
  635. ITEM PACK160 C(100);
  636. ITEM PACKEND C(10);
  637. ARRAY PACK01 [0:79] S(1);
  638. BEGIN
  639. ITEM PACKW C(0, 0, 10);
  640. ITEM PACKZW U(0, 0, 60);
  641. ITEM PACKWE C(0,54, 01);
  642. END
  643. ITEM UPCSTAT U;
  644. ITEM UPCOUNT U;
  645. END
  646. CONTROL EJECT;
  647. #COMMON DECLARATIONS #
  648.  
  649. COMMON ROUTCOM;
  650. BEGIN
  651. ITEM ROUTNAM C(10);
  652. ITEM ROUTCOD I;
  653. ITEM ROUTYPE I;
  654. ITEM RTEOT U;
  655. ITEM RTESC U;
  656. END
  657.  
  658. DEF ROUTIQ #0#;
  659. DEF ROUTOQ #1#;
  660. DEF ROUTSS #O"0400"#;
  661. DEF ROUTNIP #O"1000"#;
  662. DEF ROUTSYOT #O"4000"#;
  663.  
  664. COMMON SIERRAC;
  665. BEGIN
  666. ARRAY SIE [0:0] S(7);
  667. BEGIN
  668. ITEM SIECM U(0, 00, 30);
  669. ITEM SIEDATE C(1, 00, 10);
  670. ITEM SIEJDATE C(2, 00, 10);
  671. ITEM SIEJYR C(2, 30, 02);
  672. ITEM SIEJDAY C(2, 42, 03);
  673. ITEM SIETIME C(3, 00, 10);
  674. ITEM SIECPUS U(4, 24, 24);
  675. ITEM SIECPUMS U(4, 48, 12);
  676. ITEM SIEUSER C(5, 00, 07);
  677. ITEM SIEMID C(6, 00, 10);
  678. END
  679. END
  680.  
  681. COMMON PFEMSG;
  682. BEGIN
  683. ITEM PFERMSG C(40);
  684. END
  685.  
  686. COMMON ROUTABL;
  687. BEGIN
  688. ARRAY RTFT [0:200] S(1);
  689. BEGIN
  690. ITEM RTFN C(0, 00, 8);
  691. ITEM RTFNOT U(0, 48, 3);
  692. ITEM RTFNSC U(0, 51, 3);
  693. ITEM RTFNCD U(0, 54, 6);
  694. END
  695. END
  696.  
  697. COMMON MSGCOM;
  698. BEGIN
  699. ARRAY MSGCOMA [0:8] S(1);
  700. BEGIN
  701. ITEM OPMSG1 C(0, 00, 10);
  702. ITEM OPMSG C(0, 00, 80);
  703. ITEM OPMSGZB U(0, 00, 60);
  704. END
  705. END
  706. CONTROL EJECT;
  707.  
  708.  
  709. COMMON NETCTRL;
  710. BEGIN
  711. ARRAY NETMASTR [0:63] S(1);
  712. BEGIN
  713. ITEM NETMSTR C(00,00,200);
  714. ITEM MSTRMFN C(21,00,07);
  715. ITEM MSTRUN C(23,00,07);
  716. ITEM MSTRPW C(25,00,07);
  717. ITEM MSTRFM C(27,00,07);
  718. ITEM MSTRRN C(29,00,10);
  719. ITEM MSTRUNM C(23,00,07);
  720. ITEM MSTRPWM C(25,00,07);
  721. ITEM MSTRLIN C(31,00,03);
  722. ITEM MSTRUIN C(33,00,03);
  723. ITEM MSTRMEMUN C(35,00,07);
  724. ITEM MSTROIN C(37,00,03);
  725. ITEM MSTRMACHID C(39,00,10);
  726. ITEM MSTRRS C(41,00,07);
  727. END
  728. END
  729.  
  730. COMMON TBLADR;
  731. BEGIN
  732. ARRAY TABLAD [0:6] S(1);
  733. BEGIN
  734. ITEM TADR U(0, 0, 30);
  735. ITEM TLEN U(0, 30, 30);
  736. END
  737. END
  738.  
  739. COMMON TERMCOM;
  740. BEGIN
  741. ITEM TERMRDLN I;
  742. ITEM TERMRDBFR C(240);
  743. ITEM TERMRDB2 C(240);
  744. ITEM TERMRDB3 C(170);
  745. END
  746.  
  747. COMMON RESTART;
  748. BEGIN
  749. ITEM RESTRT B = FALSE; # RESTART APPLICATION FLAG #
  750. ITEM RSAPPL C(7); # APPLICATION TO RESTART #
  751. ITEM JOBDI B; # FLAG - DI SPECIFIED ON JOB STATEMENT #
  752. ITEM APFOUND B; # APPL JOB RECORD FOUND FLAG #
  753. ITEM JOBFOUND B; # JOB FOUND FLAG #
  754. ITEM DONE B; # COMPLETION FLAG #
  755. ITEM JBNAME C(10); # JOB NAME #
  756. END
  757.  
  758. CONTROL EJECT;
  759. #MISC DECLARATIONS #
  760.  
  761. ITEM OPTION I=0;
  762. DEF OPTDISP #1#;
  763. DEF OPTLOAD #2#;
  764. DEF OPTMOD #3#;
  765. DEF OPTSAVE #4#;
  766. DEF OPTSBMT #5#;
  767. DEF OPTTERM #6#;
  768. DEF OPTROUT #7#;
  769.  
  770. DEF DISPOPT #0#;
  771. DEF DISPJBS #1#;
  772. DEF DISPCCB #2#;
  773. DEF DISPZRO #5#;
  774.  
  775. DEF EOR #O"1"#;
  776. DEF EOF #O"3"#;
  777. DEF EOI #O"3"#;
  778.  
  779.  
  780. ARRAY JOBLISTS [0:200] S(3);
  781. BEGIN
  782. ITEM JBL1 C(0, 0, 10); # JOB NAME #
  783. ITEM JBL2 C(1, 0, 10); # ROUTE FILE NAME #
  784. ITEM JBL3 C(2, 0, 9); # SUBSYSTEM NAME #
  785. ITEM JBL3OT U(2,54, 3); # ORIGIN TYPE #
  786. ITEM JBL3SC U(2,57, 3); # SERVICE CLASS #
  787. END
  788.  
  789. # CALL STATEMENT KEYWORDS #
  790.  
  791. DEF NUMKWDS #11#; #NUMBER LEGAL KEYWORDS #
  792.  
  793. ARRAY KWARRY [1:NUMKWDS] S(1); #CORRESPONDS TO SWITCH KEYWORD #
  794. BEGIN
  795. ITEM KWORD C(0,0,10) =
  796. ["GO ",
  797. "MFN ",
  798. "OIN ",
  799. "OPTION ",
  800. "PW ",
  801. "RN ",
  802. "RS ",
  803. "STOP ",
  804. "TERM ",
  805. "TEST ",
  806. "UN "];
  807. END
  808. CONTROL EJECT;
  809.  
  810. BASED
  811. ARRAY MSGTBL [0:99] S(1);
  812. BEGIN
  813. ITEM CHLOW C(0, 48, 2);
  814. ITEM CHX C(0, 0, 10);
  815. ITEM CWC U(0, 0, 6);
  816. ITEM CZZ C(0, 0, 70);
  817. END
  818.  
  819. XREF
  820. ARRAY RAZERO [0:0] S(64);
  821. BEGIN
  822. ITEM JCACFO B(00, 45, 01);
  823. ITEM JCACMU B(53, 00, 01);
  824. ITEM JCACME B(54, 00, 01);
  825. ITEM JCAPPU U(54, 07, 05);
  826. ITEM JCA70 C(56, 00, 30);
  827. ITEM JCAOPMSG C(56, 00, 80);
  828. END
  829.  
  830. ARRAY CCLBUFR [0:300] S(8);
  831. BEGIN
  832. ITEM CCLE C(0, 0, 80);
  833. ITEM CCL01 C(0, 0, 01);
  834. ITEM CCL04 C(0, 0, 04);
  835. END
  836.  
  837. ARRAY DATALNX [0:0] S(9);
  838. BEGIN
  839. ITEM DLX1 C(0, 0, 1) = [" "];
  840. ITEM DLNUM1 C(0, 6, 3);
  841. ITEM DLX2 C(0, 24, 1) = ["."];
  842. ITEM DLNUM2 C(0, 30, 3);
  843. ITEM DLX3 C(0, 48, 2) = ["= "];
  844. ITEM DATALN C(1, 0, 80);
  845. END
  846.  
  847. ARRAY DATALNY [0:0] S(12);
  848. BEGIN
  849. ITEM LNY0 C(0, 0, 20) = [" MODE = 00B"];
  850. ITEM LNY1 C(2, 0, 20) = [" OPTION = 00B"];
  851. ITEM LNY2 C(4, 0, 20) = [" MID = --"];
  852. ITEM LNY3 C(6, 0, 20) = [" CIN = 000D"];
  853. ITEM LNY4 C(8, 0, 20) = [" OIN = 000D "];
  854. ITEM LNY5 C(10,0, 20) = [" UIN = 000D"];
  855. ITEM LNY1A C(1, 42, 2);
  856. ITEM LNY1B C(3, 42, 2);
  857. ITEM LNY1C C(5, 48, 2);
  858. ITEM LNY1D C(7, 36, 3);
  859. ITEM LNY1E C(9, 24, 3);
  860. ITEM LNY1F C(11,36, 3);
  861. ITEM LNY C(0, 30, 55);
  862. ITEM LNYA C(6, 30, 55);
  863. END
  864. CONTROL EJECT;
  865.  
  866. ARRAY DATALNZ [0:0] S(14);
  867. BEGIN
  868. ITEM LNZ0 C(0, 0, 20) = [" RN = LSTPR"];
  869. ITEM LNZ1 C(2, 0, 20) = ["CD MFN = NETCTR"];
  870. ITEM LNZ2 C(4, 0, 20) = ["L UN = BAR12"];
  871. ITEM LNZ3 C(6, 0, 10) = ["34 "];
  872. ITEM LNZ4 C(7, 0, 20) = [" UN = XXXX"];
  873. ITEM LNZ5 C(9, 0, 20) = ["XXX FM = (N/A) "];
  874. ITEM LNZ6 C(11,0, 20) = [" PW = YYYY"];
  875. ITEM LNZ7 C(13,0, 10) = ["YYY "];
  876. ITEM LNZ4A C(8, 36, 7);
  877. ITEM LNZ4B C(10, 18, 7);
  878. ITEM LNZ4C C(12, 36, 7);
  879. ITEM LNZ1A C(1, 30, 7);
  880. ITEM LNZ1B C(3, 24, 7);
  881. ITEM LNZ1C C(5, 30, 7);
  882. ITEM LNZ C(0, 30, 65);
  883. ITEM LNZ2ND C(7, 30, 65);
  884. END
  885.  
  886. ARRAY DAY2DAY [0:6] S(1);
  887. BEGIN
  888. ITEM DAY0 C(0, 0, 10) = ["SUNDAY "];
  889. ITEM DAY1 C(1, 0, 20) = ["MONDAY TUESDAY "];
  890. ITEM DAY3 C(3, 0, 20) = ["WEDNESDAY THURSDAY "];
  891. ITEM DAY5 C(5, 0, 20) = ["FRIDAY SATURDAY "];
  892. END
  893.  
  894. ARRAY DATALNR [0:0] S(5);
  895. BEGIN
  896. ITEM LNR0 C(0, 0, 20) = [" NETWORK IN"];
  897. ITEM LNR2 C(2, 0, 20) = ["VOCATION NUMBER 000 "];
  898. ITEM LNR4 C(4, 0, 10) = [" "];
  899. ITEM LNR2A C(3, 36, 3);
  900. ITEM LNR C(0, 0, 60);
  901. END
  902. CONTROL EJECT;
  903.  
  904. ARRAY DATALNW [0:0] S(3);
  905. BEGIN
  906. ITEM UPD8M0 C(0, 0, 10) = [" "];
  907. ITEM UPD8MSG C(1, 0, 20) = [" UPDATED BUFFER: "];
  908. END
  909.  
  910. ARRAY DATALNV [0:0] S(4);
  911. BEGIN
  912. ITEM RSTM0 C(0, 0, 20) = [" FILNAME RO"];
  913. ITEM RSTM1 C(2, 0, 20) = ["UTED, STAT = 0000B "];
  914. ITEM RSTM2 C(3, 18, 4);
  915. ITEM RSTM3 C(1, 0, 7);
  916. END
  917.  
  918. ARRAY DATALNU [0:0] S(4);
  919. BEGIN
  920. ITEM FSV0 C(0, 0, 20) = [" FILE SAVED"];
  921. ITEM FSV1 C(2, 0, 20) = [" ON ROUTFIL "];
  922. END
  923.  
  924. ARRAY DATALNT [0:0] S(4);
  925. BEGIN
  926. ITEM FLS0 C(0, 0, 20) = [" FILNAME LO"];
  927. ITEM FLS1 C(2, 0, 20) = ["ADED, STAT = 0000B "];
  928. ITEM FLS2 C(1, 0, 7);
  929. END
  930.  
  931. ARRAY DATALNS [0:0] S(4);
  932. BEGIN
  933. ITEM LDF0 C(0, 0, 20) = [" LOADING "];
  934. ITEM LDF1 C(2, 0, 20) = [" "];
  935. ITEM LDF2 C(2, 0, 7);
  936. ITEM LDF C(0, 0, 40);
  937. END
  938. CONTROL EJECT;
  939.  
  940.  
  941. #
  942.  * ABORT ROUTINES
  943. #
  944.  
  945. PROC ABORTRUN (ABTCD);
  946.  
  947. BEGIN
  948.  
  949. ITEM ABTCD I;
  950.  
  951. ABTCODE = ABTCD;
  952.  
  953. CLR$OPMSG;
  954. IF ABTCODE EQ 0 THEN
  955. OPMSG[0] = " NAMI ABORT CODE 0";
  956. IF ABTCODE EQ 1 THEN
  957. OPMSG[0] = " JOB/PARAM RECORD COUNT EXCEEDS 200";
  958. IF ABTCODE EQ 2 THEN
  959. OPMSG[0] = " JOB STATEMENTS IN PARAM RECORD EXCEED 200";
  960. IF ABTCODE EQ 3 THEN
  961. OPMSG[0] = " PARAM STATEMENTS IN PARAM RECORD EXCEED 40";
  962. IF ABTCODE EQ 4 THEN
  963. OPMSG[0] = " KEYWORD/VALUE COUNT IN PARAM RECORD EXCEEDS 200";
  964. IF ABTCODE EQ 5 THEN
  965. OPMSG[0] = " TOTAL KEYWORD/VALUE COUNT EXCEEDS 200";
  966. IF ABTCODE EQ 101 THEN
  967. OPMSG[0] = " INVALID PARAMETER(S) IN JOB STATEMENT";
  968. IF ABTCODE EQ 102 THEN
  969. OPMSG[0] = " OT, IF SPECIFIED, MUST BE SY OR BC";
  970. IF ABTCODE EQ 103 THEN
  971. OPMSG[0] = " SC, IF SPECIFIED, MUST BE SY, NS, OR BC";
  972. IF ABTCODE EQ 104 THEN
  973. OPMSG[0] = " SC, IF SPECIFIED, MUST BE BC IF OT=BC";
  974.  
  975. OPMSGZB[7] = 0;
  976. SHOTERM (LOC(OPMSG[0]), 8, TRUE);
  977. SENDMSG;
  978. IF ABTCODE GQ 100
  979. THEN BEGIN
  980. CLR$OPMSG;
  981. FOR K = 0 STEP 1 WHILE C<K,1>PACK80 NQ C<0,1>PACKEND DO
  982. C<K,1>OPMSG[0] = C<K,1>PACK80;
  983. OPMSGZB[7] = 0;
  984. SHOTERM (LOC (OPMSG[0]),8,TRUE);
  985. SENDMSG;
  986. END
  987. ABTRUN; # ABORT EXIT... NO RETURN#
  988.  
  989. END # ABORTRUN #
  990.  
  991.  
  992. CONTROL EJECT;
  993.  
  994.  
  995. #
  996.  *
  997.  * FUNC KEYLINE
  998.  *
  999.  * CALLED FROM SELJOB$LOD, RLOD$DISP
  1000.  *
  1001.  * THE LINE BUFFER (CONTAINING THE CURRENT OPERATOR ENTERED OR
  1002.  * DEFAULT PARAMETER RECORD) IS SCANNED TO DETERMINE IF THERE
  1003.  * ARE ANY KEY=VAL PAIRS FOR RECORD MODIFICATION. WE ARE JUST
  1004.  * LOOKING FOR AN EQUAL SIGN (=).
  1005.  *
  1006. #
  1007. FUNC KEYLINE B;
  1008.  
  1009. BEGIN
  1010.  
  1011. ITEM NX I;
  1012.  
  1013. KEYLINE = FALSE;
  1014. FOR NX = 0 STEP 1 UNTIL 79 DO
  1015. BEGIN
  1016. IF C<NX,1>LIN80[0] EQ "=" THEN KEYLINE = TRUE;
  1017. IF C<NX,1>LIN80[0] EQ "=" THEN RETURN;
  1018. IF C<NX,1>LIN80[0] EQ " " THEN RETURN;
  1019. END
  1020.  
  1021. END #KEYLINE#
  1022.  
  1023. CONTROL EJECT;
  1024.  
  1025. #
  1026.  * FUNC DCODE
  1027.  *
  1028.  * DCODE CONVERTS A TEN CHARACTER DISPLAY CODED
  1029.  * FIELD TO AN DECIMAL INTEGER. ONLY THE CHARACTERS
  1030.  * FROM 0 THROUGH 9 ARE CONVERTED.
  1031.  *
  1032. #
  1033.  
  1034. FUNC DCODE (CHARS) I;
  1035.  
  1036. BEGIN
  1037.  
  1038. ITEM CHARS C(10);
  1039. ITEM TVAL I;
  1040. ITEM J1 I;
  1041.  
  1042. DCODE = 0;
  1043. TVAL = 0;
  1044.  
  1045. FOR J1 = 0 STEP 1 UNTIL 9 DO
  1046. BEGIN
  1047. IF (C<J1,1>CHARS GQ "0") AND (C<J1,1>CHARS LQ "9")
  1048. THEN BEGIN
  1049. TVAL = TVAL * 10 + (C<J1,1>CHARS - "0");
  1050. END
  1051. END
  1052.  
  1053. DCODE = TVAL;
  1054.  
  1055. END #DCODE#
  1056. CONTROL EJECT;
  1057. #
  1058.  * PROC CALC$OIN (CHARS, SUBTR)
  1059.  *
  1060.  * DECIMAL DISPLAY CODE NUMBER *CHARS* IS EXPANDED TO THREE
  1061.  * DIGITS. IF *SUBTR*, ONE IS SUBTRACTED FROM *CHARS*. THE
  1062.  * NEW NUMBER IS STORED IN MSTROIN.
  1063. #
  1064.  
  1065. PROC CALC$OIN (CHARS,SUBTR);
  1066.  
  1067. BEGIN
  1068.  
  1069. ITEM CHARS C(10);
  1070. ITEM SUBTR B;
  1071.  
  1072. ITEM VAL1 I;
  1073.  
  1074. VAL1 = DCODE (CHARS);
  1075. IF SUBTR THEN VAL1 = VAL1 - 1;
  1076. IF VAL1 LS 0 THEN VAL1 = 999;
  1077. VAL1 = VAL1 + 10000;
  1078. EDITX = XCDD (VAL1);
  1079. C<0,3>MSTROIN[0] = C<7,3>EDITX;
  1080.  
  1081. END #CALC$OIN#
  1082. CONTROL EJECT;
  1083. #
  1084.  * PROC CLEAR$PW
  1085.  *
  1086.  * CALLED FROM READ$CFO, NAMI
  1087.  *
  1088.  * SEARCH BUFFER MSGCOMA FOR THE STRING *PW=*. IF FOUND,
  1089.  * THEN THE PASSWORD IS DELETED.
  1090.  * UP TO 7 CHARACTERS ARE CLEARED, OR UNTIL A NON ALPHA-
  1091.  * NUMERIC CHARACTER IS ENCOUNTERED. THE BUFFER IS
  1092.  * EXPECTED TO BE 8 WORDS LONG OR TERMINATED WITH A
  1093.  * ZERO WORD. ALL OCCURRENCES OF A PASSWORD ARE CLEARED.
  1094.  *
  1095. #
  1096.  
  1097. PROC CLEAR$PW;
  1098.  
  1099. BEGIN
  1100.  
  1101. ITEM CPCHR I; #CURRENT CHAR TO READ #
  1102. ITEM CPPOS I; #CURRENT CHAR POSITION TO WRITE #
  1103. ITEM CPEND I; #LAST CHARACTER IN STMT #
  1104. ITEM CP1 I; #LOOP INDEX #
  1105.  
  1106. CPCHR = 0;
  1107. CPPOS = 0;
  1108.  
  1109. FOR CPEND = 0 WHILE #DETERMINE END OF STATEMENT #
  1110. B<48,12>OPMSGZB[CPEND] NQ 0
  1111. AND CPEND LS 7 DO
  1112. CPEND = CPEND + 1; #WORD WITH ZERO BYTE TERM #
  1113. CPEND = CPEND*10 + 9; #LAST POSSIBLE CHARACTER #
  1114.  
  1115. FOR CPCHR=0 WHILE CPCHR LQ CPEND DO
  1116. BEGIN #STATEMENT LOOP #
  1117. IF C<CPCHR,3>OPMSG[0] EQ "PW=" #KEYWORD FOUND #
  1118. THEN
  1119. BEGIN #IF PW= FOUND#
  1120. C<CPPOS,3>OPMSG[0] = C<CPCHR,3>OPMSG[0]; #WRITE PW= #
  1121. CPPOS = CPPOS + 3; #INCREMENT POINTERS PAST PW= #
  1122. CPCHR = CPCHR + 3;
  1123. FOR CP1=1 STEP 1 UNTIL 7 DO #INCREMENT CPCHR TO AFTER PW #
  1124. BEGIN #PASSWORD LOOP#
  1125. IF C<CPCHR,1>OPMSG[0] GQ "A"
  1126. AND C<CPCHR,1>OPMSG[0] LQ "9"
  1127. THEN
  1128. CPCHR = CPCHR + 1;
  1129. ELSE
  1130. TEST CPCHR; #RESUME MAIN LOOP AT END OF PW #
  1131.  
  1132. END #PASSWORD LOOP#
  1133.  
  1134. END #IF PW= FOUND#
  1135. ELSE
  1136. BEGIN #NOT AT PW= #
  1137. C<CPPOS,1>OPMSG[0] = C<CPCHR,1>OPMSG[0]; #WRITE THIS CHARACTER#
  1138. #TO NEXT POSITION. #
  1139. CPPOS = CPPOS + 1; #INCREMENT POINTERS #
  1140. CPCHR = CPCHR + 1;
  1141. END #ELSE NOT AT PW= #
  1142.  
  1143. END #MAIN LOOP#
  1144.  
  1145. FOR CP1=CPPOS STEP 1 UNTIL CPEND DO #ZERO REST OF BUFFER #
  1146. C<CP1,1>OPMSG[0] = 0;
  1147.  
  1148. RETURN;
  1149.  
  1150. END #PROC CLEAR$PW#
  1151. CONTROL EJECT;
  1152.  
  1153.  
  1154. #
  1155.  *
  1156.  * PROC READ$CFO
  1157.  *
  1158.  * CALLED FROM GET$NXT$OP, SELJOB$LOD, SELJOB$MOD
  1159.  *
  1160.  * THE MESSAGE BUFFER IS CLEARED. IF WE ARE A CONSOLE JOB THEN
  1161.  * WE ISSUE A MESSAGE TO THE B-DISPLAY AND WAIT FOR A CFO INPUT
  1162.  * MESSAGE. IF WE ARE TESTING (IE., USING A REMOTE TERMINAL AND
  1163.  * NOT AT THE CONSOLE) THEN ISSUE A MESSAGE TO THE TERMINAL
  1164.  * AND WAIT FOR A RESPONSE. IN ANY CASE, THE CFO FLAG BIT IN RA+0
  1165.  * IS SET AND CLEARED.
  1166.  *
  1167.  *
  1168.  * CALLS CFOBSET, READLN, CFOWAIT, PUTLINE, SENDMSG
  1169.  *
  1170. #
  1171.  
  1172. PROC READ$CFO;
  1173.  
  1174. BEGIN
  1175.  
  1176. ITEM SAVEFWA I;
  1177.  
  1178. IF CSTAT EQ 2 THEN CMSG80[0] = " ENTER OPTION ";
  1179. IF CSTAT EQ 4 THEN CMSG80[0] = " ENTER CHANGES ";
  1180. SHOTERM (LOC(CMSG80[0]), 2, TRUE);
  1181. FOR K = 0 STEP 1 UNTIL 7 DO
  1182. CMESS[K] = SPACES;
  1183. CFOBSET;
  1184. IF TESTING THEN
  1185. BEGIN
  1186. CFOBCLR;
  1187. TERMRD;
  1188. JCAOPMSG[0] = TERMRDBFR;
  1189. IF TERMRDLN EQ 0 THEN CSTAT = 0;
  1190. ELSE CSTAT = CSTAT +1;
  1191. END
  1192. CFOWAIT;
  1193. C<1,79>CMSG80[0] = JCAOPMSG[0];
  1194. C<0,1>CMSG80[0] = " ";
  1195. SAVEFWA = IOFWA;
  1196. IOFWA = LOC(CMSG80[0]);
  1197. IOCNT = 7;
  1198. PUTLINE;
  1199. OPMSG[0] = CMSG80[0];
  1200. OPMSGZB[8] = 0;
  1201. FOR K=0 WHILE K LQ 6 DO
  1202. IF B<54,6>OPMSGZB[K] EQ 0 #IF 0-BYTE TERMINATOR #
  1203. AND B<0,6>OPMSGZB[K+1] EQ 0 #SPLIT ACROSS WORD BOUNDARY #
  1204. THEN
  1205. BEGIN
  1206. OPMSGZB[K+1] = 0; #FORCE END OF MESSAGE #
  1207. K = 8; #TERMINATE LOOP #
  1208. END
  1209. ELSE
  1210. K = K + 1;
  1211.  
  1212. SENDMSG;
  1213. IOFWA = SAVEFWA;
  1214. CMSG80[0] = JCAOPMSG[0];
  1215. JCAOPMSG[0] = SPACES;
  1216.  
  1217. END #READ CFO#
  1218. CONTROL EJECT;
  1219. #
  1220.  *
  1221.  * PROC SHOTERM (FWA, COUNT, FLUSH)
  1222.  *
  1223.  * CALLED FROM INITCPA, DS$DEFAULT, ROUT$FILES, DSPLA
  1224.  * SELJOB$LOD, SELJOB$SAV, SELJOB$MOD, OPTIONLOOP
  1225.  *
  1226.  * THE MESSAGE STARTING AT FWA (IF FWA IS 0 THEN USE THE LAST
  1227.  * FWA) CONSISTING OF COUNT NUMBER OF 10 CHARACTER WORDS IS SENT
  1228.  * TO THE TERMINAL OPERATOR (FILE LFN=OUTPUT). IF FLUSH IS
  1229.  * TRUE THEN WE ALSO ISSUE A WRITER TO THE OUTPUT FILE TO
  1230.  * FLUSH THE BUFFER (USED AT THE END OF A SERIES OF MESSAGES).
  1231.  *
  1232.  * CALLS PUTTERM, PUTTRMX
  1233.  *
  1234. #
  1235.  
  1236. PROC SHOTERM (FWA, COUNT, FLUSH);
  1237.  
  1238. BEGIN
  1239.  
  1240. ITEM FWA I;
  1241. ITEM COUNT I;
  1242. ITEM FLUSH B;
  1243.  
  1244. IF FWA NQ 0 THEN IOFWA = FWA;
  1245. IF COUNT NQ 0 THEN IOCNT = COUNT;
  1246. IF TESTING THEN
  1247. BEGIN
  1248. PUTTERM;
  1249. IF FLUSH THEN PUTTRMX;
  1250. END
  1251.  
  1252. END #SHOTERM#
  1253.  
  1254.  
  1255.  
  1256. #
  1257.  *
  1258.  * PROC CLR$OPMSG
  1259.  *
  1260.  * CALLED FROM SETUP$NAMI, DFL$RCDS, SELJOB$LOD, NAMIN
  1261.  *
  1262.  * CLEAR THE OPERATOR MESSAGE BUFFER - OPMSG.
  1263.  *
  1264. #
  1265.  
  1266. PROC CLR$OPMSG;
  1267. BEGIN
  1268. ITEM NN I;
  1269. FOR NN = 0 STEP 1 UNTIL 7 DO
  1270. OPMSG1[NN] = SPACES;
  1271. END #CLR$OPMSG#
  1272.  
  1273. CONTROL EJECT;
  1274.  
  1275.  
  1276. #
  1277.  *
  1278.  * PROC WEEKDAY
  1279.  *
  1280.  * CALLED FROM INITCPA
  1281.  *
  1282.  * GIVEN THE JULIAN DATE, THE DAY OF THE WEEK IS CALCULATED. THIS
  1283.  * IS USED DURING INITIALIZATION TIME AS PART OF THE ENVIRONMENTAL
  1284.  * IMPACT PROCESSING.
  1285.  *
  1286. #
  1287.  
  1288. PROC WEEKDAY;
  1289.  
  1290. BEGIN
  1291.  
  1292. EDITX = SIEJYR;
  1293. N1 = C<0,1>EDITX - "0";
  1294. N2 = C<1,1>EDITX - "0";
  1295. N = (N1 * 10) + N2;
  1296. IF N LS 70 THEN N = N + 100; # ADJUST FOR CENTURY #
  1297. NR1 = 365.25 * N;
  1298. EDITX = SIEJDAY;
  1299. N1 = (C<0,1>EDITX - "0") * 100;
  1300. N1 = N1 + ((C<1,1>EDITX - "0") * 10);
  1301. N1 = N1 + (C<2,1>EDITX - "0");
  1302. NR1 = NR1 + N1;
  1303. N = NR1;
  1304. NR2 = N;
  1305. IF NR1 EQ NR2 THEN NR1 = NR1 - 1.0;
  1306. N = NR1;
  1307. FOR K=0 WHILE N GR 6 DO
  1308. N = N -7;
  1309. ENV14 = DAY0[N];
  1310.  
  1311. END #WEEKDAY#
  1312.  
  1313. CONTROL EJECT;
  1314.  
  1315. #
  1316.  *
  1317.  * PROC INITCPA
  1318.  *
  1319.  * CALLED FROM SETUP$NAMI
  1320.  *
  1321.  * VARIOUS VALUES IN THE JOB CONTROL AREA ARE EXAMINED AND DISPLAYED
  1322.  * TO THE OPERATOR. THIS IS DONE DURING INITIALIZATION PROCESSING
  1323.  * FOR INFORMATIONAL PURPOSES ONLY.
  1324.  *
  1325.  * CALLS SIERRA, WEEKDAY, SHOWTERM
  1326.  *
  1327. #
  1328.  
  1329. PROC INITCPA;
  1330.  
  1331. BEGIN
  1332.  
  1333. SIERRA;
  1334.  
  1335. IF NOT JCACFO THEN C<4,3>ENV2 = "NO ";
  1336. IF NOT JCACMU THEN C<4,3>ENV3 = "NO ";
  1337. IF NOT JCACME THEN C<6,3>ENV4 = "NO ";
  1338. N = JCAPPU;
  1339. EDITX = XCDD(N);
  1340. C<5,2>ENV6 = C<8,2>EDITX;
  1341. N = SIECM;
  1342. EDITX = XCOD(N);
  1343. C<3,6>ENV7 = C<4,6>EDITX;
  1344. C<00,10>ENV15 = SIEDATE;
  1345. C<10,10>ENV15 = SIETIME;
  1346. WEEKDAY;
  1347. SHOTERM (LOC(ENV1), 1, FALSE);
  1348. SHOTERM (LOC(ENV1), 4, FALSE);
  1349. SHOTERM (LOC(ENV5), 3, FALSE);
  1350. SHOTERM (LOC(ENV8), 3, FALSE);
  1351. ENV10 = JCAOPMSG;
  1352. JCAOPMSG[0] = SPACES;
  1353. FOR K = 0 STEP 1 UNTIL 29 DO
  1354. IF C<K,1>ENV10 EQ 0 THEN C<K,1>ENV10 = " ";
  1355. SHOTERM (LOC(ENV8), 6, FALSE);
  1356. SHOTERM (LOC(ENV13), 1, FALSE);
  1357. SHOTERM (LOC(ENV13), 4, FALSE);
  1358. SHOTERM (0, 1, TRUE);
  1359.  
  1360. NR1 = SIECPUS * 1000.0;
  1361. NR2 = SIECPUMS;
  1362. NR1 = NR1 + NR2;
  1363.  
  1364. END #INITCPA#
  1365. CONTROL EJECT;
  1366.  
  1367.  
  1368. #
  1369.  *
  1370.  * PROC DS$DEFAULT
  1371.  *
  1372.  * CALLED FROM NEWBASE, OPTIONLOOP
  1373.  *
  1374.  * THE CURRENT DEFAULT CONTROL VALUES ARE DISPLAYED TO THE OPERATOR.
  1375.  * THIS INCLUDES, BUT IS NOT LIMITED TO, THE CURRENT MASTER FILE
  1376.  * NAME, NETWORK INVOCATION NUMBER, AND CURRENT DEFAULT PARAMETER
  1377.  * RECORD NAME.
  1378.  *
  1379.  * CALLS SHOTERM, XCOD, XSFW
  1380.  *
  1381. #
  1382.  
  1383. PROC DS$DEFAULT;
  1384.  
  1385. BEGIN
  1386.  
  1387. EDITX = XCDD(DCODE(MSTRLIN[0]));
  1388. C<0,3>MSTRLIN[0] = C<7,3>EDITX;
  1389. EDITX = XCDD(DCODE(MSTRUIN[0]));
  1390. C<0,3>MSTRUIN[0] = C<7,3>EDITX;
  1391.  
  1392. EDITX = XCOD(CMODE);
  1393. LNY1A = C<8,2>EDITX;
  1394. EDITX = XCOD(OPTION);
  1395. LNY1B = C<8,2>EDITX;
  1396. LNY1D = C<4,3>NETINVN[0];
  1397. LNR2A = C<4,3>NETINVN[0];
  1398. EDITX = XSFW(SIEMID);
  1399. LNY1C = C<8,2>EDITX;
  1400. IF C<0,1>MSTRUN[0] EQ 0 THEN MSTRUN[0] = SIEUSER;
  1401. LNY1E = MSTROIN[0];
  1402. LNY1F = MSTRUIN[0];
  1403. LNZ1A = XSFW(MSTRRN[0]);
  1404. LNZ1B = XSFW(MSTRMFN[0]);
  1405. LNZ1C = XSFW(MSTRUN [0]);
  1406. LNZ4A = XSFW(MSTRUN[0]);
  1407. LNZ4B = XSFW(MSTRFM[0]);
  1408. LNZ4B = SPACES; # T E M P O R A R Y #
  1409. LNZ4C = XSFW(MSTRPW[0]);
  1410. IF LNZ1C EQ SPACES THEN LNZ1C = "(UNDEF)";
  1411. IF LNZ4A EQ SPACES THEN LNZ4A = "(UNDEF)";
  1412. IF LNZ4B EQ SPACES THEN LNZ4B = "(N/A) ";
  1413. IF LNZ4C EQ SPACES THEN LNZ4C = "(UNDEF)";
  1414. IF DISDFLT THEN
  1415. BEGIN
  1416. SHOTERM (LOC(LNY0), 1, FALSE);
  1417. SHOTERM (0, 6, FALSE);
  1418. SHOTERM (LOC(LNY3), 6, FALSE);
  1419. SHOTERM (LOC(LNZ0), 7, FALSE);
  1420. SHOTERM (LOC(LNZ4), 7, FALSE);
  1421. SHOTERM (0, 1, TRUE);
  1422. END
  1423. OPMSG[0] = LNR;
  1424. OPMSGZB[4] = 0;
  1425. SENDMSG;
  1426. OPMSG[0] = LNZ;
  1427. OPMSGZB[7] = 0;
  1428. SENDMSG;
  1429.  
  1430. END #DS$DEFAULT#
  1431.  
  1432. CONTROL EJECT;
  1433. #
  1434.  * PROC CRACK$CALL
  1435.  *
  1436.  * CALLED FROM SETUP$NAMI
  1437.  *
  1438.  * DEBLOCK THE PARAMETERS IN THE NAMI CALL
  1439.  * STATEMENT AND PRESET SELECTED VARIABLES
  1440.  *
  1441.  * VALIDATE ALL KEYWORDS, AND UNSET THE *GO* CONDITION
  1442.  * IF ANY ERRORS ARE DIAGNOSED.
  1443.  *
  1444.  *
  1445.  * CALLS SETUPC, UPD8NIN, NEWMAST, UPD8MFN
  1446.  *
  1447. #
  1448.  
  1449.  
  1450. PROC CRACK$CALL;
  1451.  
  1452. BEGIN
  1453.  
  1454. ITEM CCERROR B = FALSE; #ERROR FLAG #
  1455. ITEM CCILLWD C(10); #MESSAGE WORD #
  1456. ITEM I; #SCRATCH #
  1457.  
  1458. SWITCH KEYWORD, #CORRESPONDS TO GLOBAL ARRAY KWARRY #
  1459. KWGO,
  1460. KWMFN,
  1461. KWOIN,
  1462. KWOPTION,
  1463. KWPW,
  1464. KWRN,
  1465. KWRS,
  1466. KWSTOP,
  1467. KWTERM,
  1468. KWTEST,
  1469. KWUN;
  1470.  
  1471.  
  1472. PROC CC$ERROR;
  1473.  
  1474. # WRITE CALL STATEMENT ERROR MESSAGE AND SET ERROR FLAG #
  1475.  
  1476. BEGIN #PROC CC$ERROR#
  1477. OPMSG[0] = " NAMI ILLEGAL KEYWORD/VALUE ";
  1478. OPMSG[3] = CCILLWD;
  1479. SHOTERM (LOC(OPMSG[0]),4,TRUE); #ERROR MESSAGE TO TERMINAL #
  1480. OPMSGZB[4] = 0;
  1481. SENDMSG; #ERROR MESSAGE TO DAYFILE #
  1482. CCERROR = TRUE; #SET ERROR FLAG #
  1483. END #PROC CC$ERROR#
  1484.  
  1485.  
  1486. PROC CC$UPD8;
  1487.  
  1488. # UPDATE INVOCATION NUMBER AND MASTER FILE. CALL CC$ERROR IF #
  1489. # NO VALUE SPECIFIED. #
  1490.  
  1491. BEGIN #PROC CC$UPD8#
  1492. IF PACKWE[J2] EQ "="
  1493. THEN #VALUE SPECIFIED #
  1494. BEGIN
  1495. NETINCR[0] = 0;
  1496. UPD8NIN;
  1497. NEWMAST(SCANK,SCANV);
  1498. UPD8MFN;
  1499. END
  1500. ELSE #NO =VALUE SPECIFIED #
  1501. BEGIN
  1502. CCILLWD = SCANK; #KEYWORD #
  1503. CC$ERROR; #ISSUE ERROR MESSAGE #
  1504. END
  1505. END #PROC CC$UPD8#
  1506.  
  1507.  
  1508.  
  1509. # BEGIN CRACK$CALL PROCEDURE #
  1510.  
  1511. PACK80 = SPACES;
  1512. PACK80 = JCAOPMSG;
  1513.  
  1514. SETUPC;
  1515.  
  1516.  
  1517. FOR J2=1 WHILE PACKZW[J2] NQ 0 DO #LOOP THRU CALL STMT #
  1518. BEGIN
  1519. SCANK = PACKW[J2];
  1520. SCANV = PACKW[J2+1];
  1521. FILL55 (SCANK);
  1522. FILL55 (SCANV);
  1523.  
  1524. FOR I=1 STEP 1 UNTIL NUMKWDS DO #LOOP THRU LEGAL KEYWORDS #
  1525. IF KWORD[I] EQ SCANK #MATCH FOUND #
  1526. THEN
  1527. GOTO KEYWORD[I]; #JUMP TO PROCESS KEYWORD #
  1528.  
  1529. CCILLWD = SCANK; #ILLEGAL KEYWORD #
  1530. CC$ERROR; #ISSUE ERROR MESSAGE #
  1531. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1532.  
  1533. KWGO: # GO #
  1534. AUTO$GO = TRUE;
  1535. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1536.  
  1537. KWTEST: # TEST #
  1538. TESTING = TRUE;
  1539. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1540.  
  1541. KWRN: # RN PARAMETER IS SPECIFIED #
  1542. # WE WANT TO MAKE SURE THAT THE OPERATOR TYPED IN A GOOD RECORD #
  1543. # NAME FOR THE RN PARAMETER. WHETHER THE TYPED-IN NAME IS GOOD #
  1544. # CAN NOT BE KNOWN UNTIL WE READ THE NAMSTRT FILE. THIS WILL BE #
  1545. # DONE IN PRELOAD. FOR NOW, JUST SAVE THE TYPED-IN NAME AND #
  1546. # REMEMBER THAT RN PARAMETER HAS BEEN ENTERED. #
  1547.  
  1548. IF PACKWE[J2] EQ "="
  1549. THEN
  1550. BEGIN
  1551. RNCHANGED = TRUE; # REMEMBER TO PROCESS RN PARAM LATER #
  1552. RNVALUE = SCANV; # SAVE THE TYPED-IN RN VALUE #
  1553. END
  1554. ELSE
  1555. BEGIN
  1556. CCILLWD =SCANK;
  1557. CC$ERROR;
  1558. END
  1559.  
  1560. GOTO ENDLOOP; # PROCESS NEXT KEYWORD #
  1561.  
  1562. KWMFN: # MFN = FILENAM #
  1563. KWPW: # PW = PASSWOR #
  1564. KWUN: # UN = USERNUM #
  1565. CC$UPD8; #UPDATE FILES #
  1566. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1567.  
  1568. KWRS: # RS = JOBNAME #
  1569. RESTRT = TRUE;
  1570. RSAPPL = SCANV; #APPLICATION TO RESTART #
  1571. AUTO$GO = TRUE; #FORCE THE *GO* #
  1572. CC$UPD8; #UPDATE FILES #
  1573. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1574.  
  1575. KWOIN: # OIN = NNN #
  1576. CALC$OIN(SCANV,FALSE); #CNVERT OLD INVOCATION NUMBER#
  1577. CALL$OIN = MSTROIN[0]; #STORE OLD INVOCATION NUMBER#
  1578. SCANV = CALL$OIN; # SET UP FOR NEWBASE CALL #
  1579. CC$UPD8; #UPDATE FILES #
  1580. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1581.  
  1582. KWOPTION: #OPTION = SELECTED OPTION #
  1583. CCILLWD = " (OPTION) "; #ILLEGAL ON CALL STATEMENT #
  1584. CC$ERROR;
  1585. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1586.  
  1587. KWSTOP: # STOP #
  1588. KWTERM: # TERM #
  1589. OPTION = OPTTERM; #TERMINATE NAMI #
  1590. GOTO ENDLOOP; #PROCESS NEXT KEYWORD #
  1591.  
  1592. ENDLOOP: # END OF LOOP #
  1593. IF PACKWE[J2] EQ "=" #INCREMENT PARAMETER INDEX #
  1594. THEN
  1595. J2 = J2 + 2;
  1596. ELSE
  1597. J2 = J2 + 1;
  1598.  
  1599. END #OF LOOP J2#
  1600.  
  1601. IF CCERROR #ERROR(S) ON CONTROL STATEMENT #
  1602. THEN
  1603. AUTO$GO = FALSE; #ALLOW OPERATOR TO CORRECT PARAMETERS#
  1604. IF TESTING #TEST MODE #
  1605. THEN
  1606. BEGIN #SET FLAGS #
  1607. CMODE = 1;
  1608. DISDFLT = TRUE;
  1609. END
  1610.  
  1611. END #CRACK$CALL#
  1612. CONTROL EJECT;
  1613. #
  1614.  *
  1615.  * PROC SETUP$NAMI
  1616.  *
  1617.  * CALLED FROM NAMIN
  1618.  *
  1619.  * THIS IS NAMI INITIALIZATION CODE. VARIOUS TABLES ARE INITIALIZED
  1620.  * AND MODES (EG., NORMAL/DEBUG) ARE CHECKED. CERTAIN VALUES ARE
  1621.  * ALSO PRESET.
  1622.  *
  1623.  * CALLS INITCPA, CLR$OP$MSG, SENDMSG, PRELOAD
  1624.  *
  1625. #
  1626.  
  1627. PROC SETUP$NAMI;
  1628.  
  1629. BEGIN
  1630.  
  1631. IOFLG = 2;
  1632. STARTIO;
  1633. RESTRT = FALSE;
  1634. APFOUND = FALSE;
  1635.  
  1636. MSTROIN[0] = "000";
  1637. CALL$OIN = SPACES;
  1638. CMODE = 3;
  1639. CRACK$CALL;
  1640.  
  1641.  
  1642. INITCPA;
  1643.  
  1644. IF NOT TESTING
  1645. THEN
  1646. BEGIN
  1647. CHEKORG; # ABORT IF NOT SYS ORG OR CSOJ #
  1648. SETNUN; # SET NAMI USER NUMBER #
  1649. END
  1650.  
  1651. FOR N = 0 STEP 1 UNTIL 200 DO
  1652. BEGIN
  1653. RTFN[N] = SPACES;
  1654. RTFNCD[N] = 0;
  1655. JBL1[N] = SPACES;
  1656. JBL2[N] = SPACES;
  1657. JBL3[N] = SPACES;
  1658. END
  1659.  
  1660. JOBNAME = SPACES;
  1661. JOBINDX = 0;
  1662.  
  1663.  
  1664. CTLRCDS = 0;
  1665. RUNRCDS = 0;
  1666.  
  1667. PRELOAD;
  1668.  
  1669. IF RNCHANGED
  1670. THEN # A NEW RN PARAMETER HAS BEEN ENTERED #
  1671. BEGIN # PROCESSING RN PARAMETER #
  1672. FOUND = FALSE;
  1673. FOR N=0 STEP 1 WHILE (N LQ LASTENTRY) AND (NOT FOUND) DO
  1674. BEGIN
  1675. IF (DIR$NAME[N] EQ RNVALUE) AND (DIR$TYPE[N] EQ PTYPE)
  1676. THEN # THE TYPED-IN RN VALUE IS GOOD #
  1677. BEGIN
  1678. FOUND = TRUE;
  1679. NETINCR[0] = 0;
  1680. UPD8NIN;
  1681. RNKEYWORD = "RN";
  1682. NEWMAST (RNKEYWORD,RNVALUE);
  1683. UPD8MFN;
  1684. END #IF#
  1685. END #FOR#
  1686.  
  1687. IF N GR LASTENTRY
  1688. THEN # NO PARAM RECORD MATCHED THE TYPED-IN RN VALUE #
  1689. BEGIN
  1690. AUTO$GO = FALSE; # BAD RN VALUE. DO NOT GO AHEAD #
  1691. OPMSG[0] = " PARAMETER RECORD NOT FOUND :";
  1692. OPMSG1[3] = RNVALUE;
  1693. SHOTERM (LOC(OPMSG[0]),4,TRUE); # ERROR MESSAGE TO TERMINAL #
  1694. OPMSGZB[4] = 0;
  1695. SENDMSG; # MESSAGE TO DAYFILE #
  1696. END
  1697. RNCHANGED =FALSE; # RESET RNCHANGED FLAG #
  1698. END # PROCESSING RN PARAMETER #
  1699.  
  1700. OPTION = OPTLOAD;
  1701. TBLPTR = DISPJBS;
  1702. NEED$OPRES = FALSE;
  1703.  
  1704. END #SETUP$NAMI#
  1705.  
  1706. CONTROL EJECT;
  1707. #
  1708.  *
  1709.  * PROC DFL$RCDS
  1710.  *
  1711.  * CALLED FROM NEWBASE, SELJOB$LOD
  1712.  *
  1713.  * SEND A LIST THE OF JOB AND PARAMETER RECORDS TO THE JOB
  1714.  * DAYFILE. THIS IS DONE TO ASSIST THE OPERATOR IN SELECTING
  1715.  * A JOB/PARAMETER RECORD IN LIEU OF THE K/L-DISPLAY.
  1716.  *
  1717.  * CALLS CLR$OP$MSG, SENDMSG
  1718.  *
  1719. #
  1720.  
  1721. PROC DFL$RCDS;
  1722.  
  1723. BEGIN
  1724.  
  1725. ITEM TYPNDX I;
  1726.  
  1727. FOR TYPNDX = JTYPE WHILE TYPNDX NQ ZTYPE DO
  1728. BEGIN
  1729. OPMSG[0] = " JOB RECORD NAMES--";
  1730. IF TYPNDX EQ PTYPE THEN C<0,6>OPMSG[0] = " PARAM";
  1731. SHOTERM (LOC(OPMSG[0]), 4, FALSE);
  1732. OPMSGZB[4] = 0;
  1733. SENDMSG;
  1734. N1 = 0;
  1735.  
  1736. FOR N2 = 0 STEP 1 WHILE DIR$NAME[N2] NQ SPACES DO
  1737. BEGIN
  1738. IF DIR$TYPE[N2] EQ TYPNDX THEN
  1739. BEGIN
  1740. IF N1 EQ 0 THEN CLR$OPMSG;
  1741. C<1,7>OPMSG1[N1] = C<0,7>DIR$NAME[N2];
  1742. N1 = N1 + 1;
  1743. END
  1744. IF N1 NQ 0 #SOMETHING IN BUFFER #
  1745. AND DIR$NAME[N2+1] EQ SPACES #AND END OF DIRECTORY #
  1746. THEN
  1747. N1 = 4;
  1748. IF N1 EQ 4 THEN
  1749. BEGIN
  1750. SHOTERM (LOC(OPMSG[0]), 4, TRUE);
  1751. OPMSGZB[4] = 0;
  1752. SENDMSG;
  1753. N1 = 0;
  1754. END
  1755. END
  1756. IF TYPNDX EQ PTYPE THEN TYPNDX = ZTYPE;
  1757. IF TYPNDX EQ JTYPE THEN TYPNDX = PTYPE;
  1758. END
  1759. END #DFL$RCDS#
  1760. CONTROL EJECT;
  1761.  
  1762. #
  1763.  * PROC CHECK$OPTION
  1764. #
  1765.  
  1766. PROC CHECK$OPTION (OPVALUE);
  1767.  
  1768. BEGIN
  1769.  
  1770. ITEM OPVALUE C(10);
  1771. IF C<0,4>OPVALUE EQ "SHOW" THEN OPTION = OPTDISP; #SHOW OPTS#
  1772. IF C<0,4>OPVALUE EQ "SELE" THEN OPTION = OPTLOAD; #SELECT JOB#
  1773. IF C<0,4>OPVALUE EQ "MODI" THEN OPTION = OPTMOD; #MODIFY JOB#
  1774. IF C<0,4>OPVALUE EQ "SAVE" THEN OPTION = OPTSAVE; #SAVE JOB#
  1775. IF C<0,4>OPVALUE EQ "SUBM" THEN OPTION = OPTSBMT; #SUBMIT JOB#
  1776. IF C<0,4>OPVALUE EQ "TERM" THEN OPTION = OPTTERM; #TERMINATE#
  1777. IF C<0,4>OPVALUE EQ "STOP" THEN OPTION = OPTTERM; #TERMINATE#
  1778. IF C<0,4>OPVALUE EQ "ROUT" THEN OPTION = OPTROUT; #ROUTE IMED#
  1779. IF C<0,6>OPVALUE EQ "NODISP" THEN DSPLYMODE = FALSE;
  1780. IF C<0,6>OPVALUE EQ "DISPLA" THEN DSPLYMODE = TRUE;
  1781. TBLPTR = DISPOPT;
  1782. IF OPTION EQ OPTLOAD THEN TBLPTR = DISPJBS;
  1783. IF OPTION EQ OPTMOD THEN TBLPTR = DISPCCB;
  1784. IF OPTION EQ OPTSAVE THEN TBLPTR = DISPCCB;
  1785. IF OPTION EQ OPTSBMT THEN TBLPTR = DISPZRO;
  1786. IF OPTION EQ OPTSBMT THEN RUNJOB = TRUE;
  1787. IF OPTION EQ OPTSBMT THEN RT$IMMED = TRUE;
  1788.  
  1789. END #CHECK$OPTION#
  1790.  
  1791. CONTROL EJECT;
  1792.  
  1793. #
  1794.  *
  1795.  * PROC GET$NXT$OP
  1796.  *
  1797.  * CALLED FROM NAMIN
  1798.  *
  1799.  * IF WE ARE IN AUTOMATIC MODE (OPERATOR HAS SELECTED A PARAMETER
  1800.  * RECORD WHICH INDICATES WHICH JOBS TO LOAD AND ROUTE TO THE INPUT
  1801.  * QUEUE), THE OPTION IS FORCED TO BE SELECT-SAVE-ROUTE.
  1802.  *
  1803.  * OTHERWISE, WE DISPLAY TO THE OPERATOR (K/L-DISPLAY OR TERMINAL)
  1804.  * THE LIST OF OPTIONS AND READ (VIA CFO OR TERMINAL INPUT)
  1805.  * THE OPERATOR CHOICE OF OPERATION. THE VALID OPTIONS ARE-
  1806.  *
  1807.  * DISPLAY OPTIONS
  1808.  * SELECT JOB/PARAMETER RECORD
  1809.  * MODIFY JOB RECORD
  1810.  * SAVE JOB RECORD
  1811.  * ROUTE JOB RECORD TO INPUT QUEUE
  1812.  * TERMINATE THE RUN
  1813.  *
  1814.  * ALL INPUT MUST BE OF THE FORM-
  1815.  *
  1816.  * CFO.MESSAGE
  1817.  *
  1818.  * WE COMPARE THE FIRST THREE CHARACTERS OF MESSAGE WITH THE LIST
  1819.  * OF OPTIONS (EG, SEL, MOD, TER).
  1820.  *
  1821.  * CALLS DISPLAY$L, READ$CFO, CSCAN
  1822.  *
  1823. #
  1824.  
  1825. PROC GET$NXT$OP;
  1826.  
  1827. BEGIN
  1828.  
  1829. NEED$OPRES = FALSE;
  1830. IF NXT2LOD NQ 0 THEN
  1831. BEGIN
  1832. OPTION = OPTLOAD;
  1833. TBLPTR = DISPJBS;
  1834. IF JBL1[NXT2LOD-1] EQ SPACES THEN NXT2LOD = 0;
  1835. END
  1836.  
  1837. IF (NXT2LOD EQ 0) AND (AUTO$GO) THEN OPTION = OPTTERM;
  1838.  
  1839. IF (NXT2LOD EQ 0) AND (NOT AUTO$GO) THEN
  1840. BEGIN
  1841. RUNJOB = FALSE;
  1842. CTLJOB = FALSE;
  1843. TBLPTR = DISPOPT;
  1844. DISPLAY$L;
  1845. FOR CSTAT = 2 WHILE CSTAT EQ 2 DO
  1846. BEGIN
  1847. CSTAT = 2;
  1848. READ$CFO; # -- CONSOLE INPUT -- #
  1849. OPTION = OPTROUT+1;
  1850. EDITX = C<0,6>CMESS[0];
  1851. CHECK$OPTION (EDITX);
  1852. IF OPTION GR OPTROUT THEN CSTAT = 2;
  1853. END
  1854. END
  1855.  
  1856. END #GET$NXT$OP#
  1857.  
  1858.  
  1859. CONTROL EJECT;
  1860.  
  1861. #
  1862.  *
  1863.  * PROC ROUT$FILES
  1864.  *
  1865.  * CALLED FROM NAMIN
  1866.  *
  1867.  * THE ROUTE-FILE QUEUE (ARRAY IN COMMON AREA ROUTABL) IS
  1868.  * EXAMINED AND FOR EACH FILE NAME FOUND, THAT FILE IS
  1869.  * ROUTED TO THE INPUT QUEUE. THIS ROUTINE IS CALLED AS PART
  1870.  * OF THE JOB TERMINATION PROCESSING. IN THAT WAY, ALL
  1871.  * NETWORK JOBS ARE STARTED (ROUGHLY) SIMULTANEOUSLY.
  1872.  *
  1873.  * CALLS XSFW, ROUTEM, SHOTERM
  1874.  *
  1875. #
  1876.  
  1877. PROC ROUT$FILES;
  1878.  
  1879. BEGIN
  1880.  
  1881. FOR N = 0 STEP 1 WHILE RTFN[N] NQ SPACES DO
  1882. BEGIN
  1883. ROUTYPE = 0;
  1884. IF TESTING THEN ROUTYPE = 63;
  1885. ROUTNAM = RTFN[N];
  1886. RSTM3 = XSFW(ROUTNAM);
  1887. ROUTCOD = ROUTIQ;
  1888. IF C<0,2>ROUTNAM EQ "NI" THEN
  1889. BEGIN
  1890. ROUTCOD = ROUTCOD + ROUTNIP ;
  1891. START$SUBS = TRUE;
  1892. INDXC = N;
  1893. END
  1894. ELSE
  1895. BEGIN
  1896. IF RTFNCD[N] NQ 0 THEN
  1897. BEGIN
  1898. ROUTCOD = ROUTCOD + ROUTSS;
  1899. END
  1900. RTEOT = RTFNOT[N];
  1901. RTESC = RTFNSC[N];
  1902. IF RTESC EQ 1
  1903. THEN RTESC = "SY";
  1904. ELSE IF RTESC EQ 2
  1905. THEN RTESC = "BC";
  1906. ELSE IF RTESC EQ 3
  1907. THEN RTESC = "NS";
  1908. ROUTEM;
  1909. ROUTCOD = 0;
  1910. END
  1911. EDITX = XCOD(ROUTCOD);
  1912. RSTM2 = C<6,4>EDITX;
  1913. SHOTERM (LOC(RSTM0), 4, TRUE);
  1914. IF ROUTCOD EQ 0 THEN RTFN[N] = SPACES;
  1915. IF ROUTCOD EQ 0 THEN RTFNCD[N] = 0;
  1916. END
  1917. RT$IMMED = FALSE;
  1918.  
  1919. END #ROUT$FILES#
  1920. CONTROL EJECT;
  1921. #
  1922.  *
  1923.  * PROC FILL55 (FILET)
  1924.  *
  1925.  * CALLED FROM PRELOAD, FIND$JOB, SELJOB$LOD, LOAD$JOB
  1926.  *
  1927.  * THE 10 CHARACTER WORD (FILET) IS EXAMINED CHARACTER BY
  1928.  * CHARACTER AND EACH NON-ALPHANUMERIC CHARACTER IS REPLACED
  1929.  * BY A BLANK.
  1930.  *
  1931. #
  1932.  
  1933. PROC FILL55 (FILET);
  1934.  
  1935. BEGIN
  1936.  
  1937. ITEM FILET C(10);
  1938. ITEM N2 I;
  1939.  
  1940. FOR N2 = 0 STEP 1 UNTIL 9 DO
  1941. IF (C<N2,1>FILET LS "A") OR
  1942. (C<N2,1>FILET GR "9") THEN
  1943. C<N2,1>FILET = " ";
  1944.  
  1945. END #FILL55#
  1946.  
  1947. CONTROL EJECT;
  1948. #
  1949.  * PROC PRELOAD
  1950.  *
  1951.  * PRELAOD READS THE NETWORK MASTER FILE (LFN=INFILE)
  1952.  * AND BUILDS THE DIRECTORY TABLE. EACH ENTRY IN THE
  1953.  * TABLE CONSISTS OF THREE FIELDS:
  1954.  * - DIR$NAME : NAME OF THE CORRESPONDING RECORD.
  1955.  * - DIR$TYPE : TYPE OF THE RECORD -- EITHER
  1956.  * PARAMETER RECORD OR JOB RECORD.
  1957.  * - PRU$ADDR : THE RELATIVE SECTOR ADDRESS OF THE
  1958.  * RECORD.
  1959. #
  1960. PROC PRELOAD;
  1961. BEGIN # PRELOAD #
  1962.  
  1963. NETINCR[0] = 0;
  1964. UPD8NIN;
  1965. GNETCCL;
  1966. FET$RR = 1; # PRESET THE CRI AND RR FIELD OF THE #
  1967. FET$CRI = 1; # FET TO THE FIRST PRU OF THE FILE. #
  1968. RUNRCDS = 0; # PRESET JOB-RECORD COUNTER. #
  1969. CTLRCDS = 0; # PRESET PARAMETER-RECORD COUNTER. #
  1970.  
  1971. IF C<0,1>PFERMSG NQ 0 THEN # COULD NOT GET NAMSTRT FILE #
  1972. BEGIN
  1973. SHOTERM (LOC(PFERMSG), 4, FALSE);
  1974. PFERMSG = " MASTER FILE NOT PRESENT";
  1975. SHOTERM (LOC(PFERMSG), 4, TRUE);
  1976. DIR$NAME[0] = SPACES; # TABLE END #
  1977. DIR$TYPE[0] = ZTYPE; # INDICATORS #
  1978. GOTO ENDLOOP;
  1979. END
  1980.  
  1981. FOR N=0 STEP 1 WHILE (FET$STAT NQ STAT$EOF)
  1982. AND (FET$STAT NQ STAT$EOI) DO
  1983. BEGIN
  1984. IF N GR 200 THEN
  1985. ABORTRUN(1); # DIRECTORY TABLE OVERFLOWED #
  1986. PRU$ADDR[N]= FET$CRI[0]; #RELATIVE SECTOR ADDRESS OF RECORD#
  1987. FET$IN = FET$FIRST; # RESET IN AND OUT POINTERS #
  1988. FET$OUT = FET$FIRST; # IN THE FET.#
  1989. READSKP (INFIL,0); # READ AND SKIP TO NEXT RECORD#
  1990. RECALL (INFIL);
  1991.  
  1992. IF (FET$STAT NQ STAT$EOF) AND (FET$STAT NQ STAT$EOI)
  1993. THEN
  1994. BEGIN
  1995. READH (INFIL,ONELINE,9,STATS); #READ FIRST LINE OF RECORD #
  1996. JOBNAME = LIN$10[0]; # EXTRACT RECORD NAME FROM 1ST LINE #
  1997. FILL55 (JOBNAME); # SPACE FILL RECORD NAME #
  1998. DIR$NAME[N] = JOBNAME; # STORE RECORD NAME IN DIRECTORY #
  1999.  
  2000. READH (INFIL,ONELINE,9,STATS); #READ SECOND LINE OF RECORD#
  2001. RECORDTYPE = C<6,3>LIN$100; # FIGURE OUT RECORD TYPE #
  2002.  
  2003. IF RECORDTYPE EQ "PAR "
  2004. THEN
  2005. BEGIN # PARAMETER RECORD ENCOUNTERED #
  2006. DIR$TYPE[N] = PTYPE; # STORE RECORD TYPE #
  2007. CTLRCDS = CTLRCDS+1; #INCRECMENT PARAMETER RECORD COUNT#
  2008. END
  2009. ELSE IF RECORDTYPE EQ "JOB "
  2010. THEN
  2011. BEGIN # JOB RECORD ENCOUNTERED #
  2012. DIR$TYPE[N] = JTYPE; # STORE RECORD TYPE #
  2013. RUNRCDS = RUNRCDS + 1; # INCRECMENT JOB RECORD COUNT #
  2014. END
  2015. ELSE
  2016. BEGIN # UNKNOWN RECORD TYPE #
  2017. OPMSG[0]=" ERROR IN NAMSTRT FILE. UNKNOWN RECORD TYPE.";
  2018. OPMSGZB[5] = 0;
  2019. SENDMSG; # SEND A DAYFILE MESSAGE, #
  2020. ABTRUN; # AND ABORT THE PROGRAM. #
  2021. END
  2022. END
  2023.  
  2024. ELSE # EOF OR EOI ENCOUNTERED #
  2025. BEGIN
  2026. DIR$NAME[N] = SPACES; # AS AN END OF DATA INDICATOR #
  2027. DIR$TYPE[N] = ZTYPE;
  2028. LASTENTRY = N - 1; # LAST ENTRY IN THE TABLE #
  2029. END
  2030.  
  2031. END # FOR #
  2032.  
  2033. ENDLOOP:
  2034. PRLDNIN;
  2035.  
  2036. END # PRELOAD #
  2037.  
  2038. CONTROL EJECT;
  2039. #
  2040.  *
  2041.  * PROC INTRACT
  2042.  *
  2043.  * CALLED FROM RLOD$DISP
  2044.  *
  2045.  * THE NEXT LINE OF DATA IS ENTERED INTO THE K/L-DISPLAY
  2046.  * BUFFER.
  2047.  *
  2048. #
  2049.  
  2050. PROC INTRACT (NDX1, NXT);
  2051.  
  2052. BEGIN
  2053.  
  2054. ITEM NDX1 I;
  2055. ITEM CNT I;
  2056. ITEM NXT I;
  2057. ITEM MORE$2$DO B;
  2058.  
  2059. NXT = NDX1;
  2060. MORE$2$DO = TRUE;
  2061.  
  2062. FOR CNT = 1 STEP 1 WHILE MORE$2$DO DO
  2063. BEGIN
  2064. CHX[NDX1+CNT] = XSFW(LINX[CNT-1]);
  2065. IF (CNT+1) GQ CWC[NDX1] THEN MORE$2$DO = FALSE;
  2066. END
  2067.  
  2068. NXT = NDX1 + CWC[NDX1];
  2069.  
  2070. END #INTRACT#
  2071.  
  2072.  
  2073. CONTROL EJECT;
  2074.  
  2075. #
  2076.  *
  2077.  * PROC EXTRACT
  2078.  *
  2079.  * CALLED FROM DISPLAY$L
  2080.  *
  2081.  * THIS IS THE OPPOSITE OF INTRACT. HERE THE NEXT LINE OF THE
  2082.  * CURRENT K/L-DISPLAY BUFFER IS EXTRACTED AND MADE AVAILABLE
  2083.  * FOR PROCESSING.
  2084.  *
  2085. #
  2086.  
  2087. PROC EXTRACT (NDX1, CNT, NXT);
  2088.  
  2089. BEGIN
  2090.  
  2091. ITEM NDX1 I;
  2092. ITEM CNT I;
  2093. ITEM NXT I;
  2094. ITEM MORE$2$DO B;
  2095.  
  2096. NXT = 0;
  2097. MORE$2$DO = TRUE;
  2098. FOR CNT = 0 STEP 1 UNTIL 9 DO
  2099. LINX[CNT] = SPACES;
  2100.  
  2101. IF CWC[NDX1] GR 1 THEN
  2102. BEGIN
  2103. FOR CNT = 1 STEP 1 WHILE MORE$2$DO DO
  2104. BEGIN
  2105. LINX[CNT-1] = CHX[NDX1+CNT];
  2106. IF (CNT+1) EQ CWC[NDX1] THEN MORE$2$DO = FALSE;
  2107. END
  2108. END
  2109.  
  2110. NXT = NDX1 + CWC[NDX1];
  2111. CNT = NXT - NDX1;
  2112.  
  2113. END #EXTRACT#
  2114. CONTROL EJECT;
  2115.  
  2116. #
  2117.  *
  2118.  * PROC FIND$JOB
  2119.  *
  2120.  * CALLED FROM LOAD$JOB
  2121.  *
  2122.  * THE DIRECTORY TABLE IS SEARCHED FOR THE DESIRED RECORD
  2123.  * NAME. IF THE NAME IS FOUND, RETRIEVE THE RELATIVE SECTOR
  2124.  * ADDRESS FROM THE DIRECTORY TABLE AND STORE IT IN THE RR
  2125.  * FIELD OF THE FET TO UTILIZE A RANDOM READ. THE FIRST 3
  2126.  * LINES OF THE RECORD ARE THEN READ OFF TO MAKE THE SITUA-
  2127.  * TION COMPATIBLE WITH THE EXITSTING CODE IN THE CALLER --
  2128.  * LOAD$JOB.
  2129.  *
  2130.  * CALLS UPD8NIN, GNETCCL, GETLINE, CSCAN, FILL55,
  2131.  *
  2132. #
  2133.  
  2134. PROC FIND$JOB;
  2135.  
  2136. BEGIN
  2137.  
  2138. IF INV$INCR AND NOT RESTRT
  2139. THEN # NIP APPEARS IN JOB STREAM #
  2140. BEGIN
  2141. NETINCR[0] = 1;
  2142. UPD8NIN;
  2143. GNETCCL;
  2144. INV$INCR = FALSE;
  2145. LNR2A = C<4,3>NETINVN[0];
  2146. OPMSG[0] = LNR;
  2147. OPMSGZB[4] = 0;
  2148. SENDMSG;
  2149. SHOTERM (LOC(LNR0), 4, TRUE);
  2150. END
  2151.  
  2152. IF CALL$OIN EQ SPACES
  2153. THEN
  2154. CALC$OIN(NETINVN[0],TRUE); #STORE OIN = NIN-1 #
  2155.  
  2156. IOFWA = LOC(LINX[0]);
  2157.  
  2158. FOR I=0 STEP 1 WHILE I LQ LASTENTRY AND (DIR$NAME[I] NQ JOBNAME) DO
  2159. BEGIN
  2160. END
  2161.  
  2162. IF DIR$NAME[I] EQ JOBNAME
  2163. THEN
  2164. BEGIN
  2165. FET$RR[0] = PRU$ADDR[I]; #STORE THE SECTOR ADDRESS INTO THE FET #
  2166. FET$IN[0] = FET$FIRST[0]; # RESET IN AND #
  2167. FET$OUT[0] =FET$FIRST[0]; # OUT PONTERS. #
  2168. GETLINE;
  2169. GETLINE;
  2170. GETLINE;
  2171. END
  2172. ELSE
  2173. BEGIN
  2174. OPMSG[0] = " COULD NOT FIND JOB NAME:";
  2175. OPMSG1[3] = JOBNAME;
  2176. OPMSGZB[4] = 0;
  2177. SENDMSG;
  2178. ABTRUN;
  2179. END
  2180.  
  2181. END #FIND$JOB#
  2182.  
  2183. CONTROL EJECT;
  2184.  
  2185. #
  2186.  *
  2187.  * PROC CLRTABLE
  2188.  *
  2189.  * CALLED FROM LOADJOB
  2190.  *
  2191.  * CLEAR THE L-DISPLAY CARD/LINE BUFFER.
  2192.  *
  2193. #
  2194.  
  2195. PROC CLRTABLE;
  2196.  
  2197. BEGIN
  2198.  
  2199. N = CWC[0];
  2200.  
  2201. FOR N1 = 0 WHILE N LS TLEN[TBLPTR] DO
  2202. BEGIN
  2203. N2 = CWC[N];
  2204. IF N2 EQ 0 THEN N2 = N;
  2205. IF N2 EQ 7 THEN
  2206. BEGIN
  2207. CHLOW[N] = "--";
  2208. FOR N1 = 1 STEP 1 UNTIL 6 DO
  2209. CHX[N+N1] = SPACES;
  2210. END
  2211. N = N + N2;
  2212. END
  2213.  
  2214. END #CLRTABLE#
  2215.  
  2216. CONTROL EJECT;
  2217.  
  2218.  
  2219. #
  2220.  *
  2221.  * PROC NEWBASE
  2222.  *
  2223.  * CALLED FROM SELJOB$LOD
  2224.  *
  2225.  * WHEREIN WE SCAN THE OPERATOR INPUT (CFO) MESSAGE AND SEND
  2226.  * THE NEW NETWORK CCL FILE NAMING INFORMATION (PFN, UN, ETC)
  2227.  * TO NEWMAST WHICH GETS THE NEW MASTER FILE.
  2228.  *
  2229.  * AFTER THE NEW FILE IS OPENED, NAMI IS IN EFFECT RESTARTED
  2230.  * (ACUTALLY RESET) TO BEGIN AGAIN WITH THE NEW MASTER FILE.
  2231.  *
  2232.  * CALLS NEWMAST, UPD8MFN, PREL$JOBS, DFL$RCDS, DS$DEFAULT, DISPLAY$L
  2233.  *
  2234. #
  2235.  
  2236. PROC NEWBASE;
  2237.  
  2238. BEGIN
  2239.  
  2240.  
  2241. SWITCH KEYWORD, #CORRESPONDS TO ARRAY KWARRY #
  2242. KWGO,
  2243. KWMFN,
  2244. KWOIN,
  2245. KWOPTION,
  2246. KWPW,
  2247. KWRN,
  2248. KWRS,
  2249. KWSTOP,
  2250. KWTERM,
  2251. KWTEST,
  2252. KWUN;
  2253.  
  2254. ITEM I; #SCRATCH #
  2255. ITEM IERROR B; #ERROR FLAG #
  2256.  
  2257. IERROR = FALSE;
  2258.  
  2259. PACK80 = CMSG80[0];
  2260. SETUPC; #UNPACK CFO COMMAND #
  2261.  
  2262. UPCFLAG = TRUE;
  2263. FOR K=0 WHILE UPCFLAG DO #LOOP THROUGH CFO COMMAND #
  2264. BEGIN
  2265. SCANK = PACKW[K];
  2266. SCANV = PACKW[K+1];
  2267. FILL55(SCANV);
  2268. FILL55(SCANK);
  2269. FOR I=1 STEP 1 UNTIL NUMKWDS DO #FIND KEYWORD MATCH #
  2270. IF KWORD[I] EQ SCANK
  2271. THEN
  2272. GOTO KEYWORD[I];
  2273.  
  2274. IF SCANK EQ SPACES #END OF CFO COMMAND FOUND #
  2275. THEN
  2276. BEGIN
  2277. UPCFLAG = FALSE;
  2278. TEST K;
  2279. END
  2280.  
  2281. #FALL THRU TO HERE ON NO MATCH #
  2282. KWTEST: #TEST NOT ALLOWED AS CFO COMMAND#
  2283. OPMSG[0] = " ILLEGAL KEYWORD = ";
  2284. OPMSG[2] = SCANK;
  2285. SHOTERM (LOC(OPMSG[0]),3,TRUE);
  2286. OPMSGZB[3] = 0;
  2287. SENDMSG;
  2288. IERROR = TRUE;
  2289. GOTO ENDLOOP;
  2290.  
  2291. KWGO: #GO #
  2292. AUTO$GO = TRUE;
  2293. GOTO ENDLOOP;
  2294.  
  2295. KWMFN: #MFN = #
  2296. KWPW: #PW = #
  2297. KWUN: #UN = #
  2298. NEWMAST (SCANK,SCANV);
  2299. GOTO ENDLOOP;
  2300.  
  2301. KWRN: #RN = #
  2302. # BEFORE UPDATING THE RN VALUE IN THE MEMORY FILE, WE WANT TO BE #
  2303. # SURE THAT THE TYPED-IN NAME FOR RN MATCHES ONE OF THE PARAMETER#
  2304. # RECORDS IN THE LATEST MFN FILE. SINCE MFN AND RN MAY BE CHANGED#
  2305. # BY THE SAME COMMAND, WE WILL DEFER THE PROCESSING OF THE RN #
  2306. # PARAMETER UNTIL AFTER THE WHOLE COMMAND IS PROCESS, AND THE NEW#
  2307. # MFN, IF ONE HAS BEEN ENTERED, IS READ. #
  2308.  
  2309. RNCHANGED =TRUE; # REMEMBER TO PROCESS RN PARAM LATER #
  2310. RNVALUE = SCANV; # SAVE THE TYPED-IN RN VALUE #
  2311. GOTO ENDLOOP; # PROCESS NEXT KEYWORD #
  2312.  
  2313. KWRS: #RS = #
  2314. RESTRT = TRUE;
  2315. RSAPPL = SCANV;
  2316. AUTO$GO = TRUE;
  2317. NEWMAST (SCANK,SCANV);
  2318. GOTO ENDLOOP;
  2319.  
  2320. KWOIN: #OIN = #
  2321. CALC$OIN (SCANV,FALSE); #CONVERT OLD INVOCATION NUMBER #
  2322. CALL$OIN = MSTROIN [0]; #STORE OLD INVOCATION NUMBER #
  2323. SCANV = CALL$OIN; # SET UP FOR NEWBASE CALL #
  2324. GOTO ENDLOOP;
  2325.  
  2326. KWOPTION:
  2327. CHECK$OPTION(SCANV);
  2328. CSTAT = 0;
  2329. GOTO ENDLOOP;
  2330.  
  2331. KWSTOP: #STOP #
  2332. KWTERM: #TERM #
  2333. OPTION = OPTTERM;
  2334. GOTO ENDLOOP;
  2335.  
  2336. ENDLOOP:
  2337. IF PACKWE[K] EQ "=" #INCREMENT PARAMETER INDEX #
  2338. THEN
  2339. K = K + 2;
  2340. ELSE
  2341. K = K + 1;
  2342.  
  2343. END
  2344.  
  2345. IF IERROR
  2346. THEN
  2347. AUTO$GO = FALSE; #NO GO YET IF ERRORS FOUND #
  2348.  
  2349. IF OPTION EQ OPTLOAD THEN
  2350. BEGIN
  2351. UPD8MFN;
  2352. PRELOAD;
  2353.  
  2354. IF NOT RNCHANGED THEN
  2355. BEGIN
  2356. # NOTE: IF RN IS ENTERED, WE WILL CALL #
  2357. # DS$DEFAULT AND DFL$RCDS LATER AFTER WE #
  2358. # HAVE UPDATED RN. #
  2359. DS$DEFAULT;
  2360. DFL$RCDS;
  2361. END
  2362. END
  2363.  
  2364. IF RNCHANGED THEN
  2365. BEGIN # PROCESSING RN PARAMETER #
  2366. FOUND = FALSE;
  2367. FOR N=0 STEP 1 WHILE (N LQ LASTENTRY) AND (NOT FOUND) DO
  2368. BEGIN
  2369. IF (DIR$NAME[N] EQ RNVALUE) AND (DIR$TYPE[N] EQ PTYPE) THEN
  2370. BEGIN # THE TYPED-IN RN VALUE IS GOOD #
  2371. FOUND = TRUE;
  2372. RNKEYWORD = "RN";
  2373. NEWMAST (RNKEYWORD,RNVALUE);
  2374. END #IF#
  2375. END #FOR#
  2376.  
  2377. IF N GR LASTENTRY THEN
  2378. BEGIN # NO PARAM RECORD MATCHED THE TYPED-IN RN VALUE #
  2379. AUTO$GO = FALSE; # BAD RN VALUE. DO NOT GO AHEAD #
  2380. OPMSG[0] = " PARAMETER RECORD NOT FOUND :";
  2381. OPMSG1[4] = RNVALUE;
  2382. SHOTERM (LOC(OPMSG[0]),5,TRUE); # ERROR MESSAGE TO TERMINAL #
  2383. OPMSGZB[5] = 0;
  2384. SENDMSG;
  2385. END
  2386. RNCHANGED =FALSE; # RESET RNCHANGED FLAG #
  2387. DS$DEFAULT; # DISPLAY CURRENT DEFAULT PARAMETER VALUES #
  2388. DFL$RCDS; # DISPLAY PARAMETER/JOB RECORD NAMES #
  2389. END # PROCESSING RN PARAMETER#
  2390.  
  2391. END #NEWBASE#
  2392. CONTROL EJECT;
  2393.  
  2394. #
  2395.  *
  2396.  * PROC DSPLAY$LIN
  2397.  *
  2398.  * CALLED FROM DISPLAY$L
  2399.  *
  2400.  * DSPLAY$LIN IS RESPONSIBLE FOR DETERMINING WHETHER OR NOT THE
  2401.  * CURRENT LINE OF DATA IN THE K/L-DISPLAY BUFFER IS TO BE SENT
  2402.  * TO THE TERMINAL. THIS IS PRIMARILY USED FOR TESTING.
  2403.  *
  2404.  * CALLS SHOTERM
  2405.  *
  2406. #
  2407.  
  2408. PROC DSPLAY$LIN;
  2409.  
  2410. BEGIN
  2411.  
  2412. ITEM NO$DISP B;
  2413.  
  2414. DLNUM1 = XCDD(INDX1*10000000);
  2415. IF DLNUM2 EQ " " THEN DLNUM2 = " 0";
  2416. K = (WORDCNT + 1) * 10;
  2417. C<0,K>DATALN = C<0,K>LINX1A[0];
  2418. IF (LINX[1] EQ SPACES) AND (LINX[2] EQ SPACES)
  2419. THEN SKPLNS = SKPLNS +1;
  2420. ELSE SKPLNS = 0;
  2421.  
  2422. NO$DISP = FALSE;
  2423. IF (NOT DSPLYMODE) THEN NO$DISP = TRUE;
  2424. IF (NXT2LOD NQ 0) AND (TBLPTR EQ DISPJBS) THEN NO$DISP = TRUE;
  2425. IF (NXT2LOD NQ 0) AND (TBLPTR EQ DISPOPT) THEN NO$DISP = TRUE;
  2426. IF SKPLNS GQ 2 THEN NO$DISP = TRUE;
  2427. IF TBLPTR EQ DISPZRO THEN NO$DISP = TRUE;
  2428. IF (OPTION EQ OPTSAVE) THEN NO$DISP = TRUE;
  2429. IF ((OPTION EQ OPTLOAD) AND (TBLPTR EQ DISPCCB))
  2430. THEN NO$DISP = TRUE;
  2431.  
  2432. IF (NOT NO$DISP) THEN
  2433. BEGIN
  2434. IF (NOT DISEND) THEN SHOTERM (LOC(DATALN), WORDCNT+1, FALSE);
  2435. ELSE SHOTERM (LOC(DATALN), WORDCNT+1, TRUE);
  2436. END
  2437.  
  2438. END #DSPLAY$LIN#
  2439.  
  2440. CONTROL EJECT;
  2441.  
  2442. #
  2443.  * PROC DISPLAY$L
  2444. #
  2445.  
  2446. PROC DISPLAY$L;
  2447.  
  2448. BEGIN
  2449.  
  2450. P<MSGTBL> = TADR[TBLPTR];
  2451. DISEND = FALSE;
  2452. INDX3 = 0;
  2453.  
  2454. FOR INDX1 = 0 STEP 1 WHILE NOT DISEND DO
  2455. BEGIN #DISPLAY LOOP#
  2456.  
  2457. INDX2 = INDX3;
  2458. EXTRACT (INDX2, WORDCNT, INDX3);
  2459.  
  2460. FOR N = 0 STEP 1 UNTIL 8 DO
  2461. LINX[9-N] = LINX[8-N];
  2462. LINX[0] = CHX[INDX2];
  2463.  
  2464. FOR K = 0 STEP 1 UNTIL 5 DO
  2465. C<K,1>LINX[0] = " ";
  2466.  
  2467. IF WORDCNT EQ 0 THEN
  2468. BEGIN
  2469. LINX[0] = SPACES;
  2470. LINX[1] = SPACES;
  2471. LINX[2] = " -DISEND- ";
  2472. DISEND = TRUE;
  2473. WORDCNT = 2;
  2474. END
  2475.  
  2476.  
  2477. DSPLAY$LIN;
  2478.  
  2479.  
  2480. END #DISPLAY LOOP#
  2481.  
  2482. END #DISPLAY$L#
  2483. CONTROL EJECT;
  2484.  
  2485. #
  2486.  *
  2487.  * PROC SELJOB$LOD
  2488.  *
  2489.  * CALLED FROM OPTIONLOOP
  2490.  *
  2491.  * WHEREIN WE SELECT WHICH PARAMETER OR JOB RECORD WE NEED FROM
  2492.  * THE NETWORK CCL FILE (LFN=INFIL). DURING THIS PROCESS, WE
  2493.  * ALSO CHECK FOR THE OPERATOR ENTERING NEW CCL FILE PARAMETERS
  2494.  * (EG., NAME, USER NUMBER, ETC.) AND SET UP TO USE A NEW CCL
  2495.  * FILE IF NECESSARY.
  2496.  *
  2497.  * TWO TYPES OF RECORDS MAY BE SELECTED - PARAMETER RECORDS AND
  2498.  * JOB RECORDS. PARAMETER RECORDS CONTAIN SUBSTITUTABLE PARAMETERS
  2499.  * FOR THE JOB CCL STATEMENTS, AS WELL AS A LIST OF WHICH JOB
  2500.  * RECORDS ARE TO BE LOADED. JOB RECORDS ARE JUST THAT- CCL
  2501.  * STATEMENTS FOR AN INDIVIDUAL JOB WHICH WILL BE ROUTED TO THE
  2502.  * INPUT QUEUE.
  2503.  *
  2504.  * THIS ROUTINE IS ALSO ENTERED DURING AUTOMATIC MODE. IF A PARAMETER
  2505.  * RECORD WITH A LIST OF JOBS WAS SELECTED, WE ENTER THIS AUTO
  2506.  * MODE AND RUN THROUGH THE VARIOUS ROUTINES REQUIRED TO PREPARE THE
  2507.  * JOB TO BE SENT TO THE INPUT QUEUE FOR EACH JOB IN THE LIST. THIS
  2508.  * DOES NOT REQUIRE OPERATOR INTERVENTION, HENCE, THE AUTO MODE.
  2509.  *
  2510.  * CALLS DFL$RCDS, DISPLAY$L, READ$CFO, KEYLINE, NEWBASE, CSCAN
  2511.  * CLR$OPMSG, SENDMSG, SHOTERM, UPD8MFN, FILL55
  2512.  *
  2513. #
  2514.  
  2515. PROC SELJOB$LOD;
  2516.  
  2517. BEGIN
  2518. SJL$SEARCH:
  2519. IF JOBINDX EQ 0 THEN
  2520. BEGIN
  2521. JOBNAME = SPACES;
  2522. ROUTNAM = "ROUTFIL";
  2523. CTLJOB = FALSE;
  2524. RUNJOB = FALSE;
  2525. IF NXT2LOD EQ 0 THEN
  2526. BEGIN
  2527. TBLPTR = DISPJBS;
  2528. DFL$RCDS;
  2529. FOR CSTAT = 2 WHILE CSTAT NQ 0 DO
  2530. BEGIN
  2531. CSTAT = 2;
  2532. IF AUTO$GO THEN DS$DEFAULT;
  2533. IF AUTO$GO THEN CMSG80[0] = "GO. ";
  2534. ELSE READ$CFO;
  2535. LIN80[0] = CMSG80[0];
  2536. IF KEYLINE THEN
  2537. BEGIN
  2538. CSTAT = 2;
  2539. NEWBASE;
  2540. END
  2541. ELSE CSTAT = 0;
  2542. IF C<0,4>CMSG80[0] EQ "TERM" THEN OPTION = OPTTERM;
  2543. IF C<0,4>CMSG80[0] EQ "STOP" THEN OPTION = OPTTERM;
  2544. END
  2545. END
  2546. ELSE
  2547. BEGIN
  2548. JOBNAME = JBL1[NXT2LOD-1]; #JOB RECORD NAME#
  2549. ROUTNAM = JBL2[NXT2LOD-1]; #ROUTE AND PRODUCT NAME#
  2550. SUBSYSNAM = JBL3[NXT2LOD-1]; #SUBSYSTEM NAME#
  2551. ROUTYPE = 0;
  2552. IF SUBSYSNAM NQ SPACES THEN ROUTYPE = 1;
  2553. IF SUBSYSNAM NQ SPACES THEN ROUTNAM = SUBSYSNAM;
  2554. JOBOT = JBL3OT[NXT2LOD-1]; # JOB OT #
  2555. JOBSC = JBL3SC[NXT2LOD-1]; # JOB SC #
  2556. JOBINDX = NXT2LOD + CTLRCDS;
  2557. NXT2LOD = NXT2LOD +1;
  2558. RUNJOB = TRUE;
  2559. END
  2560.  
  2561. CONTROL EJECT;
  2562.  
  2563. IF (JOBINDX EQ 0) AND (OPTION EQ OPTLOAD) THEN
  2564. BEGIN
  2565. PACK80 = CMSG80[0];
  2566. SETUPC;
  2567. JOBNAME = PACKW[0];
  2568. FILL55 (JOBNAME);
  2569. IF JOBNAME EQ "GO" #GO #
  2570. AND PACKZW[1] EQ 0 # ALONE IN CFO COMMAND #
  2571. THEN
  2572. AUTO$GO = TRUE;
  2573. IF AUTO$GO THEN JOBNAME = XSFW(MSTRRN[0]);
  2574. FOR K = 0 STEP 1 WHILE JOBINDX EQ 0 DO
  2575. BEGIN
  2576. IF DIR$NAME[K] EQ SPACES THEN
  2577. BEGIN
  2578. CLR$OPMSG;
  2579. OPMSG[0] = " ------- INVALID SELECTION";
  2580. OPMSGZB[3] = 0;
  2581. SENDMSG;
  2582. SHOTERM (LOC(OPMSG[0]), 3, TRUE);
  2583. AUTO$GO = FALSE;
  2584. GOTO SJL$SEARCH;
  2585. END
  2586. IF DIR$NAME[K] EQ JOBNAME THEN JOBINDX = K + 1;
  2587. IF (NOT TESTING) AND (NOT AUTO$GO) THEN JOBINDX = 0;
  2588. END
  2589. IF DIR$TYPE[JOBINDX-1] EQ PTYPE THEN CTLJOB = TRUE;
  2590. IF DIR$TYPE[JOBINDX-1] EQ JTYPE THEN RUNJOB = TRUE;
  2591. IF RUNJOB THEN ROUTNAM = JOBNAME;
  2592. END
  2593.  
  2594. IF OPTION EQ OPTLOAD THEN TBLPTR = DISPCCB;
  2595. IF CTLJOB THEN NXT2LOD = 1;
  2596. IF CTLJOB THEN MSTRRN[0] = JOBNAME;
  2597. IF CTLJOB THEN UPD8MFN;
  2598. END
  2599.  
  2600. ELSE
  2601. BEGIN
  2602. FLS2 = JOBNAME;
  2603. SHOTERM (LOC(FLS0), 4, TRUE);
  2604. OPTION = OPTDISP;
  2605. TBLPTR = DISPOPT;
  2606. NEED$OPRES = TRUE; #$$$#
  2607. JOBINDX = 0;
  2608. END
  2609.  
  2610. END #SELJOB$LOD#
  2611.  
  2612. CONTROL EJECT;
  2613.  
  2614. #
  2615.  *
  2616.  * PROC SELJOB$SAVE
  2617.  *
  2618.  * CALLED FROM OPTIONLOOP
  2619.  *
  2620.  * THIS IS THE CLEAN-UP ROUTINE FOR SAVING A JCL RECORD. IT IS
  2621.  * CALLED AFTER THE JOB CCL STATEMENTS HAVE BEEN WRITTEN TO THE
  2622.  * ROUTE FILE, AND SETS SEVERAL FLAGS FOR LATER PROCESSING.
  2623.  *
  2624.  * CALLS SHOTERM
  2625.  *
  2626. #
  2627.  
  2628. PROC SELJOB$SAVE;
  2629.  
  2630. BEGIN
  2631.  
  2632. IF RUNJOB THEN
  2633. BEGIN
  2634. SHOTERM (LOC(FSV0), 4, TRUE);
  2635. IF AUTO$GO THEN RDY$4$ROUT = TRUE;
  2636. END
  2637. OPTION = OPTDISP;
  2638. TBLPTR = DISPOPT;
  2639. NEED$OPRES = TRUE; #$$$#
  2640.  
  2641. END #SELJOB$SAVE#
  2642. CONTROL EJECT;
  2643.  
  2644. #
  2645.  *
  2646.  * PROC SELJOB$ROUTE
  2647.  *
  2648.  * CALLED FROM OPTIONLOOP
  2649.  *
  2650.  * THIS IS THE CLEAN-UP ROUTINE FOR ROUTING A JOB TO THE
  2651.  * INPUT QUEUE. WHEN CALLED, THE JOB NAME IS ENTERED INTO A
  2652.  * TABLE (IN COMMON AREA ROUTABL) WHICH IS CHECKED AT THE
  2653.  * TERMINATION OF THE PROGRAM AT WHICH TIME THE FILES ARE
  2654.  * ACTUALLY ROUTED TO THE INPUT QUEUE.
  2655.  *
  2656. #
  2657.  
  2658. PROC SELJOB$ROUTE;
  2659.  
  2660. BEGIN
  2661.  
  2662. ITEM TEMPR C(10);
  2663.  
  2664. TEMPR = ROUTNAM;
  2665. IF (ROUTYPE EQ 1) AND (SUBSYSNAM NQ SPACES)
  2666. THEN ROUTNAM = C<0,9>SUBSYSNAM;
  2667.  
  2668. ROUTCOD = 0;
  2669. FOR N = 0 STEP 1 WHILE ROUTCOD EQ 0 DO
  2670. BEGIN
  2671. IF RTFN[N] EQ SPACES THEN
  2672. BEGIN
  2673. FILL55 (ROUTNAM);
  2674. RTFN[N] = ROUTNAM;
  2675. RTFNCD[N] = ROUTYPE;
  2676. RTFNOT[N] = JOBOT;
  2677. RTFNSC[N] = JOBSC;
  2678. END
  2679. IF RTFN[N] EQ ROUTNAM THEN ROUTCOD = 1;
  2680. END
  2681. ROUTNAM = TEMPR;
  2682. IF RT$IMMED THEN ROUT$FILES;
  2683. OPTION = OPTDISP;
  2684. TBLPTR = DISPOPT;
  2685. NEED$OPRES = TRUE; #$$$#
  2686.  
  2687. END #SELJOB$ROUTE#
  2688.  
  2689. CONTROL EJECT;
  2690.  
  2691. #
  2692.  *
  2693.  * PROC RLOD$DISP
  2694.  *
  2695.  * CALLED FROM LOAD$JOB, SELJOB$MODIFY
  2696.  *
  2697.  * THE CCL JOB SELECTED BY THE OPERATOR IS SCANNED FOR THOSE
  2698.  * LINES WHICH ARE PROBABLY CANDIDATES FOR VALUE MODIFICATION.
  2699.  * THESE LINES ARE MOVED TO THE K/L-DISPLAY BUFFER.
  2700.  *
  2701.  * CALLS KEYLINE, INTRACT
  2702.  *
  2703. #
  2704.  
  2705. PROC RLOD$DISP;
  2706.  
  2707. BEGIN
  2708.  
  2709. J1 = CWC[0];
  2710. N = 0;
  2711. FOR INDX1 = 0 STEP 1 UNTIL INDXC DO
  2712. BEGIN
  2713. LIN80[0] = CCLE[INDX1];
  2714. IF KEYLINE THEN
  2715. BEGIN
  2716. INTRACT (J1, N);
  2717. J1 = N;
  2718. END
  2719. END
  2720.  
  2721. END #RLOD$DISP#
  2722. CONTROL EJECT;
  2723. #
  2724.  *
  2725.  * PROC SCAN$CCLS
  2726.  *
  2727.  * CALLED FROM LOAD$JOB, SELJOB$MODIFY
  2728.  *
  2729.  * GIVEN A LINE OF KEY=VAL PAIRS, THIS ROUTINE CHECKS EACH
  2730.  * LINE IN THE JOB CCL BUFFER AND MAKES ALL THE INDICATED
  2731.  * CHANGES. THAT IS, THE BUFFER IS SEARCHED FOR ALL OCCURANCES
  2732.  * OF -KEY- AND THESE OCCURANCES ARE REPLACED BY -VAL-.
  2733.  *
  2734.  * CALLS CSCAN, GNXT$CCL
  2735.  *
  2736. #
  2737.  
  2738. PROC SCAN$CCLS;
  2739.  
  2740. BEGIN
  2741.  
  2742. PACK80 = CMSG80[0];
  2743. SETUPC;
  2744. N2 = 1;
  2745. REPSIZ[INDXR+N2] = 0;
  2746. FOR K = 0 STEP 2 WHILE PACKZW[K] NQ 0 DO
  2747. BEGIN
  2748. REPKEY[INDXR+N2] = PACKW[K];
  2749. REPVAL[INDXR+N2] = PACKW[K+1];
  2750. REPSIZ[INDXR+N2] = 1;
  2751. REPSIZ[INDXR+N2+1] = 0;
  2752. N2 = N2 + 1;
  2753. END
  2754. FOR INDX1= 0 STEP 1 WHILE INDX1 LQ INDXC DO
  2755. BEGIN
  2756. PACK80 = CCLE[INDX1];
  2757. SETUPC;
  2758. UPCFLAG = FALSE;
  2759. FOR N1 = (INDXR+1) STEP 1 WHILE REPSIZ[N1] NQ 0 DO
  2760. BEGIN
  2761. FOR K = 0 STEP 1 WHILE C<0,1>PACKW[K] NQ 0 DO
  2762. BEGIN
  2763. IF C<0,7>PACKW[K] EQ C<0,7>REPKEY[N1] THEN
  2764. BEGIN
  2765. C<0,7>PACKW[K] = C<0,7>REPVAL[N1];
  2766. UPCFLAG = TRUE;
  2767. END
  2768. END
  2769. END
  2770. IF UPCFLAG THEN REPACK;
  2771. IF UPCFLAG THEN CCLE[INDX1] = PACK80;
  2772. END
  2773. END #SCAN$CCLS#
  2774. CONTROL EJECT;
  2775.  
  2776. PROC REPACK;
  2777.  
  2778. BEGIN
  2779.  
  2780. ITEM MORE2DO B;
  2781. ITEM K1 I;
  2782. ITEM K2 I;
  2783. ITEM K3 I;
  2784.  
  2785. PACK80 = SPACES;
  2786. MORE2DO = TRUE;
  2787. K1 = 0;
  2788. FOR K2 = 0 STEP 1 WHILE MORE2DO DO
  2789. BEGIN
  2790. EDITX = PACKW[K2];
  2791. FOR K3 = 0 STEP 1 UNTIL 6 DO
  2792. BEGIN
  2793. IF C<K3,1>EDITX NQ 0 THEN
  2794. BEGIN
  2795. C<K1,1>PACK80 = C<K3,1>EDITX;
  2796. K1 = K1 +1;
  2797. END
  2798. END
  2799. IF C<9,1>EDITX EQ 0 THEN C<K1,1>PACK80 = " ";
  2800. ELSE IF C<9,1>EDITX NQ "_"
  2801. THEN C<K1,1>PACK80 = C<9,1>EDITX;
  2802. IF PACKZW[K2+1] EQ 0 THEN MORE2DO = FALSE;
  2803. IF C<9,1>EDITX NQ "_" THEN K1 = K1 +1;
  2804. END
  2805. END #REPACK LINE#
  2806.  
  2807. CONTROL EJECT;
  2808.  
  2809. #
  2810.  * PROC SCAN2$CCLS
  2811. #
  2812. PROC SCAN2$CCLS;
  2813.  
  2814. BEGIN
  2815.  
  2816. ITEM INDX I;
  2817.  
  2818. FOR INDX = 0 STEP 1 WHILE INDX LQ INDXC DO
  2819. BEGIN
  2820. PACK80 = CCLE[INDX];
  2821. SETUPC;
  2822. UPCFLAG = FALSE;
  2823. FOR N1 = 0 STEP 1 WHILE REPSIZ[N1] NQ 0 DO
  2824. BEGIN
  2825. FOR K = 0 STEP 1 WHILE PACKZW[K] NQ 0 DO
  2826. BEGIN
  2827. IF C<0,7>PACKW[K] EQ C<0,7>REPKEY[N1] THEN
  2828. BEGIN
  2829. C<0,7>PACKW[K] = C<0,7>REPVAL[N1];
  2830. UPCFLAG = TRUE;
  2831. END
  2832. END
  2833. END
  2834. IF UPCFLAG THEN REPACK;
  2835. IF UPCFLAG THEN CCLE[INDX] = PACK80;
  2836. END
  2837.  
  2838. END #SCAN2$CCLS#
  2839.  
  2840. CONTROL EJECT;
  2841. PROC FINDJRC;
  2842.  
  2843. BEGIN
  2844.  
  2845. ITEM I; # INDEX VARIABLE #
  2846.  
  2847. # SEARCH FOR JOB RECORD #
  2848.  
  2849.  
  2850. DONE = FALSE;
  2851. JOBFOUND = FALSE;
  2852. FOR I = 0 STEP 1 WHILE NOT DONE
  2853. DO
  2854. BEGIN
  2855. IF DIR$NAME[I] EQ SPACES
  2856. THEN
  2857. DONE = TRUE;
  2858. ELSE IF DIR$NAME[I] EQ JBNAME
  2859. THEN
  2860. BEGIN
  2861. JOBFOUND = TRUE;
  2862. DONE = TRUE;
  2863. END
  2864. END
  2865.  
  2866. END
  2867. CONTROL EJECT;
  2868. PROC JNOTF;
  2869.  
  2870. # CALLED WHEN JOB RECORD NOT FOUND #
  2871.  
  2872. BEGIN
  2873.  
  2874. RDY$2$ROUT = FALSE;
  2875. CLR$OPMSG;
  2876. OPMSG[0] = " RECORD NOT FOUND - ";
  2877. OPMSG[2] = JBNAME;
  2878. OPMSGZB[3] = 0;
  2879. SENDMSG;
  2880. SHOTERM(LOC(OPMSG[0]),5,TRUE);
  2881. JOBINDX = 0;
  2882. OPTION = OPTTERM;
  2883. TBLPTR = DISPOPT;
  2884. NXT2LOD = 0;
  2885. NETINCR[0] = 0;
  2886. UPD8NIN;
  2887. NEED$OPRES = TRUE;
  2888. RETURN;
  2889. END
  2890. CONTROL EJECT;
  2891. #
  2892.  *
  2893.  * PROC LOAD$JOB
  2894.  *
  2895.  * CALLED FROM OPTIONLOOP
  2896.  *
  2897.  * GIVEN A PARTICUAR JOBNAME (IN THE VARIABLE OF THE SAME NAME),
  2898.  * THIS ROUTINE EFFECTS THE SEARCH THROUGH THE NETWORK CCL FILE
  2899.  * AND LOADS THE CCL BUFFER WITH THE JOB.
  2900.  *
  2901.  * IF THE SELECTED RECORD IS A PARAMETER RECORD, THE JOB EXTRACTION
  2902.  * TABLE IS SET UP FOR ADDITIONAL PASSES THROUGH OUR SYSTEM.
  2903.  *
  2904.  * CALLS FIND$JOB, GETLINE, PRLDNIN, CSCAN, FILL55, SCAN$CCLS
  2905.  * RLOD$DISP.
  2906.  *
  2907. #
  2908.  
  2909. PROC LOAD$JOB;
  2910.  
  2911. BEGIN
  2912.  
  2913. TBLPTR = DISPCCB;
  2914. P<MSGTBL> = TADR[TBLPTR];
  2915. FIRST = TRUE;
  2916. INDXC = -1;
  2917. # CLRTABLE CALL HERE #
  2918. FOR IOCMP = 0 WHILE IOCMP EQ 0 DO
  2919. BEGIN
  2920. IF FIRST THEN
  2921. BEGIN
  2922. FIND$JOB;
  2923. LINX[IOCNT-1] = XSFW(LINX[IOCNT-1]);
  2924. IF C<0,2>LINX[0] NQ ".*" THEN INDXC = INDXC + 1;
  2925. IF C<0,2>LINX[0] NQ ".*" THEN CCLE[INDXC] = LIN80[0];
  2926. MODFYNDX = 0;
  2927. IOCMP = 0;
  2928. LDF2 = JOBNAME;
  2929. OPMSG[0] = LDF;
  2930. OPMSGZB[3] = 0;
  2931. SHOTERM (LOC(DATALNS), 4, TRUE);
  2932. SENDMSG;
  2933. FIRST = FALSE;
  2934. END
  2935. ELSE
  2936. BEGIN #NOT FIRST#
  2937. IOCNT = 8;
  2938. IOFWA = LOC(LINX[0]);
  2939. FOR J2 = 0 STEP 1 UNTIL 9 DO
  2940. LINX[J2] = SPACES;
  2941. GETLINE;
  2942. IF (LIN6[0] EQ "TITLE(") THEN IOCMP = EOR;
  2943. IF IOCMP EQ 0 THEN
  2944. BEGIN
  2945. LINX[IOCNT-1] = XSFW(LINX[IOCNT-1]);
  2946. IF C<0,2>LINX[0] NQ ".*" THEN INDXC = INDXC + 1;
  2947. IF C<0,2>LINX[0] NQ ".*" THEN CCLE[INDXC] = LIN80[0];
  2948. END
  2949. END
  2950. END
  2951.  
  2952. IF CTLJOB THEN
  2953. BEGIN
  2954. EDITX = NETINVN[0];
  2955. PRLDNIN;
  2956. INV$INCR = FALSE; # ASSUME NIP NOT IN JOB LIST #
  2957. NET$START = FALSE; # AND NOT NETWORK STARTUP #
  2958. UPIX = -1;
  2959. INDXR = -1;
  2960. J3 = 0;
  2961. FOR J2 = 0 STEP 1 WHILE J2 LQ INDXC DO
  2962. BEGIN
  2963. PACK80 = CCLE[J2];
  2964. FOR K = 0 STEP 1
  2965. WHILE C<K,1>PACK80 NQ C<0,1>PACKEND DO
  2966. BEGIN
  2967. IF (C<K,1>PACK80 EQ ")") OR
  2968. (C<K,1>PACK80 EQ ".") THEN
  2969. C<K+1,1>PACK80 = C<0,1>PACKEND;
  2970. END
  2971. SETUPC;
  2972. IF UPCSTAT NQ 0 # IF ANY INVALID PARAMETER(S) FOUND #
  2973. THEN ABORTRUN (101);
  2974. IF C<0,3>PACKW[0] EQ "JOB" THEN
  2975. BEGIN
  2976. IF J3 GQ 200 THEN ABORTRUN(2);
  2977. SCANK = PACKW[1];
  2978. SCANV = PACKW[2];
  2979. JOBDI = FALSE;
  2980. IF (C<0,2>PACKW[3] EQ "DI" OR
  2981. C<0,2>PACKW[4] EQ "DI")
  2982. THEN
  2983. JOBDI = TRUE;
  2984. IF (RESTRT AND C<0,2>RSAPPL EQ C<0,2>PACKW[2])
  2985. OR (NOT JOBDI AND NOT RESTRT)
  2986. THEN
  2987. BEGIN
  2988. FILL55 (SCANK);
  2989. JBNAME = SCANK;
  2990. JBL1[J3] = SCANK; # JOB NAME #
  2991. JBL2[J3] = SCANV; # ROUTE AND PRODUCT NAME #
  2992. IF C<0,2>SCANV EQ "NI" THEN INV$INCR = TRUE;
  2993. IF C<0,2>SCANV EQ "NI" THEN NET$START = TRUE;
  2994. IF C<0,2>PACKW[2] EQ C<0,2>PACKW[3] # SUBSYSTEM #
  2995. THEN BEGIN # PARAM IS SUBSYSTEM ID #
  2996. JBL3[J3] = PACKW[3];
  2997. PAKWPTR = 4;
  2998. END
  2999. ELSE PAKWPTR = 3;
  3000. IF JOBDI
  3001. THEN PAKWPTR = PAKWPTR+1;
  3002. JOBOT = 0; # DEFAULT TO SY #
  3003. JOBSC = 0; # DEFAULT TO DEFAULT #
  3004. IF PAKWPTR LS UPCOUNT # CHECK OT #
  3005. THEN BEGIN
  3006. IF C<0,2>PACKW[PAKWPTR] EQ "SY"
  3007. THEN JOBOT = 1;
  3008. ELSE IF C<0,2>PACKW[PAKWPTR] EQ "BC"
  3009. THEN JOBOT = 2;
  3010. IF JOBOT EQ 0 # INVALID OT #
  3011. THEN ABORTRUN (102);
  3012. JOBOT = JOBOT-1;
  3013. PAKWPTR = PAKWPTR+1;
  3014. END
  3015. IF PAKWPTR LS UPCOUNT # CHECK SC #
  3016. THEN BEGIN
  3017. IF C<0,2>PACKW[PAKWPTR] EQ "SY"
  3018. THEN JOBSC = 1;
  3019. ELSE IF C<0,2>PACKW[PAKWPTR] EQ "BC"
  3020. THEN JOBSC = 2;
  3021. ELSE IF C<0,2>PACKW[PAKWPTR] EQ "NS"
  3022. THEN JOBSC = 3;
  3023. IF JOBSC EQ 0 # INVALID SC #
  3024. THEN ABORTRUN (103);
  3025. IF JOBOT EQ 1 # OT EQ BC #
  3026. AND JOBSC NQ 2 # SC NQ BC #
  3027. THEN ABORTRUN (104);
  3028. PAKWPTR = PAKWPTR+1;
  3029. END
  3030. JBL3OT[J3] = JOBOT;
  3031. JBL3SC[J3] = JOBSC;
  3032. IF PAKWPTR LS UPCOUNT # CHECK FOR EXTRA PARAMS #
  3033. THEN BEGIN
  3034. CLR$OPMSG;
  3035. OPMSG[0] =
  3036. "WARNING - UNRECOGNIZED EXTRA PARAMETER(S)";
  3037. OPMSGZB[7] = 0;
  3038. SHOTERM (LOC (OPMSG[0]),8,FALSE);
  3039. SENDMSG;
  3040. CLR$OPMSG;
  3041. FOR K = 0 STEP 1
  3042. WHILE C<K,1>PACK80 NQ C<0,1>PACKEND DO
  3043. C<K,1>OPMSG[0] = C<K,1>PACK80;
  3044. OPMSGZB[7] = 0;
  3045. SHOTERM (LOC (OPMSG[0]),8,TRUE);
  3046. SENDMSG;
  3047. END
  3048. J3 = J3 +1;
  3049. JBL1[J3] = SPACES;
  3050. JBL2[J3] = SPACES;
  3051. JBL3[J3] = SPACES;
  3052. IF RESTRT
  3053. THEN
  3054. APFOUND = TRUE;
  3055. END
  3056. END
  3057. ELSE IF C<0,5>PACKW[0] EQ "PARAM" THEN #PARAM RECORD#
  3058. BEGIN
  3059. UPIX = UPIX +1;
  3060. IF UPIX GQ 40 THEN ABORTRUN(3);
  3061. UPARAM[UPIX] = CCLE[J2];
  3062. FOR K = 1 STEP 2 WHILE C<0,1>PACKW[K] NQ 0 DO
  3063. BEGIN
  3064. INDXR = INDXR +1;
  3065. IF INDXR GQ 200 THEN ABORTRUN(4);
  3066. REPKEY[INDXR] = PACKW[K];
  3067. REPVAL[INDXR] = PACKW[K+1];
  3068. REPSIZ[INDXR] = 1;
  3069. REPSIZ[INDXR+1] = 0;
  3070. END
  3071. END
  3072. END
  3073. END
  3074. IF RESTRT AND NOT APFOUND AND CTLJOB
  3075. THEN
  3076. BEGIN # APPL JOB RECORD NOT FOUND #
  3077. C<0,3>JBNAME = "JOB"; # PUT THE RESTART RECORD NAME INTO#
  3078. C<3,7>JBNAME = RSAPPL; # JBNAME SO THAT JNOTF CAN USE IT #
  3079. JNOTF;
  3080. RETURN;
  3081. END
  3082. IF RESTRT AND APFOUND AND CTLJOB
  3083. THEN # APPL JOB RECORD FOUND IN PARAM RECORD #
  3084. BEGIN # CHECK IF JOB RECORD EXISTS #
  3085. FINDJRC;
  3086. APFOUND = FALSE;
  3087. IF NOT JOBFOUND
  3088. THEN
  3089. BEGIN
  3090. JNOTF;
  3091. RETURN;
  3092. END
  3093. END
  3094. CONTROL EJECT;
  3095.  
  3096. IF RUNJOB THEN
  3097. BEGIN
  3098. EDITX = ROUTNAM; #ROUTE AND PRODUCT NAME#
  3099. LIN4SCAN = NCOM80[0];
  3100. FOR J2 = 0 STEP 1 UNTIL 178 DO
  3101. BEGIN #SUBSTITUTE JOB ID IN KEYWORDS#
  3102. IF C<J2,2>LIN4SCAN EQ "ZZ" THEN
  3103. C<J2,2>LIN4SCAN = C<0,2>EDITX;
  3104. END
  3105. FOR J2 = 0 STEP 1 UNTIL 178 DO
  3106. BEGIN #SUBSTITUTE NETINV IN FILE NAMES#
  3107. IF C<J2,3>LIN4SCAN EQ C<0,3>NETINVN[0] THEN
  3108. C<J2,3>LIN4SCAN = C<4,3>NETINVN[0];
  3109. END
  3110. C<0,80>PACK80 = C<0,80>LIN4SCAN;
  3111. C<0,100>PACK160 = C<80,100>LIN4SCAN;
  3112. SETUPC2;
  3113. IF XSFW(MSTRUN[0]) NQ SPACES THEN PACKW[4] = MSTRUN[0];
  3114. PACKW[6] = MSTRPW[0];
  3115. PACKW[8] = MSTROIN[0];
  3116. PACKW[8] = STRIPSP(PACKW[8]);
  3117. N2 = 1;
  3118. FOR K = 1 STEP 2 WHILE C<0,1>PACKW[K] NQ 0 DO
  3119. BEGIN
  3120. IF (INDXR+N2) GQ 200 THEN ABORTRUN(5);
  3121. REPKEY[INDXR+N2] = PACKW[K];
  3122. REPVAL[INDXR+N2] = PACKW[K+1];
  3123. REPSIZ[INDXR+N2] = 1;
  3124. REPSIZ[INDXR+N2+1] = 0;
  3125. N2 = N2 + 1;
  3126. END
  3127. SCAN2$CCLS;
  3128. END
  3129.  
  3130. RDY$2$ROUT = TRUE;
  3131. IOFLG = OPTLOAD;
  3132.  
  3133. IF INDXC LQ 1 THEN # RECORD NOT FOUND #
  3134. BEGIN
  3135. RDY$2$ROUT = FALSE;
  3136. CLR$OPMSG;
  3137. OPMSG[0] = " RECORD NOT FOUND - ";
  3138. OPMSG[2] = JOBNAME;
  3139. OPMSGZB[3] = 0;
  3140. SENDMSG;
  3141. JOBINDX = 0;
  3142. OPTION = OPTDISP; # SET FOR NEXT SELECTION #
  3143. TBLPTR = DISPOPT;
  3144. NEED$OPRES = TRUE;
  3145. END
  3146.  
  3147. END #LOAD$JOB #
  3148.  
  3149. CONTROL EJECT;
  3150.  
  3151. #
  3152.  *
  3153.  * PROC SAVE$JOB
  3154.  *
  3155.  * CALLED FROM OPTIONLOOP
  3156.  *
  3157.  * THIS ROUTINE LOOPS THROUGH THE CCL BUFFER, WRITING EACH LINE
  3158.  * TO THE ROUTE FILE.
  3159.  *
  3160.  * END OF RECORDS MAY BE WRITTEN AND ARE INDICATED IN THE SOURCE
  3161.  * FILE BY AN EQUAL SIGN (=) IN THE FIRST CHARACTER POSITION
  3162.  * OF THE RECORD.
  3163.  *
  3164.  * CALLS PUTRTO, PUTRTL, PUTRTR, PUTRTC
  3165.  *
  3166. #
  3167.  
  3168. PROC SAVE$JOB;
  3169.  
  3170. BEGIN
  3171.  
  3172. IF IOFLG EQ 0 THEN
  3173. BEGIN
  3174. PUTRTO;
  3175. END
  3176.  
  3177. FOR INDX1 = 0 STEP 1 UNTIL INDXC DO
  3178. BEGIN
  3179. IOFWA = LOC(CCLE[INDX1]);
  3180. IOCNT = 8;
  3181. IF CCL04[INDX1] NQ ".EOR"
  3182. THEN BEGIN
  3183. PUTRTL;
  3184. END
  3185. ELSE BEGIN
  3186. IF CCL04[INDX1] EQ ".EOR"
  3187. THEN BEGIN
  3188. PUTRTR;
  3189. END
  3190. END
  3191. END
  3192.  
  3193. PUTRTR;
  3194.  
  3195. IOFLG = OPTSAVE;
  3196.  
  3197. PUTRTC;
  3198.  
  3199.  
  3200. END # SAVE$JOB #
  3201. CONTROL EJECT;
  3202. #
  3203.  *
  3204.  * PROC SELJOB$MODFY
  3205.  *
  3206.  * CALLED FROM OPTIONLOOP
  3207.  *
  3208.  * IF THE MODIFY OPTION HAS BEEN SELECTED BY THE OPERATOR, WE DISPLAY
  3209.  * THE CCL RECORDS MOST LIKELY TO BE MODIFIED AND ALLOW THE OPERATOR
  3210.  * TO ENTER ONE OR MORE CFO COMMANDS OF THE KEY=VAL VARIETY. AS EACH
  3211.  * OF THESE COMMANDS ARE ENTERED, WE SCAN THE CCL BUFFER AND
  3212.  * PERFORM THE REPLACEMENT DISCUSSED ELSEWHERE (SEE SCAN$CCLS).
  3213.  *
  3214.  * IF THE COMMAND (CFO.GO.) IS ENTERED, THE JOB IS COPIED TO THE ROUTE
  3215.  * FILE AND SENT OFF TO THE INPUT QUEUE WITHOUT FURTHER OPERATOR
  3216.  * INTERVENTION. OTHERWISE, A SINGLE CFO COMMAND WITH NO DATA (CFO. )
  3217.  * WILL TERMINATE THIS PROCESSING AND RETURN THE OPERATOR TO THE
  3218.  * OPTION SELECTION DISPLAY.
  3219.  *
  3220.  * CALLS DISPLAY$L, READ$CFO, SCAN$CCLS, RLOD$DISP, SHOTERM
  3221.  *
  3222. #
  3223.  
  3224. PROC SELJOB$MODFY;
  3225.  
  3226. BEGIN
  3227.  
  3228. ITEM MORE$2$DO B;
  3229.  
  3230. DISPLAY$L;
  3231. RLOD$DISP;
  3232. FOR CSTAT = 1 WHILE CSTAT NQ 0 DO
  3233. BEGIN
  3234. MORE$2$DO = TRUE;
  3235. CSTAT = 4;
  3236. READ$CFO; # -- CONSOLE INPUT -- #
  3237. IF CMESS[0] EQ "END. " THEN CSTAT = 0;
  3238. IF CMESS[0] EQ "GO. " THEN
  3239. BEGIN
  3240. RDY$4$ROUT = TRUE;
  3241. RUNJOB = TRUE;
  3242. CSTAT = 0;
  3243. END
  3244. IF CSTAT EQ 0 THEN MORE$2$DO = FALSE;
  3245.  
  3246. IF MORE$2$DO THEN SCAN$CCLS;
  3247.  
  3248. END #PROCESS CFO LINES (CSTAT NQ 0)#
  3249.  
  3250. RLOD$DISP;
  3251. DISPLAY$L;
  3252. RDY$2$ROUT = TRUE;
  3253. RUNJOB = TRUE;
  3254. DISEND = FALSE;
  3255. OPTION = OPTDISP;
  3256. INDX1 = 0;
  3257. INDX3 = 0;
  3258.  
  3259. SHOTERM (LOC(UPD8M0), 3, TRUE);
  3260.  
  3261. END #SELJOB$MODFY#
  3262. CONTROL EJECT;
  3263. #
  3264.  *
  3265.  * PROC OPTIONLOOP
  3266.  *
  3267.  * CALLED FROM NAMIN
  3268.  *
  3269.  * THE CURRENT DEFAULT PARAMETERS ARE DISPLAYED TO THE OPERATOR
  3270.  * AFTER WHICH THE CURRENT OPTION IS PROCESSED VIA CALLS TO THE
  3271.  * APPROPRIATE PROCESSING ROUTINE. OPTIONS ALLOWED ARE DISPLAY
  3272.  * OF OPTIONS, SELECTION OF PARAMETER OR JOB RECORD, MODIFICATION
  3273.  * OF JOB RECORD, SAVING OF JOB RECORD, ROUTING OF JOB TO INPUT
  3274.  * QUEUE AND TERMINATION OF RUN.
  3275.  *
  3276.  * CALLS DS$DEFAULT, LOAD$JOB, SAVE$JOB, SHOTERM, SELJOB$LOD,
  3277.  * SELJOB$SAVE, SELJOB$ROUTE, SELJOB$MODFY
  3278.  *
  3279. #
  3280.  
  3281. PROC OPTIONLOOP;
  3282.  
  3283. BEGIN
  3284.  
  3285. INDX2 = 0;
  3286. DISEND = FALSE;
  3287. IOFLG = 0;
  3288.  
  3289. IF (NOT AUTO$GO) THEN DS$DEFAULT;
  3290.  
  3291. P<MSGTBL> = TADR[TBLPTR];
  3292.  
  3293.  
  3294.  
  3295. IF (OPTION EQ OPTLOAD) AND (JOBINDX NQ 0) THEN
  3296. BEGIN
  3297. LOAD$JOB;
  3298. END
  3299.  
  3300.  
  3301.  
  3302. IF (OPTION EQ OPTSAVE) AND RUNJOB THEN
  3303. BEGIN
  3304. SAVE$JOB;
  3305. END
  3306.  
  3307. IOFLG = 0;
  3308.  
  3309.  
  3310. CONTROL EJECT;
  3311. # MAIN OPTION LOOP #
  3312.  
  3313.  
  3314. IF OPTION EQ OPTLOAD THEN
  3315. BEGIN
  3316. SELJOB$LOD;
  3317. END
  3318.  
  3319. ELSE IF OPTION EQ OPTSAVE THEN
  3320. BEGIN
  3321. SELJOB$SAVE;
  3322. END
  3323.  
  3324. ELSE IF OPTION EQ OPTSBMT THEN
  3325. BEGIN
  3326. SELJOB$ROUTE;
  3327. END
  3328.  
  3329. ELSE IF OPTION EQ OPTMOD THEN
  3330. BEGIN
  3331. SELJOB$MODFY;
  3332. END
  3333.  
  3334. ELSE
  3335. BEGIN
  3336. TBLPTR = DISPOPT;
  3337. OPTION = OPTDISP;
  3338. NEED$OPRES = TRUE;
  3339. END
  3340.  
  3341.  
  3342. END #OPTIONLOOP#
  3343.  
  3344. CONTROL EJECT;
  3345. #
  3346.  *
  3347.  * NAMI (MAIN PROCESS)
  3348.  *
  3349.  * CALLED FROM SYSTEM LOADER
  3350.  *
  3351.  * THE MAIN PROCESSING LOOP WHEREIN WE INITIALIZE NAMI AND
  3352.  * THEN LOOP BETWEEN GETTING THE NEXT OPERATOR COMMAND (WHICH
  3353.  * CAN BE AUTOMATIC, NOT REQUIRING ACTUAL OPERATOR ACTION)
  3354.  * AND PROCESSING THAT COMMAND.
  3355.  *
  3356.  * UPON RECEIVING THE TERMINATION COMMAND, THE ROUTE-FILE LIST
  3357.  * IS CHECKED AND FILES ROUTED. FOLLOWING CLEAN-UP PROCESSING,
  3358.  * THE JOB IS TERMINATED.
  3359.  *
  3360.  * CALLS SETUP$NAMI, OPTION$LOOP, GET$NXT$OP, OFLUSH, UPD8MFN,
  3361.  * CLO$OP$MSG, ROUT$FILES, SENDMSG
  3362.  *
  3363. #
  3364.  
  3365. OPMSG[0] = JCAOPMSG[0]; #NAMI CALL STATEMENT #
  3366. CLEAR$PW; #CLEAR PASSWORD ON CALL STMT #
  3367. SENDMSG; #WRITE CALL STATEMENT TO DAYFILE#
  3368.  
  3369. CLR$OPMSG;
  3370. OPMSG[0] = IDVERSN;
  3371. SENDMSG;
  3372.  
  3373. SETUP$NAMI;
  3374.  
  3375. FOR OPTION = OPTION WHILE OPTION NQ OPTTERM DO
  3376. BEGIN #MAIN OPTION LOOP#
  3377.  
  3378.  
  3379. OPTIONLOOP;
  3380.  
  3381. IF RDY$2$ROUT THEN
  3382. BEGIN
  3383. TBLPTR = DISPCCB;
  3384. OPTION = OPTSAVE;
  3385. NEED$OPRES = FALSE;
  3386. RDY$2$ROUT = FALSE;
  3387. END
  3388. ELSE IF RDY$4$ROUT THEN
  3389. BEGIN
  3390. TBLPTR = DISPZRO;
  3391. OPTION = OPTSBMT;
  3392. RDY$4$ROUT = FALSE;
  3393. NEED$OPRES = FALSE;
  3394. END
  3395.  
  3396. IF NEED$OPRES THEN
  3397. BEGIN
  3398. GET$NXT$OP;
  3399. END
  3400.  
  3401.  
  3402. END #MAIN OPTION LOOP#
  3403. CONTROL EJECT;
  3404.  
  3405.  
  3406. ROUT$FILES;
  3407.  
  3408. OFLUSH;
  3409. UPD8MFN;
  3410. CLR$OPMSG;
  3411. OPMSG[0] = " END R7 NAMI";
  3412. OPMSGZB[3] = 0;
  3413. SENDMSG;
  3414.  
  3415. SIERRA;
  3416. NR2 = SIECPUS * 1000.0;
  3417. NR2 = NR2 + SIECPUMS;
  3418. NR2 = NR2 - NR1;
  3419. J2 = NR2;
  3420. EDITX = XCFD(J2);
  3421. OPMSG[0] = " CPU MS REQD ";
  3422. OPMSG1[2] = EDITX;
  3423. OPMSGZB[3] = 0;
  3424. SENDMSG;
  3425. SHOTERM (LOC(OPMSG[0]), 3, TRUE);
  3426.  
  3427. OFLUSH;
  3428. FINSHIO;
  3429.  
  3430.  
  3431. IF START$SUBS AND NOT RESTRT THEN
  3432. BEGIN
  3433. ROUTYPE = 0;
  3434. IF TESTING THEN ROUTYPE = 4095;
  3435. ROUTNAM = RTFN[INDXC];
  3436. ROUTCOD = ROUTIQ + ROUTNIP ;
  3437. ROUTEM;
  3438. END
  3439.  
  3440.  
  3441.  
  3442. END #NAMI#
  3443.  
  3444. TERM
  3445. *CWEOR,0
cdc/nos2.source/nam5871/nami.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator