User Tools

Site Tools


cdc:nos2.source:nam5871:ndlpss1

NDLPSS1

Table Of Contents

  • [00006] PROC NDLPSS1
  • [00010] PASS 1 PROCEDURE
  • [00087] PROC ABORT
  • [00088] PROC SSTATS
  • [00089] PROC STD$START
  • [00090] PROC STDNO
  • [00091] PROC STDYES
  • [00092] PROC READH
  • [00093] PROC REWIND
  • [00094] PROC WRITEH
  • [00095] PROC WRITEW
  • [00096] PROC MESSAGE
  • [00097] PROC WRITEF
  • [00098] PROC RECALL
  • [00151] PROC LEXSCAN
  • [00152] PROC LEXSNC
  • [00153] PROC PRINTRC
  • [00235] PROC DIAG(CODE)
  • [00239] DIAG - DIAGNOSTIC PROCEDURE FOR STD.
  • [00298] PROC ERRMS1(CODE,LINE,CLRWORD)
  • [00302] ERRMS1 - PASS 1 ERROR MESSAGE PROC
  • [00336] PROC RECALL
  • [00337] PROC WRITEF
  • [00338] PROC WRITEW
  • [00388] PROC GETDCHAR(CHAR,TYPE)
  • [00392] GETDCHAR - GET NEXT CHARACTER IN DEFINE STRING
  • [00567] PROC GETSCHAR(CHAR,LINENUM,TYPE)
  • [00571] GETSCHAR - GET NEXT CHARACTER FROM SOURCE LINE.
  • [00622] FUNC XCDD C(10)
  • [00821] PROC LEXSCAN
  • [00825] LEXSCAN - LEXICAL SCANNER
  • [01254] PROC LEXSNC
  • [01258] LEXSNC - SKIP TO NEXT CARD/SOURCE LINE.
  • [01291] PROC PRINTRC(MSG,MLENG)
  • [01295] PRINTRC - PRINT TRACE LINE.
  • [01331] PROC SUBR
  • [01335] SUBR - SYNTATIC SUB-ROUTINES CALLED BY STD
  • [01364] PROC STD$RET
  • [01417] PROC CHKDEC(CDWD,CDLENG,CDKWID,CDSTID,CDINT$VAL,CDRINFO,
  • [01422] CHKDEC - CHECK VALUE TO BE A DECIMAL NUMBER
  • [01533] PROC CHKHEX(CHWD,CHLENG,CHKWID,CHSTID,CHINT$VAL,CHRINFO,
  • [01538] CHKHEX - CHECK FOR HEXIDECIMAL VALUE.
  • [01690] PROC CHKNAME(CNWD,CNKWID,CNSTID,CNTYPE,CNLENG,
  • [01695] CHKNAME - CHECK FOR NAME.
  • [01787] PROC CHKTABL(CKTWORD,CKTLENG,CKTKWID,CKTSTID,CKTRINFO,
  • [01792] CHKTABL - CHECK TABLE FOR LEGAL VALUE.
  • [02283] PROC CKDEFNAM(DFNAME,DFLAG,DFNLENG,DLINE,CDNSTAT)
  • [02287] CKDEFNAM - CHECK FOR DEFINE NAME.
  • [02374] PROC CKGNAME(GNAME,NAMLENG,GPORT,CGNLINE,CGNSTAT)
  • [02378] CKGNAME - CHECK GENERATED NAME.
  • [02461] PROC CKKWD(KWDNAME,KWDSTMT,KWDNEX,KWDLXID,KWDMAP,KWDRINFO,
  • [02466] CKKWD - CHECK KEYWORD.
  • [02600] PROC CKLNAME(LBLNAME,LBLTYPE,LBLLXID,LBLLENG,LBLKLBL,
  • [02754] PROC CKSTMTDEC(SCSTMT,SNAME,SLXID,SMAP,SRPTINFO,SLINE,
  • [02759] CKSTMTDEC - CHECK STATEMENT DECLARATION
  • [03248] PROC CKVDEC(VKWID,VWRD,VLENG,VLINE,VCSTMT,VRPTINFO)
  • [03252] CKVDEC - CHECK VALUE DECLARATION.
  • [03857] PROC ENTLABL(LABEL$,LAB$ERR,STMT$ID,ELRPTINFO,ELLINE)
  • [03861] ENTLABL - ENTER LABEL INTO TABLES.
  • [04144] PROC ENTNID
  • [04148] ENTNID - ENTER NODE I.D. INTO LOGICAL LINK TABLE.
  • [04228] PROC ENTVAL(EVVALUE,EVKWID,EVSTID,EVNA,EVLENG,EVRINFO,
  • [04233] ENTVAL - ENTER VALUE INTO TABLES.
  • [04870] PROC NAMEGEN(RPTNAME,GROUPSIZE,NCIR$CNT,PORT$NUM,NGLINE,NGSTAT)
  • [04874] NAMEGEN - NAME GENERATOR
  • [04927] FUNC XCHD C(10)
  • [05019] PS1TERM - PASS 1 TERMINATION ROUTINE.
  • [05085] PROC PS1TERM(P1TCSTMT,P1TNEXW,P1TLINE,P1TEOF)
  • [05162] PROC SCNTOPRD
  • [05166] SCNTOPRD - SCAN TO PERIOD
  • [05197] PROC SDEFINE(SDCSTMT)
  • [05201] SDEFINE - STORE DEFINE STRING.
  • [05455] PROC STERM(TRPTINFO,TLINE,TCSTMT,TL$STID)
  • [05459] STERM - STATEMENT TERMINATION ROUTINE
  • [05798] PROC STITLE(STTLINE)
  • [05802] STITLE - STORE TITLE.

Source Code

NDLPSS1.txt
  1. *DECK NDLPSS1
  2. USETEXT NDLDATT
  3. USETEXT NDLER1T
  4. USETEXT NDLFETT
  5. USETEXT NDLTBLT
  6. PROC NDLPSS1;
  7. BEGIN
  8. *IF,DEF,IMS
  9. #
  10. ** NDLPSS1 - PASS 1 PROCEDURE
  11. *
  12. * D.K. ENDO 81/10/23
  13. *
  14. * THIS PROCEDURE CONTAINS ALL THE PROC-S THAT PARSES THE NDL SOURCE
  15. * AND DOES INITIALIZATION BEFORE PROCEDING.
  16. *
  17. * PROC NDLPSS1
  18. *
  19. * ENTRY NONE.
  20. *
  21. * EXIT NONE.
  22. *
  23. * NOTES
  24. *
  25. * THE NESTING OF THE PROCEDURES IS AS FOLLOWS:
  26. *
  27. * NDL$PS1 PASS 1 INITIALIZATION
  28. * DIAG INTERFACE BETWEEN STD AND ERRMS1
  29. * ERRMS1 PASS 1 ERROR MESSAGE PROC
  30. * GETDCHAR GET NEXT CHARACTER FROM DEFINE STRING
  31. * GETSCHAR GET NEXT CHARACTER FROM SOURCE LINE
  32. * LEXSCAN FORMS TOKENS AND CATEGORIZES THEM
  33. * LEXSNC SKIPS TO NEXT CARD
  34. * PRINTRC PRINT TRACE LINE
  35. * SUBR CONTAIN SYNTACTICAL PROC-S CALLED BY STD
  36. * CHKDEC CHECK TOKEN TO BE DECIMAL
  37. * CHKHEX CHECK TOKEN TO BE HEXIDECIMAL
  38. * CHKNAME CHECK TOKEN TO BE A NAME
  39. * CHKTABL CHECK TABLE FOR TOKEN
  40. * CKDEFNAM CHECK FOR TOKEN TO BE DEFINE NAME
  41. * CKGNAME CHECK GENERATED NAME
  42. * CKKWD CHECK KEYWORD
  43. * CKLNAME CHECK LABEL NAME
  44. * CKSTMTDEC CHECK STATEMENT DECLARATION
  45. * CKVDEC CHECK VALUE DECLARATION
  46. * ENTLABL ENTER LABEL INTO TABLES
  47. * ENTNID ENTER NODE I.D. INTO TABLE
  48. * ENTVAL ENTER VALUE INTO TABLES
  49. * NAMEGEN NAME GENERATOR
  50. * PS1TERM PASS 1 TERMINATION PROC
  51. * SCNTOPRD SCAN TO PERIOD
  52. * SDEFINE STORE DEFINE STRING
  53. * STERM STATEMENT TERMINATION PROC
  54. * STITLE STORE TITLE
  55. *
  56. * METHOD
  57. *
  58. * INITIALIZE POINTERS, FLAGS, VALUES, AND TABLES.
  59. * IF THIS IS THE FIRST DIVISION
  60. * READ FIRST SOURCE LINE
  61. * IF NOTHING WAS READ
  62. * SEND ERROR MESSAGE TO DAYFILE
  63. * ABORT JOB
  64. * REWIND SCRATCH FILES
  65. * GET FIRST CHARACTER IN SOURCE LINE
  66. * FORM THE FIRST TOKEN
  67. * CALL SYNTAX TABLE DRIVER (STD)
  68. *
  69. #
  70. *ENDIF
  71. #
  72. **** PROC NDLPSS1 - XREF LIST BEGINS.
  73. #
  74. XREF
  75. BEGIN
  76. ITEM TFLAG U; # FLAG INDICATING A TRACE IS DESIRED #
  77. ARRAY LEXICON; # INDEX OF LEXWORD #
  78. ITEM LEX U;
  79. ARRAY LEXWORD; # TABLE CONTAINING ALL STMT-NAMES AND #
  80. ITEM LEXWRD U; # KEYWORDS #
  81. ARRAY LBLPTRS; # POINTERS TO LABELS IN SYNTABLE #
  82. ITEM LBLPTR U;
  83. ARRAY SYNTBLE; # ALL INSTRUCTIONS FOR SYNTAX TABLE DRIVER#
  84. ITEM SYNWORD U;
  85. ARRAY TRACEM; # INFORMATION TO GENERATE A TRACE #
  86. ITEM TRACEINSTR U;
  87. PROC ABORT; # WHEN CALLED CAUSES JOB TO ABORT #
  88. PROC SSTATS; # REQUESTS FOR MORE TABLE SPACE #
  89. PROC STD$START; # INITIAL TRANSFER OF CONTROL -STD- #
  90. PROC STDNO; # RETURNS AN STDFLAG OF -NO-E #
  91. PROC STDYES; # RETURNS AN STDFLAG OF -YES- #
  92. PROC READH; # READS NEXT SOURCE LINE #
  93. PROC REWIND; # REWINDS SPECIFIED FILE #
  94. PROC WRITEH; # WRITES LINE TO FILE #
  95. PROC WRITEW; # WRITES SPECIFIED NUMBER OF WORDS TO FILE#
  96. PROC MESSAGE;
  97. PROC WRITEF; # FLUSH BUFFER AND WRITE EOF MARKER #
  98. PROC RECALL;
  99. SWITCH SUBRJUMP; # SWITCH FOR SYNTACTIC SUBROUTINES #
  100. END
  101. #
  102. ****
  103. #
  104. #
  105. **** PROC NDLPSS1 - XDEF LIST BEGINS.
  106. #
  107. XDEF
  108. BEGIN
  109. ITEM NDLDIAG; # LOCATION OF DIAG #
  110. ITEM LBLPNTR; # LOCATION OF LBLPTRS TABLE #
  111. ITEM LINECTR; # LINE COUNT #
  112. ITEM LINELMT; # UPPER LIMIT ON NUMBER OF OUTPUT LINES #
  113. ITEM SWITCHV ; # LOCATION OF SWITCH FOR STD #
  114. ITEM SYNSECT; # USED BY STD AS LABEL TO JUMP TO #
  115. ITEM SYNTBL; # LOCATION OF SYNTBLE TABLE #
  116. ITEM TRACE ; # LOCATION OF TRACEM TABLE #
  117. ARRAY CWORD [0:25] S(1);
  118. BEGIN
  119. ITEM CURWORD C(0,0,10); # CURRENT WORDS FROM SOURCE LINE#
  120. END
  121. ARRAY CURHNAME [0:0] S(1);
  122. BEGIN
  123. ITEM CHNAME U(0,18,42)=[0]; # CURRENT HOST NAME FOR COUPLER #
  124. END
  125. ITEM CURLENG; # LENGTH IN CHARACTERS OF CURRENT WORD #
  126. ITEM CURLENW; # LENGTH IN 60 BIT WORDS OF CURRENT WORD #
  127. ITEM CURTYPE; # SYNTACTIC TYPE OF CURRENT WORD #
  128. ITEM CURLINE; # LINE NUMBER OF CURRENT WORD #
  129. ITEM CURLXID; # LEXICAL ID OF CURRENT WORD #
  130. ARRAY CURMAP[0:0] S(1); # BIT MAP FOR CURRENT WORD #
  131. BEGIN
  132. ITEM CURP1 U(0,30,15); # 1ST PARAM FOR CURRENT WORD #
  133. ITEM CURP2 U(0,45,15); # 2ND PARAM FOR CURRENT WORD #
  134. ITEM CMAP U(0,30,30); # BIT MAP -- SAMAP OR KWAMAP #
  135. END
  136. ARRAY NWORD [0:25] S(1);
  137. BEGIN
  138. ITEM NEXWORD C(0,0,10); # SUCCESSIVE CP WORDS OF TOKEN #
  139. END
  140. ITEM NEXLENG; # LENGTH IN CHARACTERS OF NEXT WORD #
  141. ITEM NEXLENW; # LENGTH IN 60 BIT WORDS OF NEXT WORD #
  142. ITEM NEXTYPE; # SYNTACTIC TYPE OF NEXT WORD #
  143. ITEM NEXLINE; # LINE NUMBER OF NEXT WORD #
  144. ITEM NEXLXID; # LEXICAL ID OF NEXT WORD IN SOURCE #
  145. ARRAY NEXMAP[0:0] S(1); # BIT MAP FOR NEXT WORD #
  146. BEGIN
  147. ITEM NEXP1 U(0,30,15); # 1ST PARAM FOR NEXT WORD #
  148. ITEM NEXP2 U(0,45,15); # 2ND PARAM FOR NEXT WORD #
  149. ITEM NMAP U(0,30,15); # BIT MAP -- SAMAP OR KWAMAP #
  150. END
  151. PROC LEXSCAN; # FORMS NEXT TOKEN #
  152. PROC LEXSNC; # SKIPS TO NEXT CARD IMAGE #
  153. PROC PRINTRC; # PRINTS TRACE WHEN REQUESTED #
  154. END
  155. #
  156. ****
  157. #
  158. DEF COLON$DC # 00 #; # DISPLAY CODE COLON ":" #
  159. DEF COMMA$DC # 46 #; # DISPLAY CODE COMMA "," #
  160. DEF LINELIMIT # 132 #; # LIMIT ON NUMBER OF CHARACTERS PER LINE #
  161. DEF MXTOK # 260 #; # MAXIMUM TOKEN LENGTH IN 6-BIT CHARS #
  162. DEF MXTOKW # 26 #; # MAXIMUM TOKEN LENGTH IN 60-BIT WORDS #
  163. DEF PERIOD$DC # 47 #; # DISPLAY CODE PERIOD "." #
  164. DEF SPACE$DC # 45 #; # DISPLAY CODE SPACE " " #
  165. DEF TRNS$OK # 0 #; #STATUS OF -GOOD- RETURNED BY READ ROUTINE#
  166. DEF TYPEKWD # 100 #; # LEXICAL TYPE FOR KEYWORD #
  167. DEF TYPENAM # 101 #; # LEXICAL TYPE FOR NAME #
  168. DEF TYPENUM # 105 #; # LEXICAL TYPE FOR NUMBER #
  169. DEF TYPEUNK # 109 #; # LEXICAL TYPE FOR COMPLEX(UNKNOWN) #
  170. DEF TYPEEOF # 11 #; # LEXICAL TYPE FOR EOF #
  171.  
  172. ITEM BGN$LT$PNTR; # BEGINNING OF LABEL TABLE POINTER #
  173. ITEM CMAP$B; # CONSOLE MAP BIT POINTER #
  174. ITEM CMAP$W; # CONSOLE MAP WORD POINTER #
  175. ITEM COL; # COLUMN NUMBER OF CURRENT CHAR IN SOURCE #
  176. ITEM CURCHAR$TEMP C(1);# TEMPORARY FOR CURCHAR #
  177. ITEM CURSTAT$TEMP; # TEMPORARY FOR CURSTAT #
  178. ITEM DCHARCNT; # DEFINE STRING CHARACTER COUNT #
  179. ITEM DEFCOL; # COLUMN NUMBER OF ESIBUFF #
  180. ITEM DEFFLAG B; # DEFINE FLAG -- SET IF PARSING DEFINE #
  181. ITEM DEFPNTR; # DEFINE STRING POINTER #
  182. ITEM DSTRNG$WORD; # POINTS TO WORD IN DEFINE STRING #
  183. ITEM END$DT$PNTR; # END OF DEFINE TABLE POINTER #
  184. ITEM ENDFLAG B; # FLAG INDICATING -END- STMT FOUND #
  185. ITEM EOFFLAG B; # END OF FILE FLAG -- SET IF EOF SENSED #
  186. ITEM I; # SCRATCH ITEM #
  187. ITEM SCN$TO$END B; # FLAG INDICATING IGNORE DIVISION #
  188. ITEM TITLE$FLAG B; # FLAG SET IF TITLE WAS SPECIFED #
  189. ITEM VAL$DEC B; # FLAG SET IF PARSING VALUE-DEC PORTION #
  190. ITEM FIRST$STMT B; # FLAG INDICATING FIRST STMT IN DIVISION #
  191. ITEM CURCHAR C(1); # CURRENT CHARACTER BEING LOOKED AT #
  192. ITEM LINE; # CURRENT LINE NUMBER OF SOURCE #
  193. ITEM CURSTAT; # USED TO CONTAIN STATUS OF CURCHAR #
  194. ITEM PERIOD$SKIP B; # FLAG TO CHECK IF ".' SHOULD BE SKIPPED #
  195. BASED ARRAY DT$TEMPLATE [0:0] S(1);
  196. BEGIN # TEMPLATE FOR DEFINE TABLE #
  197. ITEM DTMP$NAME C(0,0,7); # DEFINE-NAME #
  198. ITEM DTMP$WCNT U(0,54,6); #NUM OF CP WRDS CONTAINING STRNG#
  199. ITEM DTMP$DSTRG C(0,0,10); # DEFINE STRING #
  200. END
  201. ARRAY EMPTY$FILE [0:0] S(2); # EMPTY FILE MESSAGE TEXT #
  202. BEGIN
  203. ITEM EFMESS C(0,0,18) = [" INPUT FILE EMPTY."];
  204. ITEM EFZBYTE U(1,48,12) = [0];
  205. END
  206. BASED ARRAY INPTEMPLET [0:0] S(9);
  207. ITEM INPTEMP C(0,0,90); # POINT TO BUFFER FOR READH #
  208. BASED ARRAY LEXICN[26] S(1); # BASED ARRAY FOR LEXICON TABLE #
  209. ITEM LEXENTRY U(0,0,60);
  210. BASED ARRAY LXWRDS S(2);
  211. BEGIN
  212. ITEM LWORD C(0,0,10); # KEYWORD,DELIMITER,STMT-NAME #
  213. ITEM LEXID U(1,0,15); # LEXICAL ID OF LWORD #
  214. ITEM P1 U(1,15,15); # 1ST PARAM VALUE #
  215. ITEM P2 U(1,30,15); # 2ND PARAM VALUE #
  216. END
  217. BASED ARRAY CHARSET;
  218. ITEM C64 B(0,0,1); # SET IF 64 CHARACTER SET, ELSE 63 CSET #
  219. DEF MXKYWD # 201 #;
  220. ARRAY ORDINAL$TBL [0:MXKYWD] S(1);
  221. ITEM KYWD$ORD I(0,0,60); # ORDINAL OF KEYWORD IN ST OR TB#
  222. STATUS STAT # STATUS TYPES FOR CURCHAR #
  223. BLANK,
  224. LETTER,
  225. DIGIT,
  226. DELIM,
  227. PER,
  228. ASTRSK,
  229. SPEC,
  230. EOF,
  231. EOC,
  232. TRACE,
  233. SQUOTE;
  234. CONTROL EJECT;
  235. PROC DIAG(CODE);
  236. BEGIN
  237. *IF,DEF,IMS
  238. #
  239. ** DIAG - DIAGNOSTIC PROCEDURE FOR STD.
  240. *
  241. * D.K. ENDO 81/10/23
  242. *
  243. * THIS PROCEDURE CALLS THE PASS 1 ERROR MESSAGE PROC FOR STD.
  244. *
  245. * PROC DIAG(CODE)
  246. *
  247. * ENTRY CODE = ERROR CODE.
  248. *
  249. * EXIT NONE.
  250. *
  251. * METHOD
  252. *
  253. * SELECT CASE THAT APPLIES:
  254. * CASE 1(CLARIFIER WORD):
  255. * CALL ERRMS1 WITH THE CURRENT WORD AS CLARIFIER
  256. * CASE 2(NO CLARIFIER):
  257. * CALL ERRMS1 WITH A BLANK CLARIFIER
  258. *
  259. #
  260. *ENDIF
  261. ITEM CODE; # ERROR CODE #
  262. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  263. SWITCH CODEJUMP # SWITCH FOR WHEN CLARIFIER IS NEEDED #
  264. NOCLRFR,
  265. NOCLRFR,
  266. NOCLRFR,
  267. NOCLRFR,
  268. NOCLRFR,
  269. NOCLRFR,
  270. CLRFR,
  271. NOCLRFR,
  272. CLRFR,
  273. CLRFR,
  274. NOCLRFR,
  275. NOCLRFR,
  276. ,,,,,,,
  277. CLRFR,
  278. NOCLRFR,
  279. NOCLRFR,
  280. ,,,,,,,,
  281. NOCLRFR,
  282. ;
  283. # #
  284. # CODE BEGINS HERE #
  285. # #
  286. GOTO CODEJUMP[CODE];
  287. CLRFR: # PUT CLARIFIER IN ERROR MESSAGE #
  288. ERRMS1(CODE,LINE,CURWORD[0]);
  289. GOTO EXIT;
  290. NOCLRFR: # NO CLARIFIER IS NEEDED #
  291. CTEMP = " ";
  292. ERRMS1(CODE,LINE,CTEMP);
  293. GOTO EXIT;
  294. EXIT:
  295. RETURN; # **** RETURN **** #
  296. END # DIAG #
  297. CONTROL EJECT;
  298. PROC ERRMS1(CODE,LINE,CLRWORD);
  299. BEGIN
  300. *IF,DEF,IMS
  301. #
  302. ** ERRMS1 - PASS 1 ERROR MESSAGE PROC
  303. *
  304. * D.K. ENDO 81/10/23
  305. *
  306. * THIS PROCEDURE MAKES ENTRIES INTO THE PASS 1 ERROR FILE.
  307. *
  308. * PROC ERRMS1(CODE,LINE,CLRWORD)
  309. *
  310. * ENTRY CODE = ERROR CODE.
  311. * LINE = SOURCE LINE NUMBER THAT ERROR WAS DETECTED.
  312. * CLRWORD = CLARIFIER WORD.
  313. *
  314. * EXIT NONE.
  315. *
  316. * METHOD
  317. *
  318. * IF ERROR CODE IS NOT ZERO,
  319. * THEN,
  320. * CREATE ENTRY
  321. * IF THIS IS A FATAL ERROR,
  322. * THEN,
  323. * INCREMENT ERROR COUNT
  324. * OTHERWISE
  325. * INCREMENT WARNING COUNT
  326. * OTHERWISE,
  327. * CREATE ZERO ENTRY
  328. * WRITE ENTRY TO FILE
  329. * IF ERROR CODE IS ZERO
  330. * FLUSH CIO BUFFER AND WRITE EOF
  331. *
  332. #
  333. *ENDIF
  334. XREF
  335. BEGIN
  336. PROC RECALL;
  337. PROC WRITEF; # FLUSHES BUFFER AND WRITES EOF #
  338. PROC WRITEW; # WRITES ENTRY TO FILE #
  339. END
  340. ITEM CODE; # ERROR CODE #
  341. ITEM LINE; # LINBE NUMBER THAT ERROR WAS DETECTED #
  342. ITEM CLRWORD C(10); # CLARIFIER WORD #
  343. ARRAY ELT [0:0] S(2); # ERROR LISTING TABLE #
  344. BEGIN
  345. ITEM ELTCODE I(0,0,12); # ERROR CODE #
  346. ITEM ELTLINE I(0,12,18); # LINE NUMBER #
  347. ITEM ELTCLRW C(1,0,10); # CLARIFIER WORD #
  348. ITEM ELTWRD1 U(0,0,60);
  349. ITEM ELTWRD2 U(1,0,60);
  350. END
  351. CONTROL EJECT;
  352. # #
  353. # CODE BEGINS HERE #
  354. # #
  355. IF CODE NQ 0 # BUFFER SHOULD NOT BE CLEARED #
  356. THEN
  357. BEGIN
  358. ELTWRD1[0] = 0; # CLEAR FIRST WORD OF ENTRY #
  359. ELTCODE[0] = CODE; # MAKE ENTRY IN ERROR TABLE #
  360. ELTLINE[0] = LINE;
  361. ELTCLRW[0] = CLRWORD;
  362. IF EMTTYPE[CODE] EQ "E"
  363. THEN # SET FLAG IN SOURCE #
  364. BEGIN
  365. ERRCNT = ERRCNT + 1; # INCREMENT FATAL ERROR COUNT #
  366. END
  367. ELSE
  368. BEGIN
  369. WARNCNT = WARNCNT + 1; # INCREMENT WARNING ERROR COUNT #
  370. END
  371. INPELINE[0] = "***"; # PUT ERROR INDICATOR IN SOURCE #
  372. END
  373. ELSE # CLEAR BUFFER #
  374. BEGIN
  375. ELTWRD1[0] = 0; # MAKE ZEROED ENTRY #
  376. ELTWRD2[0] = 0; # FLAGGING END OF TABLE #
  377. END
  378. WRITEW(ERR1FET,ELT,2); # WRITE ENTRY TO FILE #
  379. IF CODE EQ 0
  380. THEN # WRITE BUFFER TO FILE #
  381. BEGIN
  382. WRITEF(ERR1FET);
  383. RECALL(ERR1FET);
  384. END
  385. RETURN; # **** RETURN **** #
  386. END # ERRMS1 #
  387. CONTROL EJECT;
  388. PROC GETDCHAR(CHAR,TYPE);
  389. BEGIN
  390. *IF,DEF,IMS
  391. #
  392. ** GETDCHAR - GET NEXT CHARACTER IN DEFINE STRING
  393. *
  394. * D.K. ENDO 81/10/23
  395. *
  396. * THIS PROCEDURE GETS A CHARACTER AT A TIME FROM THE CURRENT DEFINE
  397. * STRING BEING PARSED AND CLASSIFIES THE CHARACTER.
  398. *
  399. * GETDCHAR(CHAR,TYPE)
  400. *
  401. * ENTRY NONE.
  402. *
  403. * EXIT CHAR = NEXT CHARACTER IN DEFINE STRING.
  404. * TYPE = WHAT THE CHARACTER TYPE IS.
  405. *
  406. * METHOD
  407. *
  408. * IF THE EXPANDED SOURCE LINE IMAGE IS FULL,
  409. * WRITE LINE TO EXPANDED SECONDARY INPUT FILE.
  410. * RESET POINTER TO COLUMN IN BUFFER.
  411. * CLEAR BUFFER.
  412. * GET NEXT CHARACTER IN DEFINE STRING.
  413. * PUT CHARACTER IN EXPANDED SOURCE LINE IMAGE BUFFER.
  414. * INCREMENT COLUMN POINTER.
  415. * CLASSIFY CHARACTER.
  416. *
  417. #
  418. *ENDIF
  419. ITEM CHAR C(1); # NEXT CHARACTER IN DEFINE-STRING #
  420. ITEM TYPE; # WHAT THE CHARACTER TYPE IS #
  421.  
  422. ITEM STATS; # STATUS RETURNED BY WRITEH #
  423.  
  424. SWITCH TYPESWITCH
  425. DELIMITER, # COLON #
  426. LETTER, # A #
  427. LETTER, # B #
  428. LETTER, # C #
  429. LETTER, # D #
  430. LETTER, # E #
  431. LETTER, # F #
  432. LETTER, # G #
  433. LETTER, # H #
  434. LETTER, # I #
  435. LETTER, # J #
  436. LETTER, # K #
  437. LETTER, # L #
  438. LETTER, # M #
  439. LETTER, # N #
  440. LETTER, # O #
  441. LETTER, # P #
  442. LETTER, # Q #
  443. LETTER, # R #
  444. LETTER, # S #
  445. LETTER, # T #
  446. LETTER, # U #
  447. LETTER, # V #
  448. LETTER, # W #
  449. LETTER, # X #
  450. LETTER, # Y #
  451. LETTER, # Z #
  452. DIGIT, # 0 #
  453. DIGIT, # 1 #
  454. DIGIT, # 2 #
  455. DIGIT, # 3 #
  456. DIGIT, # 4 #
  457. DIGIT, # 5 #
  458. DIGIT, # 6 #
  459. DIGIT, # 7 #
  460. DIGIT, # 8 #
  461. DIGIT, # 9 #
  462. SPECIAL, # + #
  463. SPECIAL, # - #
  464. ASTERISK, # * #
  465. SPECIAL, # / #
  466. SPECIAL, # ( #
  467. SPECIAL, # ) #
  468. LETTER, # $ #
  469. DELIMITER, # = #
  470. BLANK, # BLANK #
  471. DELIMITER, # , #
  472. PERIOD, # . #
  473. LETTER, # POUND #
  474. SPECIAL, # [ #
  475. SPECIAL, # ] #
  476. SPECIAL, # % (FOR 63 CODE SET -- COLON)#
  477. LETTER, # " #
  478. LETTER, # _ #
  479. SPECIAL, # ! #
  480. SPECIAL, # & #
  481. SQTE, # ' SINGLE QUOTE #
  482. SPECIAL, # ? #
  483. SPECIAL, # < #
  484. SPECIAL, # > #
  485. LETTER, # @ #
  486. SPECIAL, # \ #
  487. SPECIAL, # ^ #
  488. SPECIAL; # SEMICOLON #
  489. CONTROL EJECT;
  490. # #
  491. # CODE BEGINS HERE #
  492. # #
  493. IF DEFCOL GQ LINELIMIT # LINE IMAGE IS FULL #
  494. THEN
  495. BEGIN
  496. WRITEH(ESIFET,ESI$BUFFER,14,STATS); # WRITE LINE TO FILE #
  497. DEFCOL = 30; # INITIALIZE BEGINNING COLUMN #
  498. ESIBUFF[0] = " "; # CLEAR BUFFER #
  499. END
  500. IF DCHARCNT GQ 10 # IF AT END OF WORD #
  501. THEN # INITIALIZE POINTERS TO NEXT WORD #
  502. BEGIN
  503. DSTRNG$WORD = DSTRNG$WORD + 1;
  504. DCHARCNT = 0;
  505. END
  506. CHAR = C<DCHARCNT,1>DTMP$DSTRG[DSTRNG$WORD]; # GET NEXT CHARACTER#
  507. DCHARCNT = DCHARCNT + 1; # INCREMENT CHARACTER COUNT #
  508. C<DEFCOL,1>ESIBUFF[0] = CHAR; # PUT CHARACTER IN BUFFER #
  509. DEFCOL = DEFCOL + 1; # MOVE COLUMN POINTER #
  510. # #
  511. GOTO TYPESWITCH[CHAR];
  512. # #
  513. BLANK:
  514. TYPE = STAT"BLANK";
  515. GOTO EXIT;
  516. LETTER:
  517. TYPE = STAT"LETTER";
  518. GOTO EXIT;
  519. DIGIT:
  520. TYPE = STAT"DIGIT";
  521. GOTO EXIT;
  522. DELIMITER:
  523. TYPE = STAT"DELIM";
  524. GOTO EXIT;
  525. PERIOD:
  526. IF PERIOD$SKIP # IF SKIP PERIOD IS TRUE #
  527. THEN
  528. BEGIN
  529. TYPE = STAT"LETTER";
  530. IF C<DCHARCNT,1>DTMP$DSTRG[DSTRNG$WORD] EQ " "
  531. THEN
  532. BEGIN
  533. TYPE = STAT"PER";
  534. DEFCOL = DEFCOL - 1;
  535. END
  536. END
  537. ELSE
  538. BEGIN
  539. TYPE = STAT"PER";
  540. DEFCOL = DEFCOL - 1; # WRITE OVER PERIOD #
  541. END
  542. GOTO EXIT;
  543. ASTERISK:
  544. TYPE = STAT"ASTRSK";
  545. GOTO EXIT;
  546. SPECIAL:
  547. IF NOT C64 AND CHAR EQ O"63"
  548. THEN
  549. TYPE = STAT"DELIM"; # OCTAL 63 IS A COLON #
  550. ELSE
  551. TYPE = STAT"SPEC";
  552. GOTO EXIT;
  553. SQTE:
  554. TYPE = STAT"SQUOTE";
  555. GOTO EXIT;
  556. TRACEIND:
  557. $BEGIN
  558. TYPE = STAT"TRACE";
  559. GOTO EXIT;
  560. $END
  561. GOTO SPECIAL;
  562. # #
  563. EXIT:
  564. RETURN; # **** RETURN **** #
  565. END # GETDCHAR #
  566. CONTROL EJECT;
  567. PROC GETSCHAR(CHAR,LINENUM,TYPE);
  568. BEGIN
  569. *IF,DEF,IMS
  570. #
  571. ** GETSCHAR - GET NEXT CHARACTER FROM SOURCE LINE.
  572. *
  573. * D.K. ENDO 81/10/23
  574. *
  575. * THIS PROCEDURE GETS THE NEXT CHARACTER FROM THE SOURCE LINE AND
  576. * CLASSIFIES IT.
  577. *
  578. * PROC GETSCHAR(CHAR,LINENUM,TYPE)
  579. *
  580. * ENTRY NONE.
  581. *
  582. * EXIT CHAR = NEXT CHARACTER IN SOURCE LINE.
  583. * LINENUM = CURRENT LINE NUMBER.
  584. * TYPE = WHAT THE CHARACTER TYPE IS.
  585. *
  586. * METHOD
  587. *
  588. * IF POINTING TO LAST RECOGNIZABLE COLUMN IN SOURCE LINE,
  589. * THEN,
  590. * IF DEFINE WAS IN LINE,
  591. * COPY REST OF SOURCE LINE TO EXPANDED SOURCE IMAGE.
  592. * WRITE EXPANDED LINE TO FILE(FOLD IF NECESSARY).
  593. * WRITE SOURCE LINE TO SECONDARY INPUT FILE.
  594. * READ NEXT SOURCE LINE.
  595. * IF END OF FILE,
  596. * SET EOF FLAG AND END OF INPUT FLAG.
  597. * SET CHAR TO BLANK.
  598. * SET TYPE TO END OF CARD.
  599. * INCREMENT LINE NUMBER.
  600. * OTHERWISE,
  601. * IF EOF FLAG SET,
  602. * THEN,
  603. * SET CHAR TO BLANK.
  604. * SET TYPE TO END OF FILE.
  605. * OTHERWISE,
  606. * GET NEXT CHARACTER FROM SOURCE.
  607. * PUT CHARACTER IN EXPANDED SOURCE IMAGE BUFFER.
  608. * POINT TO NEXT COLUMN IN SOURCE LINE AND EXPANDED SOURCE LINE.
  609. * IF EXPANDED SOURCE BUFFER IS FULL,
  610. * WRITE BUFFER TO FILE.
  611. * RESET COLUMN POINTER.
  612. * CLEAR BUFFER.
  613. * CLASSIFY CHARACTER.
  614. *
  615. #
  616. *ENDIF
  617. ITEM CHAR C(1); # NEXT CHARACTER IN SOURCE-LINE #
  618. ITEM LINENUM; # LINE NUMBER THAT CHARACTER IS ON #
  619. ITEM TYPE; # WHAT THE CHARACTER TYPE IS #
  620. XREF
  621. BEGIN
  622. FUNC XCDD C(10); # CONVERTS BINARY TO DECIMAL DISPLAY CODE #
  623. END
  624. DEF LASTCOL # 72 #; # LAST COL THAT NDL RECOGNIZES ON CARD #
  625. DEF ENDCOL # 89 #; # LAST COL ON SOURCE LINE #
  626. ITEM CTEMP C(10); # TEMPORARY FOR CHARACTER ITEMS #
  627. ITEM I; # TEMPORARY FOR INTERGER ITEMS #
  628. ITEM STATS; # STATUS RETURNED BY READ ROUTINE #
  629. # #
  630. SWITCH TYPESWITCH
  631. DELIMITER, # COLON #
  632. LETTER, # A #
  633. LETTER, # B #
  634. LETTER, # C #
  635. LETTER, # D #
  636. LETTER, # E #
  637. LETTER, # F #
  638. LETTER, # G #
  639. LETTER, # H #
  640. LETTER, # I #
  641. LETTER, # J #
  642. LETTER, # K #
  643. LETTER, # L #
  644. LETTER, # M #
  645. LETTER, # N #
  646. LETTER, # O #
  647. LETTER, # P #
  648. LETTER, # Q #
  649. LETTER, # R #
  650. LETTER, # S #
  651. LETTER, # T #
  652. LETTER, # U #
  653. LETTER, # V #
  654. LETTER, # W #
  655. LETTER, # X #
  656. LETTER, # Y #
  657. LETTER, # Z #
  658. DIGIT, # 0 #
  659. DIGIT, # 1 #
  660. DIGIT, # 2 #
  661. DIGIT, # 3 #
  662. DIGIT, # 4 #
  663. DIGIT, # 5 #
  664. DIGIT, # 6 #
  665. DIGIT, # 7 #
  666. DIGIT, # 8 #
  667. DIGIT, # 9 #
  668. SPECIAL, # + #
  669. SPECIAL, # - #
  670. ASTERISK, # * #
  671. SPECIAL, # / #
  672. SPECIAL, # ( #
  673. SPECIAL, # ) #
  674. LETTER, # $ #
  675. DELIMITER, # = #
  676. BLANK, # BLANK #
  677. DELIMITER, # , #
  678. PERIOD, # . #
  679. LETTER, # POUND #
  680. SPECIAL, # [ #
  681. SPECIAL, # ] #
  682. SPECIAL, # % (FOR 63 CODE SET -- COLON)#
  683. LETTER, # " #
  684. LETTER, # _ #
  685. SPECIAL, # ! #
  686. SPECIAL, # & #
  687. SQTE, # ' SINGLE QUOTE #
  688. SPECIAL, # ? #
  689. SPECIAL, # < #
  690. SPECIAL, # > #
  691. LETTER, # @ #
  692. SPECIAL, # \ #
  693. SPECIAL, # ^ #
  694. SPECIAL; # SEMICOLON #
  695. CONTROL EJECT;
  696. # #
  697. # CODE BEGINS HERE #
  698. # #
  699. IF COL GQ LASTCOL # INDECATES LAST COLUMN THAT NDLP WILL #
  700. THEN # RECOGNIZE ON CARD-IMAGE #
  701. BEGIN
  702. IF INPDLINE[0] EQ "D" # IF DEFINES WERE SPECIFIED ON #
  703. THEN # THIS LINE -- #
  704. BEGIN
  705. FOR I=COL STEP 1 UNTIL ENDCOL DO
  706. BEGIN # COPY REST OF IMAGE TO ESIBUFF #
  707. IF DEFCOL GQ LINELIMIT # IF END OF LINE #
  708. THEN # FOLD TO NEXT LINE #
  709. BEGIN
  710. WRITEH(ESIFET,ESI$BUFFER,14,STATS);
  711. DEFCOL = 30;
  712. ESIBUFF[0] = " "; # CLEAR BUFFER #
  713. END
  714. C<DEFCOL,1>ESIBUFF[0] = C<I,1>INPLINE[0];
  715. DEFCOL = DEFCOL + 1;
  716. END
  717. IF ESIBUFF[0] NQ " " # WRITE OUT BUFFER IF NOT BLANK #
  718. THEN
  719. BEGIN
  720. WRITEH(ESIFET,ESI$BUFFER,14,STATS); # WRITE EXPANDED LINE #
  721. END
  722. END # TO FILE #
  723. WRITEH(SECFET,INPUT$BUFFER,11,STATS); # WRITE TO FILE #
  724. INPBUFF[0] = " "; # CLEAR INPUT BUFFER #
  725. READH(INFET,INPTEMPLET,9,STATS);
  726. IF STATS NQ TRNS$OK
  727. THEN
  728. BEGIN
  729. EOFFLAG = TRUE;
  730. EOINP = TRUE;
  731. END
  732. CHAR = " ";
  733. TYPE = STAT"EOC"; # SEND BACK END OF CARD STATUS #
  734. COL = 0; # INITIALIZE COLUMN COUNT #
  735. LINENUM = LINENUM + 1; # INCREMENT LINE COUNT #
  736. CTEMP = XCDD(LINENUM); # PUT LINE NUMBER #
  737. INPLNUM[0] = C<5,5>CTEMP; # LINE IMAGE #
  738. ESILINE[0] = INPLNUM[0];
  739. DEFCOL = 20;
  740. END
  741. ELSE # MORE CHARACTERS ON CARD-IMAGE #
  742. BEGIN
  743. IF EOFFLAG # IF EOF FLAG IS SET #
  744. THEN
  745. BEGIN
  746. CHAR = " ";
  747. TYPE = STAT"EOF"; # SEND BACK STATUS OF EOF #
  748. END
  749. ELSE # GET NEXT CHARACTER #
  750. BEGIN
  751. CHAR = C<COL,1>INPLINE[0];
  752. C<DEFCOL,1>ESIBUFF[0] = CHAR;
  753. COL = COL + 1; # INCREMENT COLUMN COUNT #
  754. DEFCOL = DEFCOL + 1;
  755. IF DEFCOL GQ LINELIMIT # IF LINE IS FULL -- #
  756. THEN
  757. BEGIN
  758. WRITEH(ESIFET,ESIBUFF,14,STATS); # WRITE OUT ESIBUFF #
  759. DEFCOL = 30;
  760. ESIBUFF[0] = " ";# CLEAR BUFFER #
  761. END
  762. GOTO TYPESWITCH[CHAR];
  763. BLANK:
  764. TYPE = STAT"BLANK";
  765. GOTO EXIT;
  766. LETTER:
  767. TYPE = STAT"LETTER";
  768. GOTO EXIT;
  769. DIGIT:
  770. TYPE = STAT"DIGIT";
  771. GOTO EXIT;
  772. DELIMITER:
  773. TYPE = STAT"DELIM";
  774. GOTO EXIT;
  775. PERIOD:
  776. IF PERIOD$SKIP
  777. THEN
  778. BEGIN
  779. TYPE = STAT"LETTER";
  780. IF COL LQ 89
  781. THEN
  782. BEGIN
  783. IF C<COL,1>INPLINE[0] EQ " "
  784. THEN
  785. BEGIN
  786. TYPE = STAT"PER";
  787. END
  788. END
  789. END
  790. ELSE
  791. BEGIN
  792. TYPE = STAT"PER";
  793. END
  794. GOTO EXIT;
  795. ASTERISK:
  796. TYPE = STAT"ASTRSK";
  797. GOTO EXIT;
  798. SPECIAL:
  799. IF NOT C64 AND CHAR EQ O"63"
  800. THEN
  801. TYPE = STAT"DELIM";
  802. ELSE
  803. TYPE = STAT"SPEC";
  804. GOTO EXIT;
  805. SQTE:
  806. TYPE = STAT"SQUOTE";
  807. GOTO EXIT;
  808. TRACEIND:
  809. $BEGIN
  810. TYPE = STAT"TRACE";
  811. GOTO EXIT;
  812. $END
  813. GOTO SPECIAL;
  814.  
  815. EXIT:
  816. END
  817. END
  818. RETURN; # **** RETURN **** #
  819. END # GETSCHAR #
  820. CONTROL EJECT;
  821. PROC LEXSCAN;
  822. BEGIN
  823. *IF,DEF,IMS
  824. #
  825. ** LEXSCAN - LEXICAL SCANNER
  826. *
  827. * D.K. ENDO 81/10/23
  828. *
  829. * THIS PROCEDURE FORMS TOKENS AND CLASSIFIES THEM.
  830. *
  831. * PROC LEXSCAN
  832. *
  833. * ENTRY NONE.
  834. *
  835. * EXIT NONE.
  836. *
  837. * METHOD
  838. *
  839. * MOVE NEXT WORD INTO CURRENT WORD BUFFER.
  840. * MOVE NEXT WORD INFO INTO CURRENT WORD INFO BUFFERS.
  841. * CLEAR NEXT WORD AND NEXT WORD INFO.
  842. * IF CURRENT WORD IS PERIOD
  843. * SCAN REST OF CARD FOR COMMENT
  844. * IF COMMENT EXISTS AND NOT DELIMITED BY ASTERISK
  845. * FLAG ERROR
  846. * INITIAL STATE TO ZERO STATE
  847. * ENTER STATE TABLE:
  848. *
  849. * ***STATE I 0 I 1 I 2 I 3 I
  850. * *** I I I I I
  851. * STIM ***I INIT I NAME I NUMBER I UNKNOWN I
  852. * ---------+-------------+-------------+-------------+-------------+
  853. * I (S) 0 I 0 I 0 I 0 I
  854. * I I SET I SET I SET I
  855. * I I TYPE I TYPE I TYPE I
  856. * BLANK I NONE I LENGTH I LENGTH I LENGTH I
  857. * I I IF KEYWORD I I I
  858. * I I SET I.D. I I I
  859. * I I (E)I (E)I (E)I
  860. * ---------+-------------+-------------+-------------+-------------+
  861. * I (S) 1 I (S) I (S) I (S) 3 I
  862. * I IIF CHARCNT 0IIF CHARCNT 0I I
  863. * I STORE I STOR CHAR I STOR CHAR I ++ I
  864. * LETTER I CHARACTER I STATE = 1 I STATE = 2 I NONE I
  865. * I IELSE, IELSE, I I
  866. * I I STATE = 3 I STATE = 3 I I
  867. * I I I I I
  868. * ---------+-------------+-------------+-------------+-------------+
  869. * I (S) 2 I (S) I (S) I (S) 3 I
  870. * I IIF CHARCNT 0IIF CHARCNT 0I I
  871. * I STORE I STOR CHAR I STOR CHAR I ++ I
  872. * DIGIT I CHARACTER I STATE = 1 I STATE = 2 I NONE I
  873. * I IELSE, IELSE, I I
  874. * I I STATE = 3 I STATE = 3 I I
  875. * I I I I I
  876. * ---------+-------------+-------------+-------------+-------------+
  877. * I (S) 0 I 0 I 0 I 0 I
  878. * I STORE CHAR I SET I SET I SET I
  879. * + I SET I TYPE I TYPE I TYPE I
  880. * DELIM I TYPE I LENGTH I LENGTH I LENGTH I
  881. * I I.D. I IF KEYWORD I I I
  882. * I I SET I.D. I I I
  883. * I (E)I (E)I (E)I (E)I
  884. * ---------+-------------+-------------+-------------+-------------+
  885. * I (S) I I I I
  886. * I IF VALU-DEC I IF VALU-DEC I IF VALU-DEC I IF VALU-DEC I
  887. * I (A) I (A) I (A) I (A) I
  888. * ASTERISK I ELSE, I ELSE, I ELSE, I ELSE, I
  889. * I SET TYPE I (B) I (B) I (B) I
  890. * I SET LENGTH I I I I
  891. * I (E) I I I I
  892. * ---------+-------------+-------------+-------------+-------------+
  893. * I 0 I 0 I 0 I 0 I
  894. * I IF DEFFLAG I (B) I (B) I (B) I
  895. * I (S) I IF DEFFLAG I IF DEFFLAG I IF DEFFLAG I
  896. * PERIOD I CLEAR FLAG I (S) I (S) I (S) I
  897. * I ELSE, I CLEAR FLAGI CLEAR FLAGI CLEAR FLAGI
  898. * I (B) I I I I
  899. * I (E)I (E)I (E)I (E)I
  900. * ---------+-------------+-------------+-------------+-------------+
  901. * I (S) 0 I 0 I 0 I 0 I
  902. * I STORE CHAR I SET I SET I SET I
  903. * * I SET I TYPE I TYPE I TYPE I
  904. * SPECIAL I TYPE I LENGTH I LENGTH I LENGTH I
  905. * I LENGTH I IF KEYWORD I I I
  906. * I I SET I.D. I I I
  907. * I (E)I (E)I (E)I (E)I
  908. * ---------+-------------+-------------+-------------+-------------+
  909. *
  910. * (A) -- SAME AS LETTER.
  911. * (B) -- SAME AS DELIMETER
  912. * (E) -- EXIT STATE TABLE
  913. * (S) -- SET INPUT POINTER TO NEXT CHARACTER IN SOURCE LINE
  914. * + -- DELIMITER --> : / = / ,
  915. * ++ -- CHARACTER COUNT IS INCREMENTED BY ONE -- ONLY TIME COUNT IS
  916. * INCREMENTED EXCEPT WHEN STORING CHARACTER
  917. * * -- CHARACTERS THAT ARE NOT ONE OF THE ABOVE
  918. *
  919. #
  920. *ENDIF
  921. DEF PERIOD$ID # O"01003" #; # LEXID OF PERIOD #
  922. DEF STATE0 # 0 #; # STATE 0 -- BIT NUM OF COL IN STATE TABLE#
  923. DEF STATE1 # 06 #; # STATE 1 -- BIT NUM OF COL IN STATE TABLE#
  924. DEF STATE2 # 12 #; # STATE 2 -- #
  925. DEF STATE3 # 18 #; # STATE 3 -- #
  926. DEF STATE4 # 24 #; # STATE 4 -- BIT NUM OF COL IN STATE TABLE#
  927. DEF STATE5 # 30 #; # STATE 5 -- #
  928. DEF STATE6 # 36 #; # STATE 6 -- #
  929. DEF STATE7 # 42 #; # STATE 7 -- BIT NUM OF COL IN STATE TABLE#
  930. DEF STATE8 # 48 #; # STATE 8 -- #
  931. DEF STATE9 # 54 #; # STATE 9 -- #
  932. ITEM CHARGRP; # CHARACTER GROUP -- PNTR INTO LEXICON #
  933. ITEM CTEMP C(10); # TEMPORARY FOR CHARACTER STRING #
  934. ITEM ENTRIES; # NUMBER OF ENTRIES IN CHARACTER GROUP #
  935. ITEM FOUND B; # BOOLEAN SCRATCH ITEM #
  936. ITEM I; # INTEGER SCRATCH ITEM #
  937. ITEM STATE; # CURRENT STATE #
  938. ITEM WORD$BOUND; # WORD COUNT UNTIL CURRENT WORD BOUND #
  939. ITEM WDPTR; # WORD POINTER INTO LEXWORDS(KEYWORD LIST)#
  940. SWITCH NDLJMPVCTR ERR, # COLON 00 #
  941. PROCEED, # A 01 #
  942. STORCHAR, # B 02 #
  943. SETTRACE, # C 03 #
  944. NAME, # D 04 #
  945. NUMBER, # E 05 #
  946. UNKNOWN, # F 06 #
  947. STRING, # G 07 #
  948. DELIMITER, # H 10 #
  949. PERIOD, # I 11 #
  950. ASTRISK, # J 12 #
  951. SPECIAL, # K 13 #
  952. EOF, # L 14 #
  953. TRANS01, # M 15 #
  954. TRANS02, # N 16 #
  955. TRANS03, # O 17 #
  956. TRANS04, # P 20 #
  957. TRANS05, # Q 21 #
  958. TRANS06, # R 22 #
  959. TRANS07, # S 23 #
  960. TRANS08, # T 24 #
  961. TRANS09; # U 25 #
  962. # #
  963. ARRAY STATETAB [0:10] S(1);
  964. # STATE TABLE CONTROLS EXECUTION OF LABELED SECTIONS OF #
  965. # SWITCH NDLJMPVCTR DEPENDING ON -- #
  966. # 1. CURRENT STATE #
  967. # 2. STATUS OF CURCHAR #
  968. # #
  969. # SECTIONS MAY -- #
  970. # 1. CHANGE STATE #
  971. # 2. STORE CURCHAR #
  972. # 3. SET LEXTYPE/LEXID/P1/P2 AND RETURN #
  973. # #
  974. ITEM STATETABLE U(0,0,60) = [
  975. # / STATES #
  976. # STIMULUS / 0123456789#
  977. # BLANK # "ADEFA ",
  978. # LETTER # "MBBAB ",
  979. # DIGIT # "NBBAB ",
  980. # DELIMITER# "HDEFE ",
  981. # PERIOD # "IDEFE ",
  982. # ASTERISK # "JJJJE ",
  983. # SPECIAL # "KDEFE ",
  984. # EOF # "LDEFE ",
  985. # EOC # "ADEFA ",
  986. # TRACE # "CDEFE ",
  987. # SQUOTE # "PDEFG "];
  988. CONTROL EJECT;
  989. # #
  990. # CODE BEGINS HERE #
  991. # #
  992. FOR I = 0 STEP 1 UNTIL MXTOKW-1 DO
  993. BEGIN
  994. CURWORD[I] = NEXWORD[I]; # MOVE NEXINFO INTO CURINFO #
  995. END
  996. CURTYPE = NEXTYPE; # MOVE NEXINFO INTO CURINFO #
  997. CURLXID = NEXLXID;
  998. CURP1[0] = NEXP1[0];
  999. CURP2[0] = NEXP2[0];
  1000. CURLENG = NEXLENG;
  1001. CURLENW = NEXLENW;
  1002. CURLINE = NEXLINE;
  1003. FOR I = 0 STEP 1 UNTIL MXTOKW-1 DO
  1004. BEGIN
  1005. NEXWORD[I] = " "; # CLEAR NEXWORD #
  1006. END
  1007. NEXTYPE = 0; # CLEAR NEXINFO #
  1008. NEXLXID = 0;
  1009. NEXP1[0] = 0;
  1010. NEXP2[0] = 0;
  1011. NEXLENG = 0;
  1012. NEXLENW = 1;
  1013. NEXLINE = 0;
  1014. IF CURWORD[0] EQ "." AND NOT DEFFLAG
  1015. THEN # IF PERIOD AND NOT DEFINE, SCAN FOR -*- #
  1016. BEGIN
  1017. FOR I=0 WHILE CURSTAT NQ STAT"EOC" DO
  1018. BEGIN
  1019. IF CURSTAT EQ STAT"TRACE"
  1020. THEN
  1021. BEGIN
  1022. TFLAG = TFLAG + 1; # RESET TRACE FLAG #
  1023. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1024. TEST I;
  1025. END
  1026. IF CURSTAT NQ STAT"BLANK"
  1027. THEN # CHECK FOR ASTERISK #
  1028. BEGIN
  1029. IF CURCHAR NQ "*"
  1030. THEN
  1031. BEGIN
  1032. CTEMP = CURCHAR;
  1033. ERRMS1(ERR22,LINE,CTEMP);# NO ASTERISK FOUND #
  1034. END
  1035. FOR I=0 WHILE CURSTAT NQ STAT"EOC" DO
  1036. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1037. END
  1038. ELSE
  1039. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1040. END
  1041. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1042. NEXLINE = LINE;
  1043. END
  1044. WORD$BOUND = 10; # INITIALIZE WORD BOUND #
  1045. STATE = STATE0; # INITIAL STATE IS ZERO #
  1046. GOTO STARTSTATE; # GO TO STATE TABLE #
  1047. # #
  1048. PROCEED:
  1049. IF DEFFLAG # IF DEFINE STRING IS BEING #
  1050. THEN # PARSED, GET NEXT CHAR FROM #
  1051. GETDCHAR(CURCHAR,CURSTAT); # STRING #
  1052. ELSE
  1053. GETSCHAR(CURCHAR,LINE,CURSTAT);#GET NEXT CHAR FOR SOURCE #
  1054. GOTO STARTSTATE;
  1055. STORCHAR: # STORE CHARACTER AND GET NEXT ONE #
  1056. IF NEXLENG LS MXTOK # IF NEXWORD IS LESS THAN MAX TOKEN LENGTH#
  1057. THEN # STORE CHAR AND INCREMENT LENGTH #
  1058. BEGIN
  1059. I = (NEXLENG)/10; # INDEX FOR WORDS IN TOKEN (TRUNCATED) #
  1060. C<NEXLENG-(10*I),1>NEXWORD[I] = CURCHAR;
  1061. END
  1062. ELSE # NEXWORD IS LONGER THAN MAX TOKEN LENGTH,#
  1063. BEGIN # IGNORE REST OF TOKEN #
  1064. STATE = STATE3;
  1065. END
  1066. NEXLENG = NEXLENG + 1; # INCREMENT TOKEN LENGTH #
  1067. IF NEXLENG GQ WORD$BOUND
  1068. THEN # IF REACHED END OF CURRENT WORD #
  1069. BEGIN
  1070. NEXLENW = NEXLENW + 1; # INCREMENT WORD COUNT #
  1071. WORD$BOUND = WORD$BOUND + 10; # SET NEW WORD BOUND LIMIT #
  1072. END
  1073. GOTO PROCEED; # GET NEXCHAR AND PROCEED #
  1074. # #
  1075. SETTRACE: # SET/CLEAR TRACE FLAG #
  1076. TFLAG = TFLAG + 1;
  1077. GOTO PROCEED; # GET NEXT CHARACTER AND PROCEED #
  1078. # #
  1079. NAME: # SEE IF NAME IS IN LEXWORDS(KEYWORD LIST)#
  1080. FOUND = FALSE; # CLEAR FOUND FLAG #
  1081. CHARGRP = B<0,6>NEXWORD[0]; # SET CHARACTER GROUP #
  1082. WDPTR = B<6,12>LEXENTRY[CHARGRP] / 2; # SET POINTER INTO TBL#
  1083. ENTRIES = B<0,6>LEXENTRY[CHARGRP]; # SET NUM OF ENTRIES #
  1084. FOR I=0 STEP 1 WHILE I LS ENTRIES AND NOT FOUND DO
  1085. BEGIN
  1086. IF NEXWORD[0] EQ LWORD[WDPTR]
  1087. THEN
  1088. BEGIN
  1089. FOUND = TRUE; # IF FOUND IN LEXWORDS THEN INICATE SO #
  1090. TEST I;
  1091. END
  1092. WDPTR = WDPTR + 1;
  1093. END
  1094. IF FOUND
  1095. THEN # IF FOUND -- #
  1096. BEGIN
  1097. NEXLXID = LEXID[WDPTR]; # SET NEXLEXID #
  1098. NEXP1[0] = P1[WDPTR]; # SET NEXP1 #
  1099. NEXP2[0] = P2[WDPTR]; # SET NEXP2 #
  1100. NEXTYPE = TYPEKWD; # SET NEXTYPE TO KEYWORD #
  1101. END
  1102. ELSE # IF NOT FOUND -- #
  1103. NEXTYPE = TYPENAM; # SET NEXTYPE TO NAME #
  1104. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1105. RETURN; # **** RETURN **** #
  1106. # #
  1107. NUMBER:
  1108. NEXTYPE = TYPENUM; # SET NEXTYPE TO NUMBER #
  1109. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1110. RETURN; # **** RETURN **** #
  1111. # #
  1112. UNKNOWN:
  1113. NEXTYPE = TYPEUNK; # SET NEXTYPE TO COMPLEX(UNKNOWN) #
  1114. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1115. RETURN; # **** RETURN **** #
  1116. # #
  1117. DELIMITER:
  1118. C<0,1>NEXWORD[0] = CURCHAR; # STORE DELIMITER #
  1119. NEXTYPE = TYPEKWD; # SET NEXTYPE TO KEYWORD #
  1120. NEXLENG = 1; # SET NEXLENG TO ONE CHAR #
  1121. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1122. CHARGRP = 0; # CHARACTER GROUP IS ZERO #
  1123. WDPTR = B<6,12>LEXENTRY[CHARGRP] / 2;# STORE BEGIN WORD POINTER #
  1124. ENTRIES = B<0,6>LEXENTRY[CHARGRP];#STORE NUMBER OF ENTRIES #
  1125. FOUND = FALSE; # CLEAR FOUND FLAG #
  1126. FOR I=0 STEP 1 WHILE I LS ENTRIES AND NOT FOUND DO
  1127. BEGIN
  1128. IF NEXWORD[0] EQ LWORD[WDPTR]
  1129. THEN
  1130. BEGIN
  1131. NEXLXID = LEXID[WDPTR];
  1132. FOUND = TRUE;
  1133. END
  1134. WDPTR = WDPTR + 1;
  1135. END
  1136. IF DEFFLAG
  1137. THEN # GET NEXT CHARACTER #
  1138. GETDCHAR(CURCHAR,CURSTAT);
  1139. ELSE
  1140. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1141. RETURN; # **** RETURN **** #
  1142. # #
  1143. PERIOD:
  1144. IF DEFFLAG # IF DEFINE FLAG SET, #
  1145. THEN # PERIOD INDICATES END OF DEFINE-STRING #
  1146. BEGIN
  1147. DEFFLAG = FALSE; # CLEAR DEFINE FLAG #
  1148. CURCHAR = CURCHAR$TEMP; # GET CURRENT CHAR IN SOURCE #
  1149. CURSTAT = CURSTAT$TEMP; # GET STATUS OF CURCHAR #
  1150. C<DEFCOL,1>ESIBUFF[0] = CURCHAR;#PUT CURRENT CHAR IN LINE IMAGE#
  1151. DEFCOL = DEFCOL + 1; # INCREMENT COLUMN POINTER #
  1152. GOTO STARTSTATE; # FORM NEXT ELEMENT IN SOURCE #
  1153. END
  1154. ELSE # PERIOD INDICATES END OF STATEMENT #
  1155. BEGIN
  1156. NEXWORD[0] = ". "; # STORE PERIOD #
  1157. NEXTYPE = TYPEKWD; # SET NEXTYPE TO KEYWORD #
  1158. NEXLENG = 1; # SET NEXLENG TO ONE CHARACTER #
  1159. NEXLXID = PERIOD$ID; # SET LEXED TO -PERIOD- #
  1160. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1161. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1162. RETURN; # **** RETURN **** #
  1163. END
  1164. RETURN; # **** RETURN **** #
  1165. # #
  1166. ASTRISK:
  1167. IF VAL$DEC # IF CURRENTLY PARSING VALUE-DEC PORTION #
  1168. THEN
  1169. BEGIN
  1170. NEXLXID = 999; # SET LEX I.D. TO INDICATE ASTRSK PRESENT #
  1171. IF STATE EQ STATE0 # IF CURRENT STATE IS ZERO #
  1172. THEN
  1173. BEGIN
  1174. GOTO TRANS01; # ASSUME NEXWORD IS A NAME -- #
  1175. END # SET CURRENT STATE TO ONE #
  1176. ELSE # NOT IN INIT STATE #
  1177. BEGIN
  1178. GOTO STORCHAR; # JUST STORE CHAR WITH NO STATE CHANGE #
  1179. END
  1180. END
  1181. ELSE # NOT PARSING VALUE-DEC PORTION -- #
  1182. BEGIN # TREAT ASTERISK AS DELIMITER #
  1183. CURSTAT = STAT"DELIM"; # SET STAT OF CRNT CHAR TO DELIM#
  1184. GOTO STARTSTATE;
  1185. END
  1186. # #
  1187. SPECIAL:
  1188. C<0,1>NEXWORD[0] = CURCHAR; # STORE SPECIAL CHARACTER #
  1189. NEXTYPE = TYPEUNK; # SET NEXTYPE TO UNKNOWN #
  1190. NEXLENG = 1; # SET NEXLENG TO ONE CHARACTER #
  1191. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1192. IF DEFFLAG # GET NEXT CHARACTER #
  1193. THEN
  1194. GETDCHAR(CURCHAR,CURSTAT);
  1195. ELSE
  1196. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1197. RETURN; # **** RETURN **** #
  1198.  
  1199. STRING:
  1200. IF DEFFLAG # SKIP TERMINATING QUOTE #
  1201. THEN
  1202. BEGIN
  1203. GETDCHAR(CURCHAR,CURSTAT);
  1204. END
  1205. ELSE
  1206. BEGIN
  1207. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1208. END
  1209. NEXTYPE = TYPENUM; # STRINGS HAVE NUMERIC TYPE #
  1210. NEXLINE = LINE; # SAVE CURRENT LINE NUMBER #
  1211. RETURN;
  1212. # #
  1213. EOF: # END OF FILE SENSED #
  1214. NEXTYPE = TYPEEOF; # SET TYPE TO EOF #
  1215. NEXLENG = 0; # CLEAR NEXLENG #
  1216. RETURN; # **** RETURN **** #
  1217. # #
  1218. STARTSTATE:
  1219. GOTO NDLJMPVCTR[B<STATE,6>STATETABLE[CURSTAT]];
  1220. # #
  1221. TRANS01:
  1222. STATE = STATE1; # SET STATE AND #
  1223. GOTO STORCHAR; # STORE CHARACTER #
  1224. TRANS02:
  1225. STATE = STATE2;
  1226. GOTO STORCHAR;
  1227. TRANS03:
  1228. STATE = STATE3;
  1229. GOTO STORCHAR;
  1230. TRANS04: # START OF STRING #
  1231. STATE = STATE4;
  1232. GOTO PROCEED;
  1233. TRANS05:
  1234. STATE = STATE5;
  1235. GOTO STORCHAR;
  1236. TRANS06:
  1237. STATE = STATE6;
  1238. GOTO STORCHAR;
  1239. TRANS07:
  1240. STATE = STATE7;
  1241. GOTO STORCHAR;
  1242. TRANS08:
  1243. STATE = STATE8;
  1244. GOTO STORCHAR;
  1245. TRANS09:
  1246. STATE = STATE9;
  1247. GOTO STORCHAR;
  1248. # #
  1249. ERR:
  1250. RETURN; # **** RETURN **** #
  1251. # #
  1252. END # LEXSCAN #
  1253. CONTROL EJECT;
  1254. PROC LEXSNC;
  1255. BEGIN # SKIP TO NEXT CARD IMAGE #
  1256. *IF,DEF,IMS
  1257. #
  1258. ** LEXSNC - SKIP TO NEXT CARD/SOURCE LINE.
  1259. *
  1260. * D.K. ENDO 81/10/23
  1261. *
  1262. * THIS PROCEDURE CAUSES SCANNING OF SOURCE TO RESUME ON NEXT SOURCE
  1263. * LINE.
  1264. *
  1265. * PROC LEXSNC
  1266. *
  1267. * ENTRY NONE.
  1268. *
  1269. * EXIT NONE.
  1270. *
  1271. * METHOD
  1272. *
  1273. * SCAN TO END OF CARD.
  1274. * IF EOF IS NOT ENCOUNTERED,
  1275. * GET CHARACTER ON NEXT LINE.
  1276. *
  1277. #
  1278. *ENDIF
  1279. ITEM I; # SCRATCH ITEM #
  1280. # #
  1281. # CODE BEGINS HERE #
  1282. # #
  1283. FOR I=0 WHILE CURSTAT NQ STAT"EOC" AND CURSTAT NQ STAT"EOF" DO
  1284. GETSCHAR(CURCHAR,LINE,CURSTAT);# SCAN TO END OF CARD #
  1285. IF CURSTAT NQ STAT"EOF"
  1286. THEN # IF NOT EOF, THEN GET NEXT CHAR#
  1287. GETSCHAR(CURCHAR,LINE,CURSTAT);
  1288. RETURN; # **** RETURN **** TO STD #
  1289. END # LEXSNC #
  1290. CONTROL EJECT;
  1291. PROC PRINTRC(MSG,MLENG); # PRINTS TRACE LINE #
  1292. BEGIN
  1293. *IF,DEF,IMS
  1294. #
  1295. ** PRINTRC - PRINT TRACE LINE.
  1296. *
  1297. * D.K. ENDO 81/10/23
  1298. *
  1299. * THIS PROCEDURE PRINT TRACE MESSAGE WHEN CALLED BY STD.
  1300. *
  1301. * PROC PRINTRC(MSG,MLENG)
  1302. *
  1303. * ENTRY MSG = TRACE MESSAGE TO BE PRINTED.
  1304. * MLENG = LENGTH OF MESSAGE IN CHARACTERS.
  1305. *
  1306. * EXIT NONE.
  1307. *
  1308. * METHOD
  1309. *
  1310. * CALCULATE LENGTH OF MESSAGE IN CP WORDS.
  1311. * WRITE MESSAGE TO SECONDARY INPUT FILE
  1312. *
  1313. #
  1314. *ENDIF
  1315. ITEM MSG C(80); # MESSAGE TO BE PRINTED #
  1316. ITEM MLENG; # LENGTH OF MESSAGE IN NUM OF CHARACTERS #
  1317. ITEM I; # INTEGER TEMPORARY #
  1318. ITEM TEMP; # INTEGER TEMPORARY #
  1319. ITEM STATS; # STATUS RETURNED BY WRITEH #
  1320. # #
  1321. # CODE BEGINS HERE #
  1322. # #
  1323. TEMP = MLENG;
  1324. FOR I=0 STEP 1 WHILE TEMP GR 0 DO
  1325. TEMP = TEMP - 10; # CALCULATE NUMBER OR WORDS IN MSG #
  1326. TEMP = I;
  1327. WRITEH(SECFET,MSG,TEMP,STATS);
  1328. RETURN; # **** RETURN **** #
  1329. END # PRINTRC #
  1330. CONTROL EJECT;
  1331. PROC SUBR;
  1332. BEGIN
  1333. *IF,DEF,IMS
  1334. #
  1335. ** SUBR - SYNTATIC SUB-ROUTINES CALLED BY STD
  1336. *
  1337. * D.K. ENDO 81/10/23
  1338. *
  1339. * THE PROCEDURE IS USED BY STD TO CALLED PROC-S AS NEEDED TO PARSE
  1340. * THE NDL SOURCE INPUT.
  1341. *
  1342. * PROC SUBR
  1343. *
  1344. * ENTRY NONE.
  1345. *
  1346. * EXIT NONE.
  1347. *
  1348. * METHOD
  1349. *
  1350. * BY WAY OF A SWITCH, WHICH CAN BE EXTERNALLY REFERENCED BY STD,
  1351. * THE APPROPRIATE PROC IS CALLED TO PROCESS AND CHECK THE NDL
  1352. * SOURCE INPUT. THE PROC-S CALLED ARE:
  1353. *
  1354. * CHKDEV CKGNAME ENTLABL SCNTOPRD
  1355. * CHKHEX CKKWD ENTNID SDEFINE
  1356. * CHKNAME CKLNAME ENTVAL STERM
  1357. * CHKTABL CKSTMTDEC NAMEGEN STITLE
  1358. * CKDEFNAM CKVDEC PS1TERM
  1359. *
  1360. #
  1361. *ENDIF
  1362. XREF
  1363. BEGIN
  1364. PROC STD$RET;
  1365. END
  1366. XDEF
  1367. BEGIN
  1368. SWITCH SUBRJUMP # SWITCH FOR SYNTACTIC SUBROUTINES #
  1369. CKCMNT,
  1370. CKLBNM,
  1371. CKSTDEC,
  1372. SCNTOPD,
  1373. CKDELIM,
  1374. CKDEFNM,
  1375. CKKYWD,
  1376. CKVALDC,
  1377. STORDEF,
  1378. STORTITLE,
  1379. STMTTRM,
  1380. PSS1TRM;
  1381. END
  1382. DEF AYE # "A" #;
  1383. DEF BLANK # " " #;
  1384. DEF EFF # "F" #;
  1385. DEF NINE # "9" #;
  1386. DEF USER$TIP # "TT1" #; # FIRST THREE CHARS OF USER TIP #
  1387. DEF ZERO # "0" #;
  1388. ITEM CKSTAT B; # STATUS RETURNED FROM CHECKING ROUTINE #
  1389. ITEM CRNT$LTYPE C(10); # CURRENT LINE TYPE #
  1390. ITEM CRNT$TIP C(10); # CURRENT TIPTYPE #
  1391. ITEM CTEMP C(10); # TEMPORARY FOR CHARACTER STRING #
  1392. ITEM KWDFLAG B; # FLAG SET OF LABEL IS A KEYWORD #
  1393. ITEM KWID; # KEYWORD-ID OF KEYWORD BEING CHECKED #
  1394. ITEM LAST$STID = 18; # STATEMENT-ID OF PREVIOUS STATEMENT #
  1395. # INITIALIZE TO -COMMENT- STMT I.D. #
  1396. ITEM LERR$CODE; # ERROR CODE #
  1397. ITEM LERR$LINE; # LINE NUMBER IN ERROR #
  1398. ITEM LERR$NAME C(10); # NAME OF LABEL IN ERROR #
  1399. ITEM RINFOWORD U; # TEMPORARY TO SAVE REPEAT INFORMATION #
  1400. ARRAY CURSTMT [0:0] S(1); # CURRENT STATEMENT #
  1401. BEGIN
  1402. ITEM CURSTID U(0,0,9); # STATEMENT-ID #
  1403. ITEM CUREFLG B(0,15,1); # LABEL ERROR FLAG #
  1404. ITEM CURKLBL B(0,16,1); # SET OF LABEL IS A KEYWORD #
  1405. ITEM CURLABL C(0,18,7); # STATEMENT LABEL #
  1406. END
  1407. ARRAY RPTINFO [0:0] S(1); # REPEAT INFORMATION #
  1408. BEGIN
  1409. ITEM GRPFLAG B(0,0,1); # GROUP FLAG #
  1410. ITEM SVCFLG B(0,1,1); # SVC FLAG #
  1411. ITEM PORTNUM U(0,6,9); # PORT NUMBER FROM GROUP STMT #
  1412. ITEM GRPCNT U(0,15,9); # GROUP COUNT #
  1413. ITEM NCIRVAL U(0,24,9); # NCIR VALUE #
  1414. ITEM RPTINFO$WORD U(0,0,60) = [0];
  1415. END
  1416. CONTROL EJECT;
  1417. PROC CHKDEC(CDWD,CDLENG,CDKWID,CDSTID,CDINT$VAL,CDRINFO,
  1418. CDLINE,CDSTAT);
  1419. BEGIN
  1420. *IF,DEF,IMS
  1421. #
  1422. ** CHKDEC - CHECK VALUE TO BE A DECIMAL NUMBER
  1423. *
  1424. * D.K. ENDO 81/10/23
  1425. *
  1426. * THIS PROCEDURE CHECKS A TOKEN TO BE A DECIMAL NUMBER AND CONVERTS
  1427. * IT TO INTEGER
  1428. *
  1429. * PROC CHKDEC(CDWD,CDKWID,CDSTID,CDINT$VAL,CDRINFO,CDLINE,CDSTAT)
  1430. *
  1431. * ENTRY CDWD = DISPLAY CODED NUMBER TO BE CHECKED.
  1432. * CDKWID = I.D. OF KEYWORD THE NUMBER IS ASSIGNED TO.
  1433. * CDSTID = CURRENT STATEMENT I.D.
  1434. * CDRINFO = REPEAT INFORMATION
  1435. * CDLINE = CURRENT LINE NUMBER
  1436. *
  1437. * EXIT CDINT$VAL = CONVERTED INTEGER VALUE
  1438. * CDSTAT = STATUS OF VALUE(SET TO TRUE IF O.K.)
  1439. *
  1440. * METHOD
  1441. *
  1442. * STATUS RETURN STATUS TO O.K.
  1443. * FOR EACH CHARACTER FROM RIGHT TO LEFT,
  1444. * IF CHARACTER IS NOT A BLANK,
  1445. * IF CHARACTER IS NOT A DECIMAL DIGIT,
  1446. * THEN,
  1447. * SET RETURN STATUS TO ERROR.
  1448. * OTHERWISE,
  1449. * CALCULATE INTEGER VALUE OF CHARACTER.
  1450. * ADD INTEGER TO RETURN VALUE.
  1451. * IF RETURN STATUS IS O.K.,
  1452. * THEN,
  1453. * ENTER VALUE DECLARATION IN STMT ENTRY WITH INTEGER VALUE.
  1454. * OTHERWISE,
  1455. * FLAG ERROR -- NOT A DECIMAL VALUE.
  1456. * ENTER VALUE DECLARATION IN STMT ENTRY WITH CHARACTER VALUE.
  1457. *
  1458. #
  1459. *ENDIF
  1460. ARRAY CDWD [0:25] S(1);
  1461. BEGIN
  1462. ITEM CDWORD C(0,0,10);#NUMBER TEXT TO BE CHECKED #
  1463. END
  1464. ITEM CDLENG; # LENGTH OF TEXT #
  1465. ITEM CDKWID; # KEYWORD I.D. #
  1466. ITEM CDSTID; # CURRENT STATEMENT I.D. #
  1467. ITEM CDINT$VAL; # CONVERTED DECIMAL NUMBER IN BINARY #
  1468. ITEM CDRINFO; # REPEAT INFORMATION #
  1469. ITEM CDLINE; # CURRENT LINE NUMBER #
  1470. ITEM CDSTAT B; # RETURN STATUS OF NUMBER #
  1471. # #
  1472. ITEM CTEMP C(1); # CHARACTER TEMPORARY #
  1473. ITEM EXPONENT; # ITEM USED TO STORE EXPONENT #
  1474. ITEM I; # SCRATCH ITEM #
  1475. ITEM ITEMP; # INTEGER TEMPORARY #
  1476. # #
  1477. ARRAY ERRVALU [0:0] S(1);
  1478. ITEM ERRWORD C(0,18,7); # VALUE IN RIGHT MOST 42 BITS #
  1479. CONTROL EJECT;
  1480. # #
  1481. # CODE BEGINS HERE #
  1482. # #
  1483. CDSTAT = TRUE; # SET RETURN STATUS TO O.K. #
  1484. EXPONENT = 0; # INITIALIZE EXPONENT VALUE #
  1485. CDINT$VAL = 0; # INITIALIZE RETURN BINARY VALUE #
  1486. FOR I=9 STEP -1 UNTIL 0 DO # BEGINNING FROM RIGHT, CHECK #
  1487. BEGIN # AND CONVERT EACH CHARACTER #
  1488. CTEMP = C<I,1>CDWORD[0]; # MASK CHARACTER #
  1489. IF CTEMP NQ BLANK # IF BLANK, THEN IGNORE #
  1490. THEN # ELSE #
  1491. BEGIN
  1492. IF CTEMP LS ZERO OR CTEMP GR NINE
  1493. THEN # IF NOT A DECIMAL CHARACTER #
  1494. BEGIN
  1495. CDSTAT = FALSE; # RETURN ERROR STATUS #
  1496. END
  1497. ELSE # CHARACTER IS O.K. #
  1498. BEGIN
  1499. IF EXPONENT LQ 14 # IF VALUE IS NOT TOO BIG #
  1500. THEN
  1501. BEGIN
  1502. ITEMP = CTEMP - ZERO; # CALCULATE BINARY VALUE #
  1503. CDINT$VAL = CDINT$VAL + (ITEMP * 10**EXPONENT);#ADD VALUE#
  1504. EXPONENT = EXPONENT + 1; # INCREMENT EXPONENT #
  1505. END
  1506. END
  1507. END
  1508. END
  1509. IF CDSTAT # NO ERRORS DETECTED #
  1510. THEN # MAKE VALUE-DECLARATION ENTRY #
  1511. BEGIN
  1512. ENTVAL(CDINT$VAL,CDKWID,CDSTID,CDWD,CDLENG,CDRINFO,
  1513. CDLINE,CDSTAT);
  1514. END
  1515. ELSE # ILLEGAL DECIMAL VALUE #
  1516. BEGIN # MAKE VALUE-DEC ENTRY WITH ILLEGAL TEXT#
  1517. ERRWORD[0] = CDWORD[0];
  1518. ENTVAL(ERRVALU,CDKWID,CDSTID,CDWD,CDLENG,CDRINFO,
  1519. CDLINE,CDSTAT);
  1520. IF CDKWID EQ KID"AL" # IF AL IS THE ERROR KEYWORD #
  1521. THEN
  1522. BEGIN
  1523. ERRMS1(ERR42,CDLINE,CDWORD[0]); # WARNING -- IS GENERATED #
  1524. END
  1525. ELSE
  1526. BEGIN
  1527. ERRMS1(ERR10,CDLINE,CDWORD[0]);
  1528. END
  1529. END
  1530. RETURN; # **** RETURN **** #
  1531. END # CHKDEC #
  1532. CONTROL EJECT;
  1533. PROC CHKHEX(CHWD,CHLENG,CHKWID,CHSTID,CHINT$VAL,CHRINFO,
  1534. CHLINE,CHSTAT);
  1535. BEGIN
  1536. *IF,DEF,IMS
  1537. #
  1538. ** CHKHEX - CHECK FOR HEXIDECIMAL VALUE.
  1539. *
  1540. * D.K. ENDO 81/11/18
  1541. *
  1542. * THIS PROCEDURE CHECKS A TOKEN TO BE HEXIDECIMAL AND CONVERTS IT
  1543. * TO INTEGER.
  1544. *
  1545. * PROC CHKHEX(CHWD,CHKWID,CHSTID,CHINT$VAL,CHRINFO,CHLINE,CHSTAT)
  1546. *
  1547. * ENTRY CHWD = CHARACTER NUMBER TO BE CHECKED.
  1548. * CHKWID = CURRENT KEYWORD I.D.
  1549. * CHSTID = CURRENT STATEMENT I.D.
  1550. * CHRINFO = CURRENT REPEAT INFO.
  1551. * CHLINE = CURRENT LINE NUMBER.
  1552. *
  1553. * EXIT CHINT$VAL = CONVERTED INTEGER VALUE.
  1554. * CHSTAT = RETURN STATUS -- SET TRUE IF O.K.
  1555. *
  1556. * METHOD
  1557. *
  1558. * SET RETURN STATUS TO O.K.
  1559. * FOR EACH CHARACTER FROM RIGHT TO LEFT,
  1560. * IF CHARACTER IS NOT BLANK,
  1561. * IF CHARACTER IS HEXIDECIMAL,
  1562. * THEN,
  1563. * CALCULATE INTEGER VALUE FOR CHARACTER.
  1564. * ADD INTEGER TO RETURN VALUE.
  1565. * OTHERWISE,
  1566. * SET RETURN STATUS TO ERROR.
  1567. * IF RETURN STATUS IS O.K.
  1568. * THEN
  1569. * ENTER VALUE DECLARATION IN STATEMENT ENTRY WITH INTEGER VALUE.
  1570. * OTHERWISE$
  1571. * FLAG ERROR -- NOT A HEXIDECIMAL VALUE.
  1572. * ENTER VALUE DECLARATION IN STATEMENT ENTRY WITH CHARACTER VALUE.
  1573. *
  1574. #
  1575. *ENDIF
  1576. ARRAY CHWD [0:25] S(1);
  1577. BEGIN
  1578. ITEM CHWORD C(0,0,10);#NUMBER TEXT TO BE CONVERTED #
  1579. END
  1580.  
  1581. ITEM CHLENG; # LENGTH OF TEXT #
  1582. ITEM CHKWID; # KEYWORD I.D. #
  1583. ITEM CHSTID; # CURRENT STATEMENT I.D. #
  1584. ITEM CHINT$VAL; # CONVERTED HEX NUMBER IN BINARY #
  1585. ITEM CHRINFO; # REPEAT INFORMATION #
  1586. ITEM CHLINE; # CURRENT LINE NUMBER #
  1587. ITEM CHSTAT B; # RETURNED STATUS OF NUMBER #
  1588. # #
  1589. ITEM CTEMP C(1); # CHARACTER TEMPORARY #
  1590. ITEM EXPONENT; # ITEM USED TO STORE EXPONENT #
  1591. ITEM I, J; # SCRATCH ITEMS #
  1592. ITEM ITEMP; # INTEGER TEMPORARY #
  1593. # #
  1594. ARRAY ERRVALU [0:0] S(1);
  1595. ITEM ERRWORD C(0,18,7); # VALUE IN RIGHT MOST 42 BITS #
  1596.  
  1597. ARRAY HEXVALU [0:25] S(1);
  1598. BEGIN
  1599. ITEM HEXV I(00,00,60);#4-BIT HEX VALUES FOR PAD OR UDATA #
  1600. END
  1601. ITEM HWI, HDI; # HEXVALU WORD INDEX, BIT DISPL. INDEX #
  1602. ITEM CWI, CDI; # CHWD WORD INDEX, CHWD CHAR. DISPL. INDEX#
  1603. CONTROL EJECT;
  1604. # #
  1605. # CODE BEGINS HERE #
  1606. # #
  1607. CHSTAT = TRUE; # SET RETURN STATUS TO O.K #
  1608. EXPONENT = 0; # INITIALIZE EXPONENT #
  1609. CHINT$VAL = 0; # INITIALIZE RETURN BINARY VALUE #
  1610. IF (CHKWID EQ KID"PAD") OR (CHKWID EQ KID"UDATA")
  1611. THEN
  1612. BEGIN # CLEAR HEX VALUE VECTOR #
  1613. FOR I = 0 STEP 1 UNTIL 25 DO
  1614. HEXV[I] = 0;
  1615. END
  1616. FOR I=CHLENG-1 STEP -1 UNTIL 0 DO
  1617. BEGIN # BEGINNING FROM RIGHT, CHECK #
  1618. # AND CONVERT EACH CHARACTER #
  1619. CWI = I/10; # CHWORD WORD INDEX #
  1620. CDI = I - CWI*10; # CHWORD CHAR. DISPL. INDEX #
  1621. CTEMP = C<CDI,1>CHWORD[CWI];
  1622. IF CTEMP NQ BLANK # MASK CHARACTER #
  1623. THEN
  1624. BEGIN
  1625. IF CTEMP GQ AYE AND CTEMP LQ EFF
  1626. THEN # IF CHARACTER IS BETWEEN -A- THRU -F- #
  1627. BEGIN # CONVERT TO BINARY #
  1628. IF EXPONENT LQ 11 # IF VALUE IS NOT TOO BIG #
  1629. THEN
  1630. BEGIN
  1631. ITEMP = (CTEMP - AYE) + 10;
  1632. CHINT$VAL = CHINT$VAL + (ITEMP * 16**EXPONENT);
  1633. EXPONENT = EXPONENT + 1;
  1634. END
  1635. END
  1636. ELSE # CHARACTER IS NOT -A- THRU -F- #
  1637. BEGIN
  1638. IF CTEMP GQ ZERO AND CTEMP LQ NINE
  1639. THEN # IF CHARACTER IS BETWEEN -0- THRU -9- #
  1640. BEGIN # CONVERT TO BINARY #
  1641. IF EXPONENT LQ 11 # IF VALUE IS NOT TOO BIG #
  1642. THEN
  1643. BEGIN
  1644. ITEMP = CTEMP - ZERO;
  1645. CHINT$VAL = CHINT$VAL + (ITEMP * 16**EXPONENT);
  1646. EXPONENT = EXPONENT + 1;
  1647. END
  1648. END
  1649. ELSE # CHARACTER IS NOT A HEX NUMBER #
  1650. BEGIN
  1651. CHSTAT = FALSE;# RETURN ERROR STATUS #
  1652. END
  1653. END
  1654. IF (CHKWID EQ KID"PAD") OR (CHKWID EQ KID"UDATA")
  1655. THEN
  1656. BEGIN
  1657. HWI = I*4/60; # HEXV WORD INDEX #
  1658. HDI = (I - HWI*15) *4; # HEXV BIT DISPLACEMENT INDEX #
  1659. B<HDI,4>HEXV[HWI] = B<56,4>CHINT$VAL;
  1660. CHINT$VAL = 0; # RESET HEX DIGIT VALUE #
  1661. EXPONENT = 0;
  1662. END
  1663. END
  1664. END
  1665. IF CHSTAT # IF VALUE IS A VALID HEX NUMBER #
  1666. THEN # MAKE VALUE-DECLARATION ENTRY #
  1667. BEGIN
  1668. IF (CHKWID EQ KID"PAD") OR (CHKWID EQ KID"UDATA")
  1669. THEN
  1670. BEGIN
  1671. ENTVAL(CHINT$VAL,CHKWID,CHSTID,HEXVALU,CHLENG,CHRINFO,
  1672. CHLINE,CHSTAT);
  1673. END
  1674. ELSE
  1675. BEGIN
  1676. ENTVAL(CHINT$VAL,CHKWID,CHSTID,CHWD,CHLENG,CHRINFO,
  1677. CHLINE,CHSTAT);
  1678. END
  1679. END
  1680. ELSE # VALUE IN NOT A VALID HEX NUMBER #
  1681. BEGIN
  1682. ERRWORD[0] = C<0,7>CHWORD[0];
  1683. ENTVAL(ERRVALU,CHKWID,CHSTID,CHWD,CHLENG,CHRINFO,
  1684. CHLINE,CHSTAT);
  1685. ERRMS1(ERR10,CHLINE,CHWORD[0]);
  1686. END
  1687. RETURN; # **** RETURN **** #
  1688. END # CHKHEX #
  1689. CONTROL EJECT;
  1690. PROC CHKNAME(CNWD,CNKWID,CNSTID,CNTYPE,CNLENG,
  1691. CNRINFO,CNLINE,CNSTAT);
  1692. BEGIN
  1693. *IF,DEF,IMS
  1694. #
  1695. ** CHKNAME - CHECK FOR NAME.
  1696. *
  1697. * D.K. ENDO 81/11/18
  1698. *
  1699. * THIS PROCEDURE CHECKS THE VALUE TO BE A LEGAL NAME(7 CHARACTERS,
  1700. * BEGINNING WITH A LETTER, CONSISTS OF ONLY ALPHANUMERIC CHARACTERS)
  1701. *
  1702. * PROC CHKNAME(CNWD,CNKWID,CNSTID,CNTYPE,CNLENG,CNLINE,CNSTAT)
  1703. *
  1704. * ENTRY CNWD = NAME TO BE CHECKED.
  1705. * CNKWID = CURRENT KEYWORD I.D.
  1706. * CNSTID = CURRENT STATEMENT I.D.
  1707. * CNTYPE = LEXICAL TYPE FOR NAME.
  1708. * CNLENG = LENGTH OF NAME IN CHARACTERS.
  1709. * CNLINE = CURRENT LINE NUMBER.
  1710. *
  1711. * EXIT CNSTAT = RETURN STATUS -- SET TRUE IF O.K.
  1712. *
  1713. * METHOD
  1714. *
  1715. * IF NAME IS CLASSIFIED AS NAME OR KEYWORD,
  1716. * THEN,
  1717. * IF LENGTH OF NAME LESS THAN OR EQUAL TO SEVEN,
  1718. * THEN,
  1719. * IF NAME DOES NOT CONTAIN ASTERISKS,
  1720. * THEN
  1721. * SET STATUS TO O.K.
  1722. * OTHERWISE,
  1723. * FLAG ERROR -- INVALID NAME.
  1724. * SET RETURN STATUS TO ERROR.
  1725. * OTHERWISE,
  1726. * FLAG ERROR -- NAME TO LONG.
  1727. * SET RETURN STATUS TO ERROR.
  1728. * OTHERWISE,
  1729. * FLAG ERROR -- INVALID NAME.
  1730. * SET RETURN STATUS TO ERROR.
  1731. * ENTER VALUE DECLARATION IN STATEMENT TABLE.
  1732. *
  1733. #
  1734. *ENDIF
  1735. ARRAY CNWD [0:25] S(1);
  1736. BEGIN
  1737. ITEM CNWORD C(0,0,10);#LABEL-NAME VALUE #
  1738. END
  1739. ITEM CNKWID; # KEYWORD I.D. #
  1740. ITEM CNSTID; # CURRENT STATEMENT I.D. #
  1741. ITEM CNTYPE; # LEXICAL TYPE OF VALUE #
  1742. ITEM CNLENG; # LENGTH OF LABEL-NAME IN CHARACTERS #
  1743. ITEM CNRINFO; # REPEAT INFORMATION #
  1744. ITEM CNLINE; # CURRENT LINE NUMBER #
  1745. ITEM CNSTAT B; # RETURN STATUS OF LABEL-NAME #
  1746. # #
  1747. ARRAY LAB$NAME [0:0] S(1);
  1748. ITEM RIGHT$WORD C(0,18,7); # NAME IN RIGHT MOST 42 BITS #
  1749. CONTROL EJECT;
  1750. # #
  1751. # CODE BEGINS HERE #
  1752. # #
  1753. IF CNTYPE EQ TYPENAM OR CNTYPE EQ TYPEKWD # IF NAME OR KEYWORD #
  1754. THEN # (ASSUMES NO DELIMITERS AT THIS POINT) #
  1755. BEGIN
  1756. IF CNLENG LQ 7 # IF 7 CHARACTERS OR LESS IN LENGTH #
  1757. THEN
  1758. BEGIN
  1759. IF CURLXID NQ 999 # IF NO ASTERISK IN NAME #
  1760. THEN
  1761. BEGIN
  1762. CNSTAT = TRUE; # RETURN A STATUS OF O.K. #
  1763. END
  1764. ELSE # ASTERISK PRESENT IN NAME #
  1765. BEGIN # FLAG ERROR -- INVALID VALUE #
  1766. ERRMS1(ERR10,CNLINE,CNWORD[0]);
  1767. CNSTAT = FALSE; # RETURN ERROR STATUS #
  1768. END
  1769. END
  1770. ELSE # GREATER THAN 7 CHARACTERS #
  1771. BEGIN
  1772. CNSTAT = FALSE; # RETURN ERROR STATUS #
  1773. ERRMS1(ERR10,CNLINE,CNWORD[0]); # FLAG ERROR -- INVALID NAME #
  1774. END
  1775. END
  1776. ELSE # DOES NOT BEGIN WITH LETTER #
  1777. BEGIN
  1778. CNSTAT = FALSE; # RETURN ERROR STATUS #
  1779. ERRMS1(ERR10,CNLINE,CNWORD[0]); # FLAG ERROR -- INVALID NAME #
  1780. END
  1781. RIGHT$WORD[0] = CNWORD[0]; # PUT NAME IN RIGHT MOST 42 BITS #
  1782. ENTVAL(LAB$NAME,CNKWID,CNSTID,CNWD,CNLENG,CNRINFO,
  1783. CNLINE,CNSTAT);
  1784. RETURN; # **** RETURN **** #
  1785. END # CHKNAME #
  1786. CONTROL EJECT;
  1787. PROC CHKTABL(CKTWORD,CKTLENG,CKTKWID,CKTSTID,CKTRINFO,
  1788. CKTLINE,CKTSTAT);
  1789. BEGIN
  1790. *IF,DEF,IMS
  1791. #
  1792. ** CHKTABL - CHECK TABLE FOR LEGAL VALUE.
  1793. *
  1794. * D.K. ENDO 81/10/23
  1795. *
  1796. * THIS PROCEDURE CHECKS A TABLE FOR THE CURRENT VALUE BEING CHECKED.
  1797. *
  1798. * PROC CHKTABL(CKTWORD,CKTKWID,CKTSTID,CKTRINFO,CKTLINE,CKTSTAT)
  1799. *
  1800. * ENTRY CKTWORD = VALUE TO BE CHECKED IN TABLE.
  1801. * CKTKWID = CURRENT KEYWORD I.D.
  1802. * CKTSTID = CURRENT STATEMENT I.D.
  1803. * CKTRINFO = REPEAT INFORMATION.
  1804. * CKTLINE = CURRENT SOURCE LINE NUMBER.
  1805. *
  1806. * EXIT CKTSTAT = RETURNED STATUS (SET -TRUE- IF VALUE FOUND)
  1807. *
  1808. * METHOD
  1809. *
  1810. * POINT BASED ARRAY AT TABLE TO BE CHECKED.(DETERMINED BY KEYWORD)
  1811. * SEARCH TABLE FOR VALUE.
  1812. * IF VALUE FOUND,
  1813. * THEN,
  1814. * SET CKTSTAT TO TRUE.
  1815. * OTHERWISE,
  1816. * SET CKTSTAT TO FALSE.
  1817. * FLAG ERROR.
  1818. * PUT VALUE-DECLARATION IN STATEMENT ENTRY.
  1819. *
  1820. #
  1821. *ENDIF
  1822. ITEM CKTWORD C(10); # VALUE TO BE CHECKED IN TABLE #
  1823. ITEM CKTLENG; # LENGTH OF VALUE #
  1824. ITEM CKTKWID; # KEYWORD I.D. #
  1825. ITEM CKTSTID; # CURRENT STATEMENT I.D. #
  1826. ITEM CKTRINFO; # REPEAT INFORMATION #
  1827. ITEM CKTLINE; # CURRENT LINE NUMBER #
  1828. ITEM CKTSTAT B; # RETURN STATUS OF BVALUE #
  1829. # #
  1830. ITEM FOUND B; # FLAG INDICATING VALUE FOUND IN TABLE #
  1831. ITEM I; # SCRATCH ITEM #
  1832. # #
  1833. BASED ARRAY TAB$TEMPLATE [0:0] S(1);
  1834. BEGIN
  1835. ITEM ENTRY$CNT U(0,54,6);
  1836. ITEM TAB$VALUE C(0,0,10);
  1837. END
  1838. # #
  1839. ARRAY LABEL$NAME [0:0] S(1);
  1840. ITEM RIGHT$WORD C(0,18,7); # VALUE IN RIGHT MOST 42 BITS #
  1841. # #
  1842. DEF MXCSET # 10 #;
  1843. ARRAY CSET$TABLE[0:MXCSET] S(1);
  1844. BEGIN
  1845. ITEM CSCNT U(0,54,6) = [MXCSET];
  1846. ITEM CSVALUE C(0,0,10)= [,"BCD ",
  1847. "ASCII ",
  1848. "APLTP ",
  1849. "APLBP ",
  1850. "EBCD ",
  1851. "EBCDAPL ",
  1852. "CORRES ",
  1853. "CORAPL ",
  1854. "EBCDIC ",
  1855. "CSET15 "
  1856. ];
  1857. END
  1858. DEF MXCTYP # 2 #;
  1859. ARRAY CTYP$TABLE [0:MXCTYP] S(1);
  1860. BEGIN
  1861. ITEM CTPCNT U(0,54,6) = [MXCTYP];
  1862. ITEM CTPVALUE C(0,0,10) = [,"PVC ",
  1863. "SVC "
  1864. ];
  1865. END
  1866. DEF MXDT # 7 #;
  1867. ARRAY DT$TABLE [0:MXDT] S(1);
  1868. BEGIN
  1869. ITEM DTCNT U(0,54,6) = [MXDT];
  1870. ITEM DTVALUE C(0,0,10) = [,"CON ",
  1871. "CR ",
  1872. "LP ",
  1873. "CP ",
  1874. "PL ",
  1875. "DT12 ",
  1876. "AP "
  1877. ];
  1878. END
  1879. DEF MXEBR # 4 #;
  1880. ARRAY EBR$TABLE [0:MXEBR] S(1);
  1881. BEGIN
  1882. ITEM EBRCNT U(0,54,6) = [MXEBR];
  1883. ITEM EBR$VAL C(0,0,10) = [,"NO ",
  1884. "CR ",
  1885. "LF ",
  1886. "CL "
  1887. ];
  1888. END
  1889. DEF MXELO # 2 #;
  1890. ARRAY ELO$TABLE [0:MXELO] S(1);
  1891. BEGIN
  1892. ITEM ELOCNT U(0,54,6) = [MXELO];
  1893. ITEM ELO$VAL C(0,0,10) = [,"EL ",
  1894. "EB "
  1895. ];
  1896. END
  1897. DEF MXIN # 3 #;
  1898. ARRAY IN$TABLE [0:MXIN] S(1);
  1899. BEGIN
  1900. ITEM INCNT U(0,54,6) = [MXIN];
  1901. ITEM INVALUE C(0,0,10) = [,"KB ",
  1902. "PT ",
  1903. "BK "
  1904. ];
  1905. END
  1906. DEF MXLINK # 2 #;
  1907. ARRAY LINK$TABLE [0:MXLINK] S(1);
  1908. BEGIN
  1909. ITEM LKCNT U(0,54,6) = [MXLINK];
  1910. ITEM LKVALUE C(0,0,10) = [,"LAP ",
  1911. "LAPB "
  1912. ];
  1913. END
  1914. DEF MXLOC # 2 #;
  1915. ARRAY LOC$TABLE [0:MXLOC] S(1);
  1916. BEGIN
  1917. ITEM LCCNT U(0,54,6) = [MXLOC];
  1918. ITEM LCVALUE C(0,0,10) = [,"PRIMARY ",
  1919. "SECOND "
  1920. ];
  1921. END
  1922. DEF MXLSPEED # 11 #;
  1923. ARRAY LSPEED$TABLE [0:MXLSPEED] S(1);
  1924. BEGIN
  1925. ITEM LSPDCNT U(0,54,6) = [MXLSPEED];
  1926. ITEM LSPDVALUE C(0,0,10) = [,"110 ",
  1927. "134 ",
  1928. "150 ",
  1929. "300 ",
  1930. "600 ",
  1931. "1200 ",
  1932. "2400 ",
  1933. "4800 ",
  1934. "9600 ",
  1935. "19200 ",
  1936. "38400 "
  1937. ];
  1938. END
  1939. DEF MXLTYPE # 9 #;
  1940. ARRAY LTYPE$TABLE [0:MXLTYPE] S(1);
  1941. BEGIN
  1942. ITEM LTYPECNT U(0,54,6) = [MXLTYPE];
  1943. ITEM LTYPE$VAL C(0,0,10) = [,"S1 ",
  1944. "S2 ",
  1945. "S3 ",
  1946. "S4 ",
  1947. "A1 ",
  1948. "A2 ",
  1949. "A6 ",
  1950. "H1 ",
  1951. "H2 "
  1952. ];
  1953. END
  1954. DEF MXOP # 3 #;
  1955. ARRAY OP$TABLE [0:MXOP] S(1);
  1956. BEGIN
  1957. ITEM OPCNT U(0,54,6) = [MXOP];
  1958. ITEM OPVALUE C(0,0,10) = [,"PR ",
  1959. "DI ",
  1960. "PT "
  1961. ];
  1962. END
  1963. DEF MXPA # 5 #;
  1964. ARRAY PA$TABLE [0:MXPA] S(1);
  1965. BEGIN
  1966. ITEM PACNT U(0,54,6) = [MXPA];
  1967. ITEM PAVALUE C(0,0,10) = [,"Z ",
  1968. "O ",
  1969. "E ",
  1970. "N "
  1971. ,"I "
  1972. ];
  1973. END
  1974. DEF MXPSN # 10 #;
  1975. ARRAY PSN$TABLE [0:MXPSN] S(1);
  1976. BEGIN
  1977. ITEM PSNCNT U(0,54,6) = [MXPSN];
  1978. ITEM PSNVALUE C(0,0,10) = [,"DATAPAC ",
  1979. "TELENET ",
  1980. "TRNSPAC ",
  1981. "TYMNET ",
  1982. "CDSN ",
  1983. "UNINET ",
  1984. "C120 ",
  1985. "PSN253 ",
  1986. "PSN254 ",
  1987. "PSN255 "
  1988. ];
  1989. END
  1990. DEF MXSDT # 11 #;
  1991. ARRAY SDT$TABLE [0:MXSDT] S(1);
  1992. BEGIN
  1993. ITEM SDTCNT U(0,54,6) = [MXSDT];
  1994. ITEM SDTVALUE C(0,0,10) = [,"A6 ",
  1995. "B6 ",
  1996. "A9 ",
  1997. "26 ",
  1998. "29 ",
  1999. "6BIT ",
  2000. "8BIT ",
  2001. "SDT12 ",
  2002. "SDT13 ",
  2003. "SDT14 ",
  2004. "SDT15 "
  2005. ];
  2006. END
  2007. DEF MXSTIP # 11 #;
  2008. ARRAY STIP$TABLE [0:MXSTIP] S(1);
  2009. BEGIN
  2010. ITEM STIPCNT U(0,54,6) = [MXSTIP];
  2011. ITEM STIPVALUE C(0,0,10) = [,"M4A ",
  2012. "M4C ",
  2013. "2741 ",
  2014. "N2741 ",
  2015. "POST ",
  2016. "PRE ",
  2017. "PAD ",
  2018. "USER ",
  2019. "XAA ",
  2020. "2780 ",
  2021. "3780 "
  2022. ];
  2023. END
  2024. DEF MXTC # 24 #;
  2025. ARRAY TC$TABLE [0:MXTC] S(1);
  2026. BEGIN
  2027. ITEM TCCNT U(0,54,6) = [MXTC];
  2028. ITEM TCVALUE C(0,0,10) = [,"M33 ",
  2029. "713 ",
  2030. "M40 ",
  2031. "H2000 ",
  2032. "751 ",
  2033. "T4014 ",
  2034. "2741 ",
  2035. "HASP ",
  2036. "HPRE ",
  2037. "200UT ",
  2038. "734 ",
  2039. "714X ",
  2040. "711 ",
  2041. "714 ",
  2042. "2780 ",
  2043. "3780 ",
  2044. "TC28 ",
  2045. "TC29 ",
  2046. "TC30 ",
  2047. "TC31 ",
  2048. "752 ",
  2049. "721 ",
  2050. "X364 ",
  2051. "3270 "
  2052. ];
  2053. END
  2054. DEF MXTIPTYPE # 9 #;
  2055. ARRAY TPTYPE$TABLE [0:MXTIPTYPE] S(1);
  2056. BEGIN
  2057. ITEM TTCNT U(0,54,6) = [MXTIPTYPE];
  2058. ITEM TTVALUE C(0,0,10) = [,"ASYNC ",
  2059. "MODE4 ",
  2060. "HASP ",
  2061. "X25 ",
  2062. "BSC ",
  2063. "TT12 ",
  2064. "TT13 ",
  2065. "TT14 ",
  2066. "3270 "
  2067. ];
  2068. END
  2069. DEF MXTSPEED # 11 #;
  2070. ARRAY TSPEED$TABLE [0:MXTSPEED] S(1);
  2071. BEGIN
  2072. ITEM TSPDCNT U(0,54,6) = [MXTSPEED];
  2073. ITEM TSPDVALUE C(0,0,10) = [,"110 ",
  2074. "134 ",
  2075. "150 ",
  2076. "300 ",
  2077. "600 ",
  2078. "1200 ",
  2079. "2400 ",
  2080. "4800 ",
  2081. "9600 ",
  2082. "19200 ",
  2083. "38400 "
  2084. ];
  2085. END
  2086. DEF MXYSNO # 2 #;
  2087. ARRAY YSNO$TABLE [0:MXYSNO] S(1);
  2088. BEGIN
  2089. ITEM YSNOCNT U(0,54,6) = [MXYSNO];
  2090. ITEM YSNOVALUE C(0,0,10) = [,"YES ",
  2091. "NO "
  2092. ];
  2093. END
  2094. # #
  2095. SWITCH CKTJUMP , , # UNK , NODE ,#
  2096. , YES$NO , # VARIANT , OPGO ,#
  2097. YES$NO , , # DMP , LLNAME ,#
  2098. , , # , ,#
  2099. , , # , ,#
  2100. , LOC$ , # HNAME , LOC ,#
  2101. , , # , ,#
  2102. , , # , ,#
  2103. , , # , ,#
  2104. , YES$NO , # NCNAME , DI ,#
  2105. , , # N1 , P1 ,#
  2106. , , # N2 , P2 ,#
  2107. YES$NO , YES$NO , # NOLOAD1 , NOLOAD2 ,#
  2108. , , # , ,#
  2109. , , # , ,#
  2110. , , # NI , PORT ,#
  2111. LINE$TYPE , TIPTYPE , # LTYPE , TIPTYPE ,#
  2112. YES$NO , , # AUTO , SL ,#
  2113. LINE$SPEED , , # LSPEED , DFL ,#
  2114. , , # FRAME , RTIME ,#
  2115. , , # RCOUNT , NSVC ,#
  2116. PSN , YES$NO , # PSN , DCE ,#
  2117. , YES$NO , # DTEA , ARSPEED ,#
  2118. , YES$NO , # , IMDISC ,#
  2119. YES$NO , , # RC , ,#
  2120. SUB$TIPTYPE , TERM$CLASS , # STIP , TC ,#
  2121. YES$NO , CODE$SET , # RIC , CSET ,#
  2122. TERM$SPEED , , # TSPEED , CA ,#
  2123. , YES$NO , # CO , BCF ,#
  2124. , , # MREC , W ,#
  2125. CIRC$TYPE , , # CTYP , NCIR ,#
  2126. , YES$NO , # NEN , COLLECT ,#
  2127. YES$NO , DEVICE$TYPE, # XAUTO , DT ,#
  2128. SUB$DEV$TYPE, , # SDT , TA ,#
  2129. , , # ABL , DBZ ,#
  2130. , , # UBZ , DBL ,#
  2131. , , # UBL , XBZ ,#
  2132. , , # DO , STREAM ,#
  2133. , , # HN , AUTOLOG ,#
  2134. YES$NO , YES$NO , # AUTOCON , PRI ,#
  2135. , , # P80 , P81 ,#
  2136. , , # P82 , P83 ,#
  2137. , , # P84 , P85 ,#
  2138. , , # P86 , P87 ,#
  2139. , , # P88 , P89 ,#
  2140. , YES$NO , # AB , BR ,#
  2141. , , # BS , B1 ,#
  2142. , , # B2 , CI ,#
  2143. , , # CN , CT ,#
  2144. , YES$NO , # DLC , DLTO ,#
  2145. , YES$NO , # DLX , EP ,#
  2146. INPUT$DEVICE, , # IN , LI ,#
  2147. OUTPUT$DEV , PARITY , # OP , PA ,#
  2148. YES$NO , , # PG , PL ,#
  2149. , YES$NO , # PW , SE ,#
  2150. YES$NO , , # FA , XLC ,#
  2151. , YES$NO , # XLX , XLTO ,#
  2152. EOL$MODE , , # ELO , ELX ,#
  2153. EB$RES , EOL$MODE , # ELR , EBO ,#
  2154. EB$RES , YES$NO , # EBR , CP ,#
  2155. YES$NO , YES$NO , # IC , OC ,#
  2156. YES$NO , , # LK , EBX ,#
  2157. , , # , MC ,#
  2158. , YES$NO , # XLY , EOF ,#
  2159. , YES$NO , # PAD , RTS ,#
  2160. , , # , ,#
  2161. , , # , ,#
  2162. , , # , ,#
  2163. , , # MFAM , MUSER ,#
  2164. , , # MAPPL , DFAM ,#
  2165. , , # DUSER , PFAM ,#
  2166. , , # PUSER , ,#
  2167. , YES$NO , # PAPPL , RS ,#
  2168. , YES$NO , # , NETXFR ,#
  2169. YES$NO , YES$NO , # UID , PRIV ,#
  2170. YES$NO , YES$NO , # KDSP , PRU ,#
  2171. , , # NAME1 , NAME2 ,#
  2172. , , # SNODE , DNODE ,#
  2173. , , # ACCLEV , DHOST ,#
  2174. , , # DPLR , DPLS ,#
  2175. , , # PRID , UDATA ,#
  2176. , , # WR , WS ,#
  2177. , , # , ,#
  2178. , , # FAM , UNAME #
  2179. , , # FAC1 , FAC2 ,#
  2180. , , # FAC3 , FAC4 ,#
  2181. , , # FAC5 , FAC6 ,#
  2182. , , # FAC7 , FAC8 ,#
  2183. , , # FAC9 , FAC10 ,#
  2184. , , # FAC11 , FAC12 ,#
  2185. , , # FAC13 , FAC14 ,#
  2186. , , # FAC15 , FAC16 ,#
  2187. , , # FAC17 , FAC18 ,#
  2188. , , # FAC19 , FAC20 ,#
  2189. , , # FAC21 , FAC22 ,#
  2190. , , # FAC23 , FAC24 ,#
  2191. , , # FAC25 , FAC26 ,#
  2192. , , # FAC27 , FAC28 ,#
  2193. , , # FAC29 , FAC30 ,#
  2194. , , # FAC31 , ANAME ,#
  2195. , YES$NO ; # SHOST ,FASTSEL #
  2196. CONTROL EJECT;
  2197. # #
  2198. # CODE BEGINS HERE #
  2199. # #
  2200. GOTO CKTJUMP[CKTKWID];
  2201. # #
  2202. CODE$SET:
  2203. P<TAB$TEMPLATE> = LOC(CSET$TABLE); # POINT TEMPLATE TO TABLE #
  2204. GOTO CHECK$TABLE;
  2205. CIRC$TYPE:
  2206. P<TAB$TEMPLATE> = LOC(CTYP$TABLE);
  2207. GOTO CHECK$TABLE;
  2208. EB$RES:
  2209. P<TAB$TEMPLATE> = LOC(EBR$TABLE);
  2210. GOTO CHECK$TABLE;
  2211. EOL$MODE:
  2212. P<TAB$TEMPLATE> = LOC(ELO$TABLE);
  2213. GOTO CHECK$TABLE;
  2214. DEVICE$TYPE:
  2215. P<TAB$TEMPLATE> = LOC(DT$TABLE);
  2216. GOTO CHECK$TABLE;
  2217. INPUT$DEVICE:
  2218. P<TAB$TEMPLATE> = LOC(IN$TABLE);
  2219. GOTO CHECK$TABLE;
  2220. LINE$SPEED:
  2221. P<TAB$TEMPLATE> = LOC(LSPEED$TABLE);
  2222. GOTO CHECK$TABLE;
  2223. LINE$TYPE:
  2224. P<TAB$TEMPLATE> = LOC(LTYPE$TABLE);
  2225. GOTO CHECK$TABLE;
  2226. LINK:
  2227. P<TAB$TEMPLATE> = LOC(LINK$TABLE);
  2228. GOTO CHECK$TABLE;
  2229. LOC$:
  2230. P<TAB$TEMPLATE> = LOC(LOC$TABLE);
  2231. GOTO CHECK$TABLE;
  2232. OUTPUT$DEV:
  2233. P<TAB$TEMPLATE> = LOC(OP$TABLE);
  2234. GOTO CHECK$TABLE;
  2235. PARITY:
  2236. P<TAB$TEMPLATE> = LOC(PA$TABLE);
  2237. GOTO CHECK$TABLE;
  2238. PSN:
  2239. P<TAB$TEMPLATE> = LOC(PSN$TABLE);
  2240. GOTO CHECK$TABLE;
  2241. SUB$DEV$TYPE:
  2242. P<TAB$TEMPLATE> = LOC(SDT$TABLE);
  2243. GOTO CHECK$TABLE;
  2244. SUB$TIPTYPE:
  2245. P<TAB$TEMPLATE> = LOC(STIP$TABLE);
  2246. GOTO CHECK$TABLE;
  2247. TERM$CLASS:
  2248. P<TAB$TEMPLATE> = LOC(TC$TABLE);
  2249. GOTO CHECK$TABLE;
  2250. TERM$SPEED:
  2251. P<TAB$TEMPLATE> = LOC(TSPEED$TABLE);
  2252. GOTO CHECK$TABLE;
  2253. TIPTYPE:
  2254. P<TAB$TEMPLATE> = LOC(TPTYPE$TABLE);
  2255. GOTO CHECK$TABLE;
  2256. YES$NO:
  2257. P<TAB$TEMPLATE> = LOC(YSNO$TABLE);
  2258. GOTO CHECK$TABLE;
  2259. # #
  2260. CHECK$TABLE: # ONCE TEMPLATE IS SET, CHECK FOR VALUE #
  2261. CKTSTAT = FALSE; # CLEAR RETURN STATUS #
  2262. FOUND = FALSE; # CLEAR FOUND FLAG #
  2263. FOR I=1 STEP 1 UNTIL ENTRY$CNT[0] DO # STEP THRU TABLE #
  2264. BEGIN
  2265. IF CKTWORD EQ TAB$VALUE[I] # IF VALUE IS FOUND #
  2266. THEN
  2267. BEGIN
  2268. FOUND = TRUE; # SET FOUND FLAG #
  2269. CKTSTAT = TRUE; # SET RETURN STATUS TO O.K. #
  2270. END
  2271. END
  2272. RIGHT$WORD[0] = CKTWORD; # PUT VALUE IN RIGHT MOST 42 BIT#
  2273. ENTVAL(LABEL$NAME,CKTKWID,CKTSTID,CKTWORD,CKTLENG,CKTRINFO,
  2274. CKTLINE,CKTSTAT);
  2275. IF NOT FOUND # IF NOT A VALID VALUE #
  2276. THEN
  2277. BEGIN
  2278. ERRMS1(ERR10,CKTLINE,CKTWORD); # FLAG ERROR -- INVALID VALUE #
  2279. END
  2280. RETURN; # **** RETURN **** #
  2281. END # CHKTABL #
  2282. CONTROL EJECT;
  2283. PROC CKDEFNAM(DFNAME,DFLAG,DFNLENG,DLINE,CDNSTAT);
  2284. BEGIN # CHECK DEFINE NAME #
  2285. *IF,DEF,IMS
  2286. #
  2287. ** CKDEFNAM - CHECK FOR DEFINE NAME.
  2288. *
  2289. * D.K. ENDO 81/10/26
  2290. *
  2291. * THIS PROCEDURE CHECKS IF NAME IS IN DEFINE TABLE. IF SO, THEN
  2292. * SETS DEFINE FLAG AND POINTS TO DEFINE STRING TO BEGIN PARSING.
  2293. *
  2294. * PROC CKDEFNAM(DFNAME,DFLAG,DFNLENG,DLINE,CDNSTAT)
  2295. *
  2296. * ENTRY DFNAME = NAME TO BE CHECKED.
  2297. * DFLAG = DEFINE FLAG.
  2298. * DFNLENG = LENGTH IN DEFINE NAME IN CHARACTERS.
  2299. * DLINE = CURRENT SOURCE LINE NUMBER.
  2300. *
  2301. * EXIT DFLAG = DEFINE FLAG(SET -TRUE- IF NAME IN TABLE).
  2302. * DSTAT = RETURN STATUS(SET -TRUE- IF NAME IN TABLE).
  2303. *
  2304. * METHOD
  2305. *
  2306. * SEARCH DEFINE TABLE FOR NAME.
  2307. * IF NAME IS FOUND,
  2308. * SET CDNSTAT TO TRUE.
  2309. * IF DFLAG IS SET,
  2310. * THEN,
  2311. * FLAG ERROR.
  2312. * GET NEXT TOKEN.
  2313. * OTHERWISE,
  2314. * SET DFLAG TO TRUE.
  2315. * SET UP POINTERS AND COUNTER TO BEGIN PARSING DEFINE STRING.
  2316. * FLAG DEFINE ON SOURCE LINE.
  2317. *
  2318. #
  2319. *ENDIF
  2320. ITEM DFNAME C(10); # DEFINE NAME TO GE CHECKED #
  2321. ITEM DFLAG B; # DEFINE FLAG #
  2322. ITEM DFNLENG; # LENGTH OF DFNAME IN CHARACTERS #
  2323. ITEM DLINE; # LINE NUMBER OF DEFINE NAME #
  2324. ITEM CDNSTAT B; # SET TO TRUE IF DFNAME IS FOUND IN DT #
  2325.  
  2326. ITEM FOUND B; # FLAG INDICATING DEFINE NAME WAS FOUND #
  2327. ITEM I; # SCRATCH ITEM #
  2328. # #
  2329. # CODE BEGINS HERE #
  2330. # #
  2331. CDNSTAT = FALSE; # INITIALIZE FLAG TO NOT FOUND #
  2332. FOUND = FALSE; # INITIALIZE FOUND DEF-NAME FLAG #
  2333. FOR I=1 WHILE NOT FOUND AND I LS DTWC[0] DO
  2334. BEGIN # LOOK FOR DEFINE NAME #
  2335. IF DFNAME EQ DEFNAME[I] # NAME FOUND IN TABLE #
  2336. THEN
  2337. BEGIN
  2338. FOUND = TRUE;
  2339. END
  2340. ELSE # NAME NOT FOUND YET #
  2341. BEGIN
  2342. I = I + DEFWCNT[I] + 1; # POINT TO BEGIN OF NEXT ENTRY #
  2343. END
  2344. END
  2345. IF FOUND
  2346. THEN
  2347. BEGIN
  2348. CDNSTAT = TRUE; # RETURN STATUS OF FOUND #
  2349. IF DFLAG
  2350. THEN # NESTED DEFINE FOUND #
  2351. BEGIN
  2352. ERRMS1(ERR12,DLINE,DFNAME);
  2353. LEXSCAN; # GET NEXT TOKEN #
  2354. END
  2355. ELSE
  2356. BEGIN
  2357. CDNSTAT = TRUE; # RETURN STATUS OF FOUND #
  2358. DFLAG = TRUE; # SET DEFINE FLAG #
  2359. DCHARCNT = 0; # INITIALIZE CHARACTER COUNT #
  2360. DSTRNG$WORD = 1; # POINT TO 1ST WORD OF STRING #
  2361. P<DT$TEMPLATE> = LOC(DEFNAME[I]); # INITIALIZE TABLE POINTER #
  2362. DEFCOL = DEFCOL - DFNLENG - 1; # REPLACE DFNAME WITH STRING #
  2363. INPDLINE[0] = "D"; # PUT -D- IN SOURCE LINE #
  2364. ESI$DEF[0] = "D"; # PUT -D- IN EXPANDED SOURCE #
  2365. CURCHAR$TEMP = CURCHAR; # SAVE CURRENT CHAR IN SOURCE #
  2366. CURSTAT$TEMP = CURSTAT; # SAVE CURRENT STAT OF CURCHAR #
  2367. GETDCHAR(CURCHAR,CURSTAT); # GET 1ST CHAR IN DEF-STRING #
  2368. LEXSCAN; # FORM FIRST ELEMENT IN DEFINE STRING #
  2369. END
  2370. END
  2371. RETURN; # **** RETURN **** #
  2372. END # CKDEFNAM #
  2373. CONTROL EJECT;
  2374. PROC CKGNAME(GNAME,NAMLENG,GPORT,CGNLINE,CGNSTAT);
  2375. BEGIN
  2376. *IF,DEF,IMS
  2377. #
  2378. ** CKGNAME - CHECK GENERATED NAME.
  2379. *
  2380. * D.K. ENDO 81/10/26
  2381. *
  2382. * THIS PROCEDURE CHECKS A GENERATED NAME TO BE VALID. IF VALID, THEN
  2383. * ENTER INTO LABEL TABLE, OTHERWISE FLAG ERROR.
  2384. *
  2385. * PROC CKGNAME(GNAME,NAMLENG,GPORT,CGNLINE,CGNSTAT)
  2386. *
  2387. * ENTRY GNAME = GENERATED NAME TO BE CHECKED.
  2388. * NAMLENG = LENGTH OF NAME IN CHARACTERS.
  2389. * GPORT = CURRENT PORT NUMBER.
  2390. * CGNLINE = CURRENT SOURCE LINE NUMBER.
  2391. *
  2392. * EXIT CGNSTAT = RETURNED STATUS(SET TRUE IF O.K.).
  2393. *
  2394. * METHOD
  2395. *
  2396. * IF NAMLENG IS NOT TOO LONG,
  2397. * THEN,
  2398. * SEARCH LABEL TABLE FOR GENERATED NAME
  2399. * IF FOUND,
  2400. * THEN,
  2401. * FLAG ERROR.
  2402. * SET CGNSTAT TO FALSE.
  2403. * OTHERWISE,
  2404. * SET CGNSTAT TO TRUE.
  2405. * PUT NAME AND PORT IN ENTRY.
  2406. * OTHERWISE,
  2407. * FLAG ERROR.
  2408. * SET CGNSTAT TO FALSE.
  2409. *
  2410. #
  2411. *ENDIF
  2412. ITEM GNAME C(10); # GENERATED NAME #
  2413. ITEM NAMLENG; # LENGTH OF NAME IN CHARACTERS #
  2414. ITEM GPORT; # PORT NUMBER ON -GROUP- STMT #
  2415. ITEM CGNLINE; # LINE NUMBER #
  2416. ITEM CGNSTAT B; # STATUS RETURNED -- SET TRUE IF O.K. #
  2417. # #
  2418. ITEM FOUND B; # FLAG INDICATING DUPLICATE LABEL #
  2419. ITEM I; # INTEGER TEMPORARY #
  2420. # #
  2421. # CODE BEGINS HERE #
  2422. # #
  2423. IF NAMLENG LQ 7 # NAME MUST BE 7 CHARACTERS OR LESS #
  2424. THEN
  2425. BEGIN # CHECK FOR DUPLICATE LABEL #
  2426. FOUND = FALSE; # INITIALIZE FLAG #
  2427. FOR I=1 STEP 1 WHILE I LQ LABLCNT[0] AND NOT FOUND DO
  2428. BEGIN # SCAN TO END OF TABLE OR DUPLICATE LABEL #
  2429. IF GNAME EQ LABLNAM[I]
  2430. THEN # GENERATED NAME ALREADY IN LABEL TABLE #
  2431. BEGIN
  2432. FOUND = TRUE; # SET FOUND FLAG #
  2433. CGNSTAT = FALSE; # SET RETURN STATUS #
  2434. ERRMS1(ERR1,CGNLINE,GNAME);# FLAG ERROR #
  2435. END
  2436. END
  2437. IF NOT FOUND # LABEL IS NOT DUPLICATE #
  2438. THEN
  2439. BEGIN
  2440. CGNSTAT = TRUE; # SET RETURN STATUS #
  2441. IF LABLCNT[0] GQ LT$LENG - 1 # NEED MORE TABLE SAPCE #
  2442. THEN
  2443. BEGIN
  2444. SSTATS(P<LABEL$TABLE>,500);
  2445. END
  2446. LABLCNT[0] = LABLCNT[0] + 1; # INCREMENT ENTRY COUNT #
  2447. LABEL$WORD[LABLCNT[0]] = 0; # CLEAR ENTRY WORD #
  2448. LABLNAM[LABLCNT[0]] = GNAME; # STORE LABEL-NAME #
  2449. LABLPORT[LABLCNT[0]] = GPORT;# STORE PORT -- #
  2450. # ZERO IF NOT APPLICABLE #
  2451. END
  2452. END
  2453. ELSE # NAME IS TOO LONG #
  2454. BEGIN
  2455. ERRMS1(ERR31,CGNLINE,GNAME); # FLAG ERROR #
  2456. CGNSTAT = FALSE; # SET RETURN STATUS #
  2457. END
  2458. RETURN; # **** RETURN **** #
  2459. END # CKGNAME #
  2460. CONTROL EJECT;
  2461. PROC CKKWD(KWDNAME,KWDSTMT,KWDNEX,KWDLXID,KWDMAP,KWDRINFO,
  2462. KWDLINE,KWDSTAT);
  2463. BEGIN # CHECK KEYWORD #
  2464. *IF,DEF,IMS
  2465. #
  2466. ** CKKWD - CHECK KEYWORD.
  2467. *
  2468. * D.K. ENDO 81/10/26
  2469. *
  2470. * THIS PROCEDURE CHECKS THE CURRENT KEYWORD TO BE VALID AND ALLOWED
  2471. * ON CURRENT STATEMENT.
  2472. *
  2473. * PROC CKKWD(KWDNAME,KWDSTMT,KWDNEX,KWDLXID,KWDMAP,KWDRINFO,
  2474. * KWDLINE,KWDSTAT)
  2475. *
  2476. * ENTRY KWDNAME = KEYWORD NAME TO BE CHECKED.
  2477. * KWDSTMT = CURRENT STATEMENT.
  2478. * KWDNEX = NEXT TOKEN.
  2479. * KWDLXID = CURRENT LEXICAL I.D.
  2480. * KWDMAP = KEYWORD ALLOWED MAP.
  2481. * KWDRINFO = REPEAT INFORMATION.
  2482. * KWDLINE = CURRENT SOURCE LINE NUMBER.
  2483. *
  2484. * EXIT KWDSTAT = RETURNED STATUS(SET TO TRUE IF O.K.).
  2485. *
  2486. * METHOD
  2487. *
  2488. * IF KWDNAME IS A KEYWORD,
  2489. * THEN,
  2490. * IF KEYWORD IS ALLOWED ON CURRENT STATEMENT,
  2491. * THEN,
  2492. * IF VALUE IS REQUIRED
  2493. * THEN,
  2494. * IF KWDNEX IS AN EQUAL SIGN
  2495. * THEN,
  2496. * SET KWDSTAT TO TRUE.
  2497. * OTHERWISE,
  2498. * FLAG ERROR.
  2499. * SET KWDSTAT TO FALSE.
  2500. * OTHERWISE,
  2501. * SET KWDSTAT TO TRUE.
  2502. * IF KWDNEX IS NOT AN EQUAL SIGN,
  2503. * PUT VALUE-DECLARATION INTO STATEMENT ENTRY.
  2504. * OTHERWISE,
  2505. * SET KWDSTAT TO FALSE.
  2506. * FLAG ERROR.
  2507. * OTHERWISE,
  2508. * SET KWDSTAT TO FALSE.
  2509. * FLAG ERROR.
  2510. *
  2511. #
  2512. *ENDIF
  2513. ITEM KWDNAME C(10); # KEYWORD NAME #
  2514. ITEM KWDNEX C(10); # NEXT WORD FORMED BY LEXSCAN #
  2515. ITEM KWDRINFO; # REPEAT INFORMATION #
  2516. ITEM KWDLINE; # KEYWORD LINE NUMBER #
  2517. ITEM KWDSTAT B; # STATUS RETURNED TO SUBR #
  2518. ARRAY KWDSTMT [0:0] S(1); # CURRENT STATEMENT #
  2519. BEGIN
  2520. ITEM KWDSTID U(0,0,9); # CURRENT STATEMENT-ID #
  2521. END
  2522. ARRAY KWDLXID [0:0] S(1); # KEYWORD LEXICAL-ID #
  2523. BEGIN
  2524. ITEM KWDFLAG B(0,48,1); # KEYWORD FLAG #
  2525. ITEM KWDVREQ B(0,49,1); # VALUE REQUIRED FLAG #
  2526. ITEM KWDID U(0,51,9); # KEYWORD-ID #
  2527. END
  2528. ARRAY KWDMAP [0:0] S(1);
  2529. BEGIN
  2530. ITEM KMAP U(0,30,30); # KEYWORD ALLOWED MAP #
  2531. END
  2532. ARRAY LABEL$NAME [0:0] S(1);
  2533. ITEM RIGHT$WORD C(0,18,7); # VALUE IN RIGHT MOST 42 BITS #
  2534. CONTROL EJECT;
  2535. # #
  2536. # CODE BEGINS HERE #
  2537. # #
  2538. IF KWDFLAG[0] # IF THIS IS A LEGAL KEYWORD #
  2539. THEN
  2540. BEGIN
  2541. IF B<KWDSTID[0],1>KMAP[0] EQ 1 # IF ALLOWED ON CURRENT STMT #
  2542. THEN
  2543. BEGIN
  2544. IF KWDVREQ[0] # IF VALUE IS REQUIRED #
  2545. THEN
  2546. BEGIN
  2547. IF KWDID[0] EQ KID"SERVICE"
  2548. OR KWDID[0] EQ KID"DOMAIN"
  2549. THEN
  2550. BEGIN
  2551. PERIOD$SKIP = TRUE; # TURN ON SKIP PERIOD FLAG #
  2552. END
  2553. IF KWDNEX EQ "=" # IF NEXT ELEMENT IS AN EQUAL #
  2554. THEN # ASSUME A VALUE FOLLOWS #
  2555. BEGIN
  2556. KWDSTAT = TRUE;# RETURN A STATUS OF O.K. #
  2557. END
  2558. ELSE # NO EQUAL #
  2559. BEGIN # ASSUME NO VALUE WAS SPECIFIED #
  2560. KWDSTAT = FALSE; # RETURN ERROR STATUS #
  2561. IF KWDID[0] EQ KID"AL" # IF KEYWORD IS AL #
  2562. THEN
  2563. BEGIN
  2564. ERRMS1(ERR43,KWDLINE,KWDNAME); # FLAG WARNING #
  2565. END
  2566. ELSE
  2567. BEGIN
  2568. ERRMS1(ERR30,KWDLINE,KWDNAME); # FLAG ERROR OTHERWISE #
  2569. END
  2570. ENTVAL(" ",KWDID[0],KWDSTID[0]," ",0,KWDRINFO,
  2571. KWDLINE,KWDSTAT);
  2572. END
  2573. END
  2574. ELSE # VALUE IS NOT REQUIRED #
  2575. BEGIN
  2576. KWDSTAT = TRUE; # SET RETURN STATUS TO O.K. #
  2577. IF KWDNEX NQ "=" # IF NEXT ELEMENT IS NOT AN EQUAL #
  2578. THEN # ASSUME NO VALUE WAS SPECIFIED #
  2579. BEGIN
  2580. RIGHT$WORD[0] = "YES"; # PUT VAL IN RIGHT MOST 42 BITS #
  2581. ENTVAL(LABEL$NAME,KWDID[0],KWDSTID[0],
  2582. "YES",3,KWDRINFO,KWDLINE,KWDSTAT);
  2583. END
  2584. END
  2585. END
  2586. ELSE # KEYWORD NOT ALLOWED ON CURRENT STMT #
  2587. BEGIN
  2588. KWDSTAT = FALSE; # RETURN ERROR STATUS #
  2589. ERRMS1(ERR29,KWDLINE,KWDNAME);#FLAG ERROR -- KWD NOT ALLOWED #
  2590. END
  2591. END
  2592. ELSE # NOT A VALID KEYWORD #
  2593. BEGIN
  2594. KWDSTAT = FALSE; # RETURN ERROR STATUS #
  2595. ERRMS1(ERR9,KWDLINE,KWDNAME); # FLAG ERROR -- INVALID KEYWORD #
  2596. END
  2597. RETURN; # **** RETURN **** #
  2598. END # CKKWD #
  2599. CONTROL EJECT;
  2600. PROC CKLNAME(LBLNAME,LBLTYPE,LBLLXID,LBLLENG,LBLKLBL,
  2601. LBLNWRD,LBLLINE,LBLSTAT);
  2602. *IF,DEF,IMS
  2603. #
  2604. ** CKLNAME = CHECK LABEL NAME.
  2605. *
  2606. * D.K. ENDO 81/10/26
  2607. *
  2608. * THIS PROCEDURE CHECKS A LABEL TO BE VALID.
  2609. *
  2610. * PROC CKLNAME(LBLNAME,LBLTYPE,LBLLXID,LBLLENG,LBLKLBL,
  2611. * LBLNWRD,LBLLINE,LBLSTAT)
  2612. *
  2613. * ENTRY LBLNAME = LABEL NAME TO BE CHECKED.
  2614. * LBLTYPE = SYNTACTICAL TYPE FOR LABEL NAME.
  2615. * LBLLXID = LEXICAL I.D. FOR LABEL NAME.
  2616. * LBLLENG = LENGTH OF LABEL NAME IN CHARACTERS.
  2617. * LBLKLBL = SET IF LABEL IS A KEYWORD.
  2618. * LBLNWRD = NEXT WORD AFTER LABEL.
  2619. * LBLLINE = CURRENT SOURCE LINE NUMBER.
  2620. *
  2621. * EXIT LBLSTAT = RETURNED STATUS(SET -TRUE- IF LABEL)
  2622. *
  2623. * METHOD
  2624. *
  2625. * SELECT THE CASE THAT APPLIES:
  2626. * CASE 1(LBLTYPE = NAME):
  2627. * IF LENGTH OF LABEL IS TOO LONG,
  2628. * SET LBLSTAT TO FALSE.
  2629. * SET LERR$CODE.
  2630. * CASE 2(LBLTYPE = KEYWORD):
  2631. * IF LABEL IS A DELIMITER,
  2632. * THEN,
  2633. * SET LBLSTAT TO TRUE
  2634. * SET LERR$CODE.
  2635. * OTHERWISE,
  2636. * IF NEXT WORD IS A COLON,
  2637. * THEN,
  2638. * SET LBLKLBL TO TRUE.
  2639. * IF LENGTH OF LABEL IS TOO LONG,
  2640. * SET LBLSTAT TO FALSE.
  2641. * SET LERR$CODE.
  2642. * OTHERWISE,(MUST BE A STATEMENT NAME.
  2643. * CLEAR LBLNAME.
  2644. * SET LBLSTAT TO FALSE.
  2645. * CLEAR LERR$CODE.
  2646. * CASE 3(LBLTYPE = NUMBER):
  2647. * SET LBLSTAT TO FALSE.
  2648. * SET LERR$CODE.
  2649. * CASE 4(LBLTYPE = UNKNOWN):
  2650. * SET LBLSTAT TO FALSE.
  2651. * SET LERR$CODE.
  2652. *
  2653. #
  2654. *ENDIF
  2655. BEGIN # CHECK LABEL NAME #
  2656. ITEM LBLNAME C(10); # LABEL-NAME #
  2657. ITEM LBLTYPE; # SYNTACTICAL TYPE OF LABEL-NAME #
  2658. ITEM LBLLXID; # LEXICAL ID OF LABEL-NAME #
  2659. ITEM LBLLENG; # LENGTH OF LABEL-NAME IN CHARACTERS #
  2660. ITEM LBLKLBL B; # SET IF LABEL IS A KEYWORD #
  2661. ITEM LBLNWRD C(10); # NEXT WORD AFTER LBLNAME #
  2662. ITEM LBLLINE; # LINE NUMBER OF LABEL #
  2663. ITEM LBLSTAT B; # STATUS RETURNED TO SUBR #
  2664. # #
  2665. ITEM CTEMP C(10); # TEMPORARY FOR CHARACTER STRING #
  2666. ITEM I; # INTEGER TEMPORARY FOR LOOP #
  2667. ITEM TYPE; # TYPE FOR SWITCH #
  2668. SWITCH LABELJUMP
  2669. KEYWORD, # 0 #
  2670. NAME, # 1 #
  2671. ,,,
  2672. NUMBER, # 5 #
  2673. ,,,
  2674. UNKNOWN, # 9 #
  2675. ,
  2676. EOF; # 11 #
  2677. CONTROL EJECT;
  2678. # #
  2679. # CODE BEGINS HERE #
  2680. # #
  2681. LBLSTAT = TRUE;
  2682. LBLKLBL = FALSE; # CLEAR KEYWORD LABEL FLAG #
  2683. TYPE = LBLTYPE; # SAVE LABEL TYPE IN TEMPORARY #
  2684. LERR$LINE = LBLLINE; # SAVE LINE NUMBER #
  2685. LERR$NAME = LBLNAME; # SAVE LABEL NAME #
  2686. IF LBLTYPE GQ 100 # IF LESS THAT 100, THEN TYPE EOF #
  2687. THEN # TYPE EOF = 11 #
  2688. TYPE = TYPE - 100; # SET UP TYPE FOR SWITCH #
  2689. GOTO LABELJUMP[TYPE]; # CHECK LABEL-NAME BASED ON SYNTACTIC TYPE#
  2690. # #
  2691. NAME:
  2692. IF LBLLENG GR 7
  2693. THEN
  2694. BEGIN
  2695. LERR$CODE = ERR18; # LABEL GREATER THAN SEVEN CHARACTERS #
  2696. LBLSTAT = FALSE;
  2697. END
  2698. RETURN; # **** RETURN **** #
  2699. # #
  2700. KEYWORD:
  2701. IF B<50,1>LBLLXID EQ 1 # IF ONE, THEN CHARACTER MUST BE DELIM #
  2702. THEN # FLAG ERROR #
  2703. BEGIN
  2704. LERR$CODE = ERR8; # PUNCTUATION ERROR #
  2705. LBLSTAT = FALSE;
  2706. IF LBLNAME EQ ":" # IF DELIMITER IS ASTERISK #
  2707. THEN # ASSUME USER FORGOT LABEL #
  2708. BEGIN
  2709. LEXSCAN; # GET NEXT TOKEN -- HOPEFULLY A STMT NAME #
  2710. END
  2711. LBLNAME = " "; # CLEAR LABEL NAME #
  2712. END
  2713. ELSE
  2714. BEGIN
  2715. IF LBLNWRD EQ ":" # IF NEXWORD IS A COLON, THEN ASSUME #
  2716. THEN # KEYWORD IS A LABEL #
  2717. BEGIN
  2718. LBLKLBL = TRUE; # LABEL IS A KEYWORD #
  2719. GOTO NAME;
  2720. END
  2721. ELSE
  2722. BEGIN
  2723. LBLNAME = " "; # MUST BE STMT-NAME WITH NO LABEL #
  2724. LERR$CODE = 0;
  2725. LBLSTAT = FALSE;
  2726. END
  2727. END
  2728. RETURN; # **** RETURN **** #
  2729. # #
  2730. NUMBER:
  2731. LERR$CODE = ERR23; # MUST BEGIN WITH A LETTER #
  2732. LBLSTAT = FALSE;
  2733. RETURN; # **** RETURN **** #
  2734. # #
  2735. UNKNOWN:
  2736. IF LBLLENG EQ 1 # LENGTH OF ONE IMPLIES SPECIAL CHARACTER #
  2737. THEN # FLAG ERROR #
  2738. BEGIN
  2739. LERR$CODE = ERR8; # PUNCTUATION ERROR #
  2740. LBLSTAT = FALSE;
  2741. END
  2742. ELSE # MUST BE NAME GREATER THAN TEN CHARACTERS#
  2743. BEGIN # IN LENGTH #
  2744. LERR$CODE = ERR18; # LABEL TOO LONG #
  2745. LBLSTAT = FALSE;
  2746. END
  2747. RETURN; # **** RETURN **** #
  2748. # #
  2749. EOF:
  2750. RETURN; # **** RETURN **** #
  2751. # #
  2752. END # CKLNAME #
  2753. CONTROL EJECT;
  2754. PROC CKSTMTDEC(SCSTMT,SNAME,SLXID,SMAP,SRPTINFO,SLINE,
  2755. SL$STID,SSTAT);
  2756. BEGIN # CHECK STATEMENT DECLARATION #
  2757. *IF,DEF,IMS
  2758. #
  2759. ** CKSTMTDEC - CHECK STATEMENT DECLARATION
  2760. *
  2761. * D.K. ENDO 81/10/26
  2762. *
  2763. * THIS PROCEDURE VALIDATES EACH STATEMENT DECLARATION.
  2764. *
  2765. * PROC CKSTMTDEC(SCSTMT,SNAME,SLXID,SMAP,SRPTINFO,SLINE,SL$STID,
  2766. * SSTAT)
  2767. *
  2768. * ENTRY SCSTMT = CURRENT STATEMENT INFORMATION(JUST LABEL).
  2769. * SNAME = STATEMENT NAME.
  2770. * SLXID = LEXICAL I.D. OF STATEMENT NAME.
  2771. * SMAP = STATEMENT ALLOWED BIT MAP.
  2772. * SRPTINFO = CURRENT REPEAT INFORMATION.
  2773. * SLINE = CURRENT SOURCE LINE NUMBER.
  2774. * SL$STID = PREVIOUS STATEMENT-S I.D.
  2775. *
  2776. * EXIT SRPTINFO = REPEAT INFORMATION.
  2777. * SSTAT = RETURNED STATUS(SET -TRUE- IF STMT-DEC O.K.)
  2778. *
  2779. * NOTE
  2780. *
  2781. * CKSTMTDEC ALSO SETS -SYNSECT-, WHICH STD USES TO DETERMINE WHICH
  2782. * SYNTACTIC SECTION TO JUMP TO.
  2783. *
  2784. * METHOD
  2785. *
  2786. * IF THERE IS A LABEL ERROR,
  2787. * THEN,
  2788. * IF FIRST STATEMENT DIVISION OR IF STATEMENT NOT LFILE
  2789. * FLAG ERROR.
  2790. *
  2791. * IF FLAG TO SCAN TO END OF DIVISION IS NOT SET,
  2792. * THEN,
  2793. * INITIALIZE RETURN STATUS TO O.K.
  2794. * IF STATEMENT FLAG IS NOT SET FOR THIS KEYWORD,
  2795. * THEN,
  2796. * FLAG ERROR -- INVALID STATEMENT NAME.
  2797. * SET RETURN STATUS TO ERROR.
  2798. * OTHERWISE,
  2799. * IF THIS IS FIRST STATEMENT IN DIVISION,
  2800. * THEN,
  2801. * IF STATEMENT IS NOT NFILE OR LFILE
  2802. * FLAG ERROR -- FIRST STATEMENT MUST BE NFILE OR LFILE.
  2803. * SET SCAN TO END FLAG
  2804. * SET RETURN STATUS TO ERROR.
  2805. * OTHERWISE,
  2806. * IF THIS STATEMENT IS NOT ALLOWED TO BE AFTER PREVIOUS ONE,
  2807. * THEN,
  2808. * FLAG ERROR -- STATEMENT OUT OF SEQUENCE.
  2809. * IF STMT IS NOT NFILE,LFILE,OR END,
  2810. * SET RETURN STATUS TO ERROR.
  2811. * OTHERWISE,
  2812. * IF POSSIBLE STATEMENTS MISSING,
  2813. * FLAG ERROR -- POSSIBLE MISSING STMTS PRECEDING THIS ONE.
  2814. * IF LABEL IS REQUIRED,
  2815. * THEN,
  2816. * IF LABEL WAS NOT SPECIFIED,
  2817. * FLAG ERROR -- REQUIRED ELEMENT NAME MISSING.
  2818. * SET LABEL ERROR FLAG.
  2819. * OTHERWISE,
  2820. * IF LABEL WAS SPECIFIED,
  2821. * FLAG ERROR -- LABEL NOT ALLOWED WITH STATEMENT.
  2822. * SET LABEL ERROR FLAG
  2823. * IF RETURN STATUS IS O.K.,
  2824. * SELECT CASE THAT APPLIES:
  2825. * CASE 1(LFILE,NFILE):
  2826. * IF THIS IS NOT FIRST STATEMENT IN FILE
  2827. * THEN,
  2828. * SET SYNSECT TO EXECUTE DIVISION TERMINATION CHECKS.
  2829. * OTHERWISE,
  2830. * IF NFILE STATEMENT,
  2831. * THEN,
  2832. * ALLOCATE TABLE SPACE.
  2833. * CLEAR HEADERS IN TABLES.
  2834. * SET NCF FLAG.
  2835. * OTHERWISE,
  2836. * SET LCF FLAG.
  2837. * MAKE STATEMENT DECLARATION ENTRY.
  2838. * PUT FILE NAME IN TITLE STRING BUFFER.
  2839. * CASE 2(TITLE)
  2840. * POINT TO BEGINNING OF STRING
  2841. * SET SYNSECT TO STORE TITLE.
  2842. * CASE 3(NPU,LINE):
  2843. * CLEAR REPEAT INFO.
  2844. * MAKE STATEMENT DECLARATION ENTRY.
  2845. * CASE 4(GROUP):
  2846. * CLEAR REPEAT INFO.
  2847. * SET GROUP FLAG.
  2848. * MAKE STATEMENT DECLARATION ENTRY.
  2849. * CASE 5(TERMINAL,TERMDEV):
  2850. * CLEAR CIRCUIT COUNT
  2851. * IF LTYPE IS X25
  2852. * SET SVC FLAG.
  2853. * MAKE STATEMENT DECLARATION ENTRY.
  2854. * CASE 6(END):
  2855. * SET SYNSECT TO DIVISION TERMINATION CHECKS.
  2856. * SET END FLAG.
  2857. * CASE 7(DEFINE):
  2858. * IF LABEL IS O.K.
  2859. * IF LABEL IS IN LABEL TABLE,
  2860. * THEN,
  2861. * FLAG ERROR -- DUPLICATE ELEMENT NAME.
  2862. * SET RETURN STATUS TO ERROR.
  2863. * IF LABEL IS KEYWORD,
  2864. * FLAG ERROR -- DEFINE CAN NOT BE KEYWORD.
  2865. * SET RETURN STATUS TO ERROR.
  2866. * IF NOT ERRORS
  2867. * PUT DEFINE NAME IN LABEL TABLE.
  2868. * SET SYNSECT TO STORE DEFINE STRING.
  2869. * OTHERWISE,
  2870. * SET RETURN STATUS TO ERROR.
  2871. * CASE 8(SUPLINK,COUPLER,LOGLINK,DEVICE,TRUNK,
  2872. * USER,APPL,INCALL,OUTCALL):
  2873. * MAKE STATEMENT DECLARATION ENTRY.
  2874. * SET SYNSECT TO VALUE DECLARATION CHECK.
  2875. * OTHERWISE,
  2876. * IF STATEMENT IS LFILE,NFILE,OR END
  2877. * THEN,
  2878. * SET SYNSECT TO DIVISION TERMINATION CHECKS.
  2879. * SET RETURN STATUS TO O.K.
  2880. * IF END STATEMENT,
  2881. * SET END FLAG.
  2882. * OTHERWISE,
  2883. * SET RETURN STATUS TO ERROR.
  2884. *
  2885. #
  2886. *ENDIF
  2887. ITEM SNAME C(10); # STATEMENT-NAME #
  2888. ITEM SLINE; # STATEMENT LINE NUMBER #
  2889. ITEM SL$STID; # PREVIOUS STATEMENT-ID #
  2890. ITEM SSTAT B; # STATUS RETURNED TO SUBR #
  2891. DEF MXSTMT # 31 #;
  2892. ARRAY STMT$WRN$MAP [1:MXSTMT] S(1);
  2893. BEGIN
  2894. ITEM SAWMAP U(0,30,30) = [O"1760000000", # NFILE #
  2895. O"1760000000", # NPU #
  2896. 0, # SUPLINK #
  2897. 0, # COUPLER #
  2898. 0, # LOGLINK #
  2899. O"0060000000", # GROUP #
  2900. O"0060000000", # LINE #
  2901. 0, # #
  2902. 0, # TERMINAL #
  2903. 0, # DEVICE #
  2904. 0, # TRUNK #
  2905. O"1760000000", # LFILE #
  2906. 0, # USER #
  2907. 0, # APPL #
  2908. 0, # OUTCALL #
  2909. 0, # INCALL #
  2910. O"1760000000", # END #
  2911. 0, # TERMDEV #
  2912. 0, # DEFINE #
  2913. 0, # COMMENT #
  2914. 0, # TITLE #
  2915. ];
  2916. END
  2917. ARRAY SCSTMT [0:0] S(1); # CURRENT STATEMENT-INFO #
  2918. BEGIN
  2919. ITEM SCSTID U(0,0,9); # STATEMENT-ID #
  2920. ITEM SCEFLG B(0,15,1); # LABEL ERROR FLAG #
  2921. ITEM SCKLBL B(0,16,1); # SET IF LABEL IS A KEYWORD #
  2922. ITEM SCLABL C(0,18,7); # LABEL NAME #
  2923. END
  2924. ARRAY SLXID [0:0] S(1); # STATEMENT LEXICAL-ID #
  2925. BEGIN
  2926. ITEM SFLAG B(0,45,1); # STATEMENT FLAG #
  2927. ITEM SLREQ B(0,46,1); # LABEL REQUIRED #
  2928. ITEM SID U(0,51,9); # STATEMENT-ID #
  2929. END
  2930. ARRAY SMAP [0:0] S(1);
  2931. BEGIN
  2932. ITEM SAMAP U(0,30,30); # STATEMENT ALLOWED MAP #
  2933. END
  2934. ARRAY SRPTINFO [0:0] S(1); # REPEAT INFORMATION #
  2935. BEGIN
  2936. ITEM SGFLAG B(0,0,1); # GROUP FLAG #
  2937. ITEM SSVC B(0,1,1); # SVC FLAG #
  2938. ITEM SPRTNUM U(0,6,9); # PROT NUMBER #
  2939. ITEM SGRPCNT U(0,15,9); # GROUP COUNT #
  2940. ITEM SNCIR U(0,24,9); # CIRCUIT COUNT #
  2941. ITEM SRIWORD I(0,0,60);
  2942. END
  2943. DEF DEFINE # 2 #; # VAL FOR SYNSECT TO CAUSE STORAGE OF DEF #
  2944. DEF STMTDEC # 1 #; # VALUE FOR SYNSECT TO CHECK STMT-DEC #
  2945. DEF TITLE # 3 #; # VALUE FOR SYNSECT TO STORE TITLE #
  2946. DEF TERM$ # 4 #; # VAL FOR SYNSECT TO CAUSE PASS1 TO TRMNAT#
  2947. DEF VALUDEC # 5 #; # VAL FOR SYNSECT TO CHECK VALUE-DEC #
  2948. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  2949. ITEM FOUND B; # FLAG INDICATING LABEL WAS FOUND #
  2950. ITEM I; # SCRATCH ITEM #
  2951. # #
  2952. SWITCH STMTJUMP
  2953. , # NULL STATEMENT #
  2954. LFILE$NFILE, # NFILE #
  2955. NPU$LINE, # NPU #
  2956. STMT$ENTRY, # SUPLINK #
  2957. STMT$ENTRY, # COUPLER #
  2958. STMT$ENTRY, # LOGLINK #
  2959. GROUP$, # GROUP #
  2960. NPU$LINE, # LINE #
  2961. , # #
  2962. TERMINAL$, # TERMINAL #
  2963. STMT$ENTRY, # DEVICE #
  2964. STMT$ENTRY, # TRUNK #
  2965. LFILE$NFILE, # LFILE #
  2966. STMT$ENTRY, # USER #
  2967. STMT$ENTRY, # APPL #
  2968. STMT$ENTRY, # OUTCALL #
  2969. STMT$ENTRY, # INCALL #
  2970. END$, # END #
  2971. TERMINAL$, # TERMDEV #
  2972. DEFINE$, # DEFINE #
  2973. COMMENT, # COMMENT #
  2974. TITLE$; # TITLE #
  2975. CONTROL EJECT;
  2976. # #
  2977. # CODE BEGIN HERE #
  2978. # #
  2979. IF SCEFLG[0] AND LERR$CODE NQ 0
  2980. THEN # HAS LABEL ERROR #
  2981. BEGIN
  2982. IF FIRST$STMT OR NOT(SID[0] EQ STID"LFILE")
  2983. THEN
  2984. BEGIN
  2985. ERRMS1(LERR$CODE,LERR$LINE,LERR$NAME);
  2986. END
  2987. END
  2988.  
  2989. IF NOT SCN$TO$END # IF NOT SCANNING TO END OF DIVISION #
  2990. THEN
  2991. BEGIN
  2992. SSTAT = TRUE; # INITIALIZE RETURN STATUS TO O.K. #
  2993. IF NOT SFLAG[0] # IF THIS KEYWORD IS NOT A STMT-NAME #
  2994. THEN # THEN FLAG ERROR AND IGNORE REST OF #
  2995. BEGIN # STATEMENT #
  2996. ERRMS1(ERR2,SLINE,SNAME);
  2997. ERRMS1(ERR3,SLINE," ");
  2998. SSTAT = FALSE;
  2999. END
  3000. ELSE
  3001. BEGIN
  3002. IF FIRST$STMT AND NOT(SID[0] EQ STID"COMMENT")
  3003. THEN # IF THIS IS THE FIRST STMT IN THE #
  3004. BEGIN # DIVISION (BESIDES A COMMENT) #
  3005. IF NOT(SID[0] EQ STID"NFILE" OR SID[0] EQ STID"LFILE")
  3006. THEN # SHOULD BE NFILE OR LFILE STMT #
  3007. BEGIN # IF NOT, FLAG ERROR #
  3008. ERRMS1(ERR25,SLINE,SNAME);
  3009. SCN$TO$END = TRUE; # IGNORE REST OF DIVISION #
  3010. FIRST$STMT = FALSE; # CLEAR FIRST STMT FLAG #
  3011. SSTAT = FALSE; # RETURN ERROR STATUS #
  3012. END
  3013. END
  3014. ELSE # NOT FIRST STATEMENT #
  3015. BEGIN
  3016. IF B<SL$STID,1>SAMAP[0] NQ 1
  3017. THEN # STMT NOT ALLOWED AFTER LAST STMT #
  3018. BEGIN
  3019. ERRMS1(ERR14,SLINE,SNAME);#FLAG ERROR -- OUT OR SEQUENCE #
  3020. IF NOT(SID[0] EQ STID"NFILE" OR
  3021. SID[0] EQ STID"LFILE" OR
  3022. SID[0] EQ STID"END$")
  3023. THEN # IF NOT NFILE, LFILE, OR END STMT #
  3024. BEGIN
  3025. SSTAT = FALSE; # RETURN ERROR STATUS #
  3026. END # IGNORE REST OF STMT #
  3027. END
  3028. ELSE # STMT IS ALLOWED AFTER LAST STMT #
  3029. BEGIN
  3030. IF B<SL$STID,1>SAWMAP[SID[0]] EQ 1
  3031. THEN # STMT DOES NOT USUALLY FOLLOW PREVIOUS #
  3032. BEGIN
  3033. ERRMS1(ERR40,SLINE,SNAME); # FLAG ERROR, MISSING STMTS #
  3034. END
  3035. END
  3036. END
  3037. IF SLREQ[0] # CHECK IF LABEL IS REQUIRED #
  3038. THEN # IF SO, #
  3039. BEGIN
  3040. IF SCLABL[0] EQ BLANK # IF LABEL WAS NOT SPECIFIED #
  3041. THEN # THEN FLAG ERROR #
  3042. BEGIN
  3043. ERRMS1(ERR15,SLINE,SCLABL[0]);
  3044. SCEFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  3045. END
  3046. END
  3047. ELSE
  3048. BEGIN # LABEL IS NOT REQUIRED #
  3049. IF SCLABL[0] NQ " " # IF LABEL WAS SPECIFIED, FLAG ERROR #
  3050. THEN
  3051. BEGIN
  3052. ERRMS1(ERR17,SLINE,SCLABL[0]);
  3053. SCEFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  3054. SCLABL[0] = BLANK; # CLEAR LABEL WORD #
  3055. END
  3056. END
  3057. IF SSTAT # NO STATEMENT ERRORS DETECTED YET #
  3058. THEN
  3059. BEGIN
  3060. # #
  3061. # #
  3062. GOTO STMTJUMP[SID[0]]; # JUMP TO STMT CHECK #
  3063. # #
  3064. COMMENT:
  3065. IF CURLINE EQ NEXLINE # IF CHARACTER POINTER STILL ON #
  3066. THEN # SAME LINE AS COMMENT STMT #
  3067. BEGIN
  3068. LEXSNC; # SKIP TO NEXT CARD/SOURCE-LINE #
  3069. LEXSCAN; # FORM FIRST ELEMENT ON NEXT LINE #
  3070. END
  3071. SYNSECT = STMTDEC; #SET SYNSECT TO STMT-DEC CHECKING#
  3072. GOTO EXIT; # **** RETURN **** #
  3073. LFILE$NFILE:
  3074. IF NOT FIRST$STMT # IF NOT FIRST STMT, THEN MUST BE END OF #
  3075. THEN # DIVSION #
  3076. BEGIN
  3077. SYNSECT = TERM$; # SET SYNTACTIC SECTION #
  3078. END
  3079. ELSE
  3080. BEGIN # THIS IS THE FIRST NON COMMENT SENSED #
  3081. IF SID[0] EQ STID"NFILE" # GET SPACE FOR TABLES #
  3082. THEN
  3083. BEGIN
  3084. SSTATS(P<CONSOLE$MAP>,MXCM);
  3085. SSTATS(P<COUP$TABLE>,MXCOUP);
  3086. SSTATS(P<LLINK$TABLE>,MXLLINK*2);
  3087. SSTATS(P<LL$NODE$TABL>,MXLLINK);
  3088. SSTATS(P<NPU$TABLE>,MXNPU);
  3089. SSTATS(P<TNI$TABLE>,MXTNI);
  3090. SSTATS(P<TNN$TABLE>,MXTNN);
  3091. CTWORD[0] = 0; # CLEAR HEADER WORD #
  3092. LLTWORD[0] = 0;
  3093. LLTWORD1[0] = 0;
  3094. LNTWORD[0] = 0;
  3095. NTWORD[0] = 0;
  3096. TNIWORD[0] = 0;
  3097. TNNWORD[0] = 0;
  3098. TNNWORD1[0] = 0;
  3099. FOR I=0 STEP 1 UNTIL CM$LENG-1
  3100. DO # CLEAR CONSOLE DEFINED BIT MAP #
  3101. BEGIN
  3102. CMWORD[I] = 0;
  3103. END
  3104. CMAP$B = 0; # CLEAR BIT MAP POINTER #
  3105. CMAP$W = 0;
  3106. NCFDIV = TRUE; # SET NCF DIVISION FLAG #
  3107. END
  3108. ELSE # MUST BE LFILE STMT #
  3109. BEGIN
  3110. LCFDIV = TRUE; # SET LCF DIVISION FLAG #
  3111. END
  3112. ENTLABL(SCLABL[0],SCEFLG,SID[0],SRPTINFO,SLINE);
  3113. # MAKE STATEMENT-DECLARATION ENTRY #
  3114. C<0,7>TITLE$WORD[0] = SCLABL[0]; # STORE LABEL AS TITLE #
  3115. SYNSECT = VALUDEC; # SWITCH TO VALUE DECLARATION #
  3116. VAL$DEC = TRUE; # SET VALUE-DEC FLAG #
  3117. FIRST$STMT = FALSE; # CLEAR FIRST STMT FLAG #
  3118. END
  3119. GOTO EXIT; # **** RETURN **** #
  3120. # #
  3121. TITLE$:
  3122. COL = COL - (NEXLENG + 1); # MOVE TO BEGINNING OF STRING #
  3123. GETSCHAR(CURCHAR,LINE,CURSTAT); # GET 1ST CHAR IN STRING #
  3124. SYNSECT = TITLE ; # SET SYNSECT TO STORE TITLE #
  3125. GOTO EXIT; # **** RETURN **** #
  3126. # #
  3127. NPU$LINE:
  3128. SRIWORD[0] = 0; # CLEAR REPEAT INFO FLAGS AND VALUES #
  3129. CRNT$LTYPE = " "; # CLEAR CURRENT LTYPE #
  3130. CRNT$TIP = " "; # CLEAR CURRENT TIPTYPE #
  3131. GOTO STMT$ENTRY;
  3132. # #
  3133. GROUP$:
  3134. SRIWORD[0] = 0; # CLEAR REPEAT INFO FLAGS AND VALUES #
  3135. SGFLAG[0] = TRUE; # SET GROUP FLAG #
  3136. CRNT$LTYPE = " "; # CLEAR CURRENT LTYPE #
  3137. CRNT$TIP = " "; # CLEAR CURRENT TIPTYPE #
  3138. GOTO STMT$ENTRY;
  3139. # #
  3140. TERMINAL$:
  3141. SNCIR[0] = 0; # CLEAR CIRCUIT COUNT #
  3142. IF CRNT$TIP EQ "X25" OR
  3143. ((CRNT$LTYPE EQ "H1" OR CRNT$LTYPE EQ "H2") AND
  3144. C<0,3>CRNT$TIP EQ USER$TIP)
  3145. THEN
  3146. BEGIN
  3147. SSVC[0] = TRUE; # SET SVC FLAG - DEFAULT FOR X25#
  3148. END
  3149. CMAP$B = CMAP$B + 1; # POINT TO NEXT BIT POSITION #
  3150. IF CMAP$B GQ 60
  3151. THEN # IF PAST A WORD BOUND #
  3152. BEGIN
  3153. CMAP$B = 0; # POINT TO BEGINNING OF WORD #
  3154. CMAP$W = CMAP$W + 1; # POINT TO NEXT WORD #
  3155. IF CMAP$W GQ CM$LENG # IF NEED MORE TABLE SPACE #
  3156. THEN
  3157. BEGIN # ALLOCATE MORE SPACE #
  3158. SSTATS(P<CONSOLE$MAP>,10);
  3159. FOR I=CMAP$W STEP 1 UNTIL CM$LENG-1
  3160. DO # CLEAR NEWLY ALLOCATED WORDS #
  3161. BEGIN
  3162. CMWORD[I] = 0;
  3163. END
  3164. END
  3165. END
  3166. GOTO STMT$ENTRY;
  3167. # #
  3168. END$:
  3169. ENDFLAG = TRUE; # SET FLAG THAT -END- WAS FOUND #
  3170. SYNSECT = TERM$; # SET SYNSECT TO VALUE-DEC CHECK #
  3171. GOTO EXIT;
  3172. # #
  3173. DEFINE$:
  3174. IF NOT SCEFLG[0] # IF LABEL IS O.K. #
  3175. THEN
  3176. BEGIN
  3177. FOUND = FALSE;
  3178. IF SCKLBL[0] # LABEL IS A KEYWORD #
  3179. THEN
  3180. BEGIN
  3181. CTEMP = SCLABL[0];
  3182. ERRMS1(ERR16,SLINE,CTEMP); # FLAG ERROR #
  3183. SCEFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  3184. SSTAT = FALSE;
  3185. FOUND = TRUE;
  3186. END
  3187. FOR I=1 STEP 1 WHILE I LQ LABLCNT[0] AND NOT FOUND DO
  3188. BEGIN
  3189. IF LABLNAM[I] EQ SCLABL[0] # CHECK FOR DUPLICATE LABEL #
  3190. THEN
  3191. BEGIN
  3192. ERRMS1(ERR1,SLINE,SCLABL[0]); # FLAG ERROR #
  3193. SCEFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  3194. FOUND = TRUE; # SET FOUND FLAG #
  3195. SSTAT = FALSE; # IGNORE REST OF STATEMENT #
  3196. END
  3197. END
  3198. IF NOT FOUND # LABEL WAS NOT FOUND IN LABEL-TABLE #
  3199. THEN
  3200. BEGIN # ENTER LABEL IN TABLE #
  3201. IF LABLCNT[0] GQ LT$LENG - 1 # NEED MORE TABLE SPACE #
  3202. THEN
  3203. BEGIN
  3204. SSTATS(P<LABEL$TABLE>,500);
  3205. END
  3206. LABLCNT[0] = LABLCNT[0] + 1;
  3207. LABEL$WORD[LABLCNT[0]] = 0;
  3208. LABLNAM[LABLCNT[0]] = SCLABL[0];
  3209. SYNSECT = DEFINE;
  3210. END
  3211. END
  3212. ELSE
  3213. SSTAT = FALSE;
  3214. GOTO EXIT;
  3215. # #
  3216. STMT$ENTRY:
  3217. ENTLABL(SCLABL[0],SCEFLG[0],SID[0],SRPTINFO,SLINE);
  3218. # MAKE STATEMENT-DECLARATION ENTRY #
  3219. SYNSECT = VALUDEC; # SET SYNSECT TO VALUE-DEC CHECK#
  3220. VAL$DEC = TRUE; # SET VALUE-DEC FLAG #
  3221. EXIT:
  3222. END
  3223. END
  3224. END
  3225. ELSE # IGNORE DIVISION FLAG IS SET #
  3226. BEGIN
  3227. IF SID[0] EQ STID"NFILE" OR
  3228. SID[0] EQ STID"LFILE" OR
  3229. SID[0] EQ STID"END$"
  3230. THEN # IF STMT IS NFILE, LFILE, OR END #
  3231. BEGIN
  3232. SYNSECT = TERM$; # TERMINATE PASS 1 #
  3233. SSTAT = TRUE; # RETURN STATUS OF O.K. #
  3234. IF SID[0] EQ STID"END$" # END STATEMENT FOUND #
  3235. THEN
  3236. BEGIN
  3237. ENDFLAG = TRUE; # SET END FLAG #
  3238. END
  3239. END
  3240. ELSE
  3241. BEGIN
  3242. SSTAT = FALSE; # IGNORE STATEMENT #
  3243. END
  3244. END
  3245. RETURN; # **** RETURN **** #
  3246. END # CKSTMTDEC #
  3247. CONTROL EJECT;
  3248. PROC CKVDEC(VKWID,VWRD,VLENG,VLINE,VCSTMT,VRPTINFO);
  3249. BEGIN # CHECK VALUE DECLARATION #
  3250. *IF,DEF,IMS
  3251. #
  3252. ** CKVDEC - CHECK VALUE DECLARATION.
  3253. *
  3254. * D.K. ENDO 81/10/23
  3255. *
  3256. * THIS PROCEDURE VALIDATES THE CURRENT VALUE DECLARATION.
  3257. *
  3258. * PROC CKVDEC(VKWID,VWRD,VLINE,VCSTMT,VRPTINFO)
  3259. *
  3260. * ENTRY VKWID = CURRENT KEYWORD I.D.
  3261. * VWRD = CHARACTER VALUE.
  3262. * VLINE = CURRENT SOURCE LINE NUMBER.
  3263. * VCSTMT = CURRENT STATEMENT INFORMATION.
  3264. * VRPTINFO = REPEAT INFORMATION.
  3265. *
  3266. * EXIT NONE.
  3267. *
  3268. * METHOD
  3269. *
  3270. * THE TYPE OF CHECKING DONE IS DETERMINED BY A SWITCH ON KEYWORD
  3271. * I.D. THERE ARE FIVE TYPES OF VALUES: DECIMAL, HEXIDECIMAL
  3272. * ALPHANUMERIC, NAME BEGINNING WITH A LETTER WITH THE REST ALPHA-
  3273. * NUMERIC, AND THE VALUE BEING CONTAINED IN A TABLE. THE SWITCH
  3274. * DETERMINES WHICH OF THE FIVE TYPES TO CHECK FOR. SOME KEYWORDS
  3275. * CAN BE ASSIGNED A SPECIAL VALUE: -AUTOREC-, -CCP-, OR -NONE-.
  3276. * IF SO A CHECK FOR ONE OF THESE SPECIAL VALUES IS MADE BEFORE
  3277. * CHECKING FOR ONE OF THE TYPES LISTED ABOVE.
  3278. *
  3279. #
  3280. *ENDIF
  3281. ITEM VKWID; # KEYWORD-ID #
  3282. ARRAY VWRD [0:25] S(1);
  3283. BEGIN
  3284. ITEM VWORDC1 C(0,0,01);# FIRST CHARACTER #
  3285. ITEM VWORD0 U(0,0,60);# FIRST WORD #
  3286. ITEM VWORD C(0,0,10);# VALUE WORD #
  3287. END
  3288. ITEM VLENG; # LENGTH OF VALUE TO BE CHECKED #
  3289. ARRAY VWRD1 [0:25] S(1);# STORAGE FOR CONVERSION #
  3290. BEGIN
  3291. ITEM VWORDT C(0,0,10);# VALUE WORD #
  3292. ITEM VWORDT0 I(0,0,60);# FIRST WORD #
  3293. END
  3294. ITEM VLENG1; # LENGTH AFTER CONVERSION #
  3295. ITEM FLAGDQ B; # DOUBLE QUOTE FLAG #
  3296. ITEM WDCT ; # WORD COUNT FOR TEMP ARRAY #
  3297. ITEM BTCT ; # CHAR INDEX FOR TEMP ARRAY #
  3298. DEF MXAT # 63 #; # SIZE OF ASCII TABLE #
  3299. ARRAY ASCII$TABLE [00:MXAT] S(1); # TABLE TO CONVERT DISPLAY CODE#
  3300. BEGIN # TO TWO DC OF ASCII CODE #
  3301. ITEM A$CHAR C(00,48,02) = ["3A", # COLON #
  3302. "41", # A #
  3303. "42", # B #
  3304. "43", # C #
  3305. "44", # D #
  3306. "45", # E #
  3307. "46", # F #
  3308. "47", # G #
  3309. "48", # H #
  3310. "49", # I #
  3311. "4A", # J #
  3312. "4B", # K #
  3313. "4C", # L #
  3314. "4D", # M #
  3315. "4E", # N #
  3316. "4F", # O #
  3317. "50", # P #
  3318. "51", # Q #
  3319. "52", # R #
  3320. "53", # S #
  3321. "54", # T #
  3322. "55", # U #
  3323. "56", # V #
  3324. "57", # W #
  3325. "58", # X #
  3326. "59", # Y #
  3327. "5A", # Z #
  3328. "30", # 0 #
  3329. "31", # 1 #
  3330. "32", # 2 #
  3331. "33", # 3 #
  3332. "34", # 4 #
  3333. "35", # 5 #
  3334. "36", # 6 #
  3335. "37", # 7 #
  3336. "38", # 8 #
  3337. "39", # 9 #
  3338. "2B", # + #
  3339. "2D", # - #
  3340. "2A", # * #
  3341. "2F", # / #
  3342. "28", # ( #
  3343. "29", # ) #
  3344. "24", # $ #
  3345. "3D", # = #
  3346. "20", # BLANK #
  3347. "2C", # , #
  3348. "2E", # . #
  3349. "23", # POUND #
  3350. "5B", # [ #
  3351. "5D", # ] #
  3352. "25", # % #
  3353. "22", # " #
  3354. "5F", # _ #
  3355. "21", # ! #
  3356. "26", # & #
  3357. "27", # ' #
  3358. "3F", # ? #
  3359. "3C", # < #
  3360. "3E", # > #
  3361. "40", # #
  3362. "5C", # \ #
  3363. "5E", # #
  3364. "3A" # SEMI COLON #
  3365. ];
  3366. END
  3367. ITEM VLINE; # VALUE LINE NUMBER #
  3368. ARRAY VCSTMT [0:0] S(1); # CURRENT STATEMENT-INFO #
  3369. BEGIN
  3370. ITEM VCSTID U(0,0,9); # STATEMENT-ID #
  3371. ITEM VCEFLG B(0,15,1); # LABEL ERROR FLAG #
  3372. ITEM VCLABL C(0,18,7); # LABEL-NAME #
  3373. END
  3374. ARRAY VRPTINFO [0:0] S(1); # REPEAT INFORMATION #
  3375. BEGIN
  3376. ITEM VGRPFLG B(0,0,1); # GROUP FLAG #
  3377. ITEM VSVC B(0,1,1); # SVC FLAG #
  3378. ITEM VPRTNUM U(0,6,9); # PORT NUMBER #
  3379. ITEM VGRPCNT U(0,15,9); # GROUP COUNT #
  3380. ITEM VNCIR U(0,24,9); # CIRCUIT COUNT #
  3381. END
  3382. # #
  3383. DEF DEF$MXLENG # 7 #; # DEFAULT MAXIMUM LENGTH OF VALUE #
  3384. DEF DEF$MXSTRING # 122 #; # DEFAULT MAXIMUN LENGTH OF STRING #
  3385.  
  3386. ITEM ITEMP; # INTEGER TEMPORARY #
  3387. ITEM MAXLENG; # MAXIMUM LENGTH ALLOWED FOR CURRENT VALUE#
  3388. ITEM VSTAT B; # STATUS OF VALUE PASSED TO ENTVAL #
  3389. ITEM K; # INTEGER TEMPORARY #
  3390. ITEM I; # INTEGER TEMPORARY #
  3391. ITEM WDC; # WORD COUNT #
  3392. ITEM BTC; # BYTE INDEX #
  3393. ITEM CHARCOUNT; # CHARACTER COUNT #
  3394. # #
  3395. ARRAY LABEL$NAME [0:0] S(1);
  3396. BEGIN
  3397. ITEM RIGHT$WORD C(0,18,7); # LABEL-NAME IN RIGHT 42 BITS #
  3398. END
  3399. DEF MXMLT # 8 #; # SIZE OF MAXIMUM LENGTH TABLE #
  3400. ARRAY MXLENG$TBL [0:MXMLT] S(1);
  3401. BEGIN
  3402. ITEM MXKWID I(00,00,30) = [KID"UNKNOWN", # KEYWORD I.D. #
  3403. KID"NAME2",
  3404. KID"UDATA",
  3405. KID"DHOST",
  3406. KID"SHOST",
  3407. KID"ANAME",
  3408. KID"PID",
  3409. KID"PAD",
  3410. KID"NETOSD"
  3411. ];
  3412. ITEM MXLENG I(00,30,30) = [0, # MAXIMUM LENGTH #
  3413. 3,
  3414. 256,
  3415. 2,
  3416. 3,
  3417. 7,
  3418. 3,
  3419. 64,
  3420. 3
  3421. ];
  3422. END
  3423. # #
  3424. SWITCH VALUJUMP , DECIMAL , # UNK , NODE ,#
  3425. NAME , TABLE , # VARIANT , OPGO ,#
  3426. TABLE , NAME , # DMP , LLNAME ,#
  3427. , , # , ,#
  3428. , , # , ,#
  3429. NAME , TABLE , # HNAME , LOC ,#
  3430. , , # , ,#
  3431. , , # , ,#
  3432. , , # , ,#
  3433. NAME , TABLE , # NCNAME , DI ,#
  3434. NAME , HEXIDECIMAL, # N1 , P1 ,#
  3435. NAME , HEXIDECIMAL, # N2 , P2 ,#
  3436. TABLE , TABLE , # NOLOAD1 , NOLOAD2 ,#
  3437. , , # , ,#
  3438. , , # , ,#
  3439. DECIMAL , HEXIDECIMAL, # NI , PORT ,#
  3440. TABLE , TABLE , # LTYPE , TIPTYPE ,#
  3441. TABLE , DECIMAL , # AUTO , AL ,#
  3442. TABLE , DECIMAL , # LSPEED , DFL ,#
  3443. DECIMAL , DECIMAL , # FRAME , RTIME ,#
  3444. DECIMAL , DECIMAL , # RCOUNT , NSVC ,#
  3445. TABLE , TABLE , # PSN , DCE ,#
  3446. DECIMAL , TABLE , # DTEA , ARSPEED ,#
  3447. DECIMAL , TABLE , # LCN , IMDISC ,#
  3448. TABLE , , # RC , ,#
  3449. AUTO$TABLE , CCP$TABLE , # STIP , TC ,#
  3450. TABLE , AUTO$TABLE , # RIC , CSET ,#
  3451. AUTO$TABLE , AUTO$HEX , # TSPEED , CA ,#
  3452. AUTO$DEC , TABLE , # CO , BCF ,#
  3453. CCP$DEC , DECIMAL , # MREC , W ,#
  3454. TABLE , DECIMAL , # CTYP , NCIR ,#
  3455. DECIMAL , CCP$TABLE , # NEN , COLLECT ,#
  3456. TABLE , TABLE , # XAUTO , DT ,#
  3457. CCP$TABLE , AUTO$HEX , # SDT , TA ,#
  3458. DECIMAL , DECIMAL , # ABL , DBZ ,#
  3459. DECIMAL , DECIMAL , # UBZ , DBL ,#
  3460. DECIMAL , DECIMAL , # UBL , XBZ ,#
  3461. DECIMAL , AUTO$DEC , # DO , STREAM ,#
  3462. NONE$DEC , , # HN , AUTOLOG ,#
  3463. TABLE , TABLE , # AUTOCON , PRI ,#
  3464. HEXIDECIMAL , HEXIDECIMAL, # P80 , P81 ,#
  3465. HEXIDECIMAL , HEXIDECIMAL, # P82 , P83 ,#
  3466. HEXIDECIMAL , HEXIDECIMAL, # P84 , P85 ,#
  3467. HEXIDECIMAL , HEXIDECIMAL, # P86 , P87 ,#
  3468. HEXIDECIMAL , HEXIDECIMAL, # P88 , P89 ,#
  3469. CCP$HEX , CCP$TABLE , # AB , BR ,#
  3470. CCP$HEX , CCP$HEX , # BS , B1 ,#
  3471. CCP$HEX , CCP$DEC , # B2 , CI ,#
  3472. CCP$HEX , CCP$HEX , # CN , CT ,#
  3473. CCP$DEC , CCP$TABLE , # DLC , DLTO ,#
  3474. CCP$HEX , CCP$TABLE , # DLX , EP ,#
  3475. CCP$TABLE , CCP$DEC , # IN , LI ,#
  3476. CCP$TABLE , CCP$TABLE , # OP , PA ,#
  3477. CCP$TABLE , CCP$DEC , # PG , PL ,#
  3478. CCP$DEC , CCP$TABLE , # PW , SE ,#
  3479. CCP$TABLE , CCP$DEC , # FA , XLC ,#
  3480. CCP$HEX , CCP$TABLE , # XLX , XLTO ,#
  3481. CCP$TABLE , CCP$HEX , # ELO , ELX ,#
  3482. CCP$TABLE , CCP$TABLE , # ELR , EBO ,#
  3483. CCP$TABLE , CCP$TABLE , # EBR , CP ,#
  3484. CCP$TABLE , CCP$TABLE , # IC , OC ,#
  3485. CCP$TABLE , CCP$HEX , # LK , EBX ,#
  3486. , HEXIDECIMAL, # , MC ,#
  3487. CCP$HEX , TABLE , # XLY , EOF ,#
  3488. HEXIDECIMAL , TABLE , # PAD , RTS ,#
  3489. DECIMAL , DECIMAL , # MCI , MLI ,#
  3490. ALPHANUM , ALPHSTRING , # NETOSD , DOMAIN ,#
  3491. ALPHSTRING , , # SERVICE , ,#
  3492. ALPHANUM , ALPHANUM$A , # MFAM , MUSER ,#
  3493. ALPHANUM , ALPHANUM , # MAPPL , DFAM ,#
  3494. ALPHANUM$A , ALPHANUM , # DUSER , PFAM ,#
  3495. ALPHANUM$A , , # PUSER , ,#
  3496. ALPHANUM , TABLE , # PAPPL , RS ,#
  3497. DECIMAL , TABLE , # MXCOPYS , NETXFR ,#
  3498. TABLE , TABLE , # UID , PRIV ,#
  3499. TABLE , TABLE , # KDSP , PRU ,#
  3500. ALPHANUM , ALPHANUM , # NAME1 , NAME2 ,#
  3501. DECIMAL , DECIMAL , # SNODE , DNODE ,#
  3502. DECIMAL , HEXIDECIMAL, # ACCLEV , DHOST ,#
  3503. DECIMAL , DECIMAL , # DPLR , DPLS ,#
  3504. HEXIDECIMAL , NONE$HEX , # PRID , UDATA ,#
  3505. DECIMAL , DECIMAL , # WR , WS ,#
  3506. ALPHANUM , , # PID , ,#
  3507. ALPHANUM , ALPHANUM$A , # FAM , UNAME ,#
  3508. HEXIDECIMAL , HEXIDECIMAL, # FAC1 , FAC2 ,#
  3509. HEXIDECIMAL , HEXIDECIMAL, # FAC3 , FAC4 ,#
  3510. HEXIDECIMAL , HEXIDECIMAL, # FAC5 , FAC6 ,#
  3511. HEXIDECIMAL , HEXIDECIMAL, # FAC7 , FAC8 ,#
  3512. HEXIDECIMAL , HEXIDECIMAL, # FAC9 , FAC10 ,#
  3513. HEXIDECIMAL , HEXIDECIMAL, # FAC11 , FAC12 ,#
  3514. HEXIDECIMAL , HEXIDECIMAL, # FAC13 , FAC14 ,#
  3515. HEXIDECIMAL , HEXIDECIMAL, # FAC15 , FAC16 ,#
  3516. HEXIDECIMAL , HEXIDECIMAL, # FAC17 , FAC18 ,#
  3517. HEXIDECIMAL , HEXIDECIMAL, # FAC19 , FAC20 ,#
  3518. HEXIDECIMAL , HEXIDECIMAL, # FAC21 , FAC22 ,#
  3519. HEXIDECIMAL , HEXIDECIMAL, # FAC23 , FAC24 ,#
  3520. HEXIDECIMAL , HEXIDECIMAL, # FAC25 , FAC26 ,#
  3521. HEXIDECIMAL , HEXIDECIMAL, # FAC27 , FAC28 ,#
  3522. HEXIDECIMAL , HEXIDECIMAL, # FAC29 , FAC30 ,#
  3523. HEXIDECIMAL , ALPHANUM , # FAC31 , ANAME ,#
  3524. HEXIDECIMAL , TABLE ; # SHOST , FASTSEL ,#
  3525. # #
  3526. CONTROL EJECT;
  3527. # #
  3528. # CODE BEGINS HERE #
  3529. # #
  3530. VSTAT = TRUE; # INITIALIZE FLAG #
  3531. GOTO VALUJUMP[VKWID]; # JUMP TO APPROPRIATE CHECK #
  3532. # #
  3533. AUTO$DEC: # FALUE SHOULD BE -AUTO- OR DECIMAL #
  3534. IF VWORD[0] EQ "AUTOREC" # IF VALUE IS -AUTOREC- #
  3535. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3536. BEGIN
  3537. RIGHT$WORD[0] = VWORD[0];
  3538. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3539. VLINE,VSTAT);
  3540. GOTO EXIT;
  3541. END
  3542. ELSE # IF NOT -AUTO- #
  3543. BEGIN
  3544. GOTO DECIMAL; # CHECK FOR DECIMAL VALUE #
  3545. END
  3546. AUTO$HEX: # VALUE SHOULD BE -AUTO- OR HEXIDECIMAL #
  3547. IF VWORD[0] EQ "AUTOREC" # IF VALUE IS -AUTOREC- #
  3548. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3549. BEGIN
  3550. RIGHT$WORD[0] = VWORD[0];
  3551. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3552. VLINE,VSTAT);
  3553. GOTO EXIT;
  3554. END
  3555. ELSE # IF NOT -AUTO- #
  3556. BEGIN
  3557. GOTO HEXIDECIMAL; # CHECK FOR HEXIDECIMAL VALUE #
  3558. END
  3559. AUTO$TABLE: # SHOULD BE -AUTO- OR IN A TABLE #
  3560. IF VWORD[0] EQ "AUTOREC" # IF VALUE IS -AUTOREC- #
  3561. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3562. BEGIN
  3563. RIGHT$WORD[0] = VWORD[0];
  3564. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3565. VLINE,VSTAT);
  3566. GOTO EXIT;
  3567. END
  3568. ELSE # IF NOT -AUTO- #
  3569. BEGIN
  3570. GOTO TABLE; # CHECK IF VALUE IS IN A TABLE #
  3571. END
  3572. CCP$DEC: # SHOULD BE -CCP- OR DECIMAL VALUE #
  3573. IF VWORD[0] EQ "CCP" # IF VALUE IS -CCP- #
  3574. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3575. BEGIN
  3576. RIGHT$WORD[0] = VWORD[0];
  3577. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3578. VLINE,VSTAT);
  3579. GOTO EXIT;
  3580. END
  3581. ELSE # IF NOT -CCP- #
  3582. BEGIN
  3583. GOTO DECIMAL; # CHECK FOR DECIMAL VALUE #
  3584. END
  3585. CCP$HEX: # SHOULD BE -CCP- OR HEXIDECIMAL VALUE #
  3586. IF VWORD[0] EQ "CCP" # IF VALUE IS C-CCP- #
  3587. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3588. BEGIN
  3589. RIGHT$WORD[0] = VWORD[0];
  3590. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3591. VLINE,VSTAT);
  3592. GOTO EXIT;
  3593. END
  3594. ELSE # IF NOT -CCP- #
  3595. BEGIN
  3596. GOTO HEXIDECIMAL; # CHECK FOR HEXIDECIMAL VALUE #
  3597. END
  3598. CCP$TABLE: # SHOULD BE -CCP- OR ENTRY IN A TABLE #
  3599. IF VWORD[0] EQ "CCP" # IF VALUE IS -CCP- #
  3600. THEN # THEN MAKE VALUE-DECLARATION ENTRY #
  3601. BEGIN
  3602. RIGHT$WORD[0] = VWORD[0];
  3603. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3604. VLINE,VSTAT);
  3605. GOTO EXIT;
  3606. END
  3607. ELSE # IF NOT -CCP- #
  3608. BEGIN
  3609. GOTO TABLE; # CHECK IF VALUE IS IN A TABLE #
  3610. END
  3611. NONE$DEC: # SHOULD BE -NONE- OR DECIMAL VALUE #
  3612. IF VWORD[0] EQ "NONE" # IF VALUE IS -NONE- #
  3613. THEN # MAKE VALUE-DECLARATION ENTRY #
  3614. BEGIN
  3615. RIGHT$WORD[0] = VWORD[0];
  3616. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3617. VLINE,VSTAT);
  3618. GOTO EXIT;
  3619. END
  3620. ELSE # IF NOT -NONE- #
  3621. BEGIN
  3622. GOTO DECIMAL; # CHECK FOR DECIMAL VALUE #
  3623. END
  3624. NONE$HEX: # SHOULD BE -NONE- OR DECIMAL VALUE #
  3625. IF VWORD[0] EQ "NONE" # IF VALUE IS -NONE- #
  3626. THEN # MAKE VALUE-DECLARATION ENTRY #
  3627. BEGIN
  3628. RIGHT$WORD[0] = VWORD[0];
  3629. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3630. VLINE,VSTAT);
  3631. GOTO EXIT;
  3632. END
  3633. ELSE # IF NOT -NONE- #
  3634. BEGIN
  3635. GOTO HEXIDECIMAL; # CHECK FOR DECIMAL VALUE #
  3636. END
  3637. ALPHANUM: # VALUE SHOULD BE ALPHANUMERIC - NO ASTRSK#
  3638. IF CURLXID EQ 999 # IF VALUE CONTAINS ASTERISK #
  3639. THEN
  3640. BEGIN # FLAG ERROR -- INVALID VALUE #
  3641. ERRMS1(ERR10,VLINE,VWORD[0]);
  3642. VSTAT = FALSE; # SET ERROR STATUS FLAG #
  3643. END
  3644. ALPHANUM$A: # VALUE CAN CONTAIN ASTERISK #
  3645. MAXLENG = DEF$MXLENG; # SET MAXIMUM LENGTH TO DEFAULT #
  3646. FOR ITEMP=0 STEP 1 UNTIL MXMLT
  3647. DO # SEARCH TABLE FOR EXCEPTIONS TO DEFAULT #
  3648. BEGIN
  3649. IF VKWID EQ MXKWID[ITEMP]
  3650. THEN # IF KEYWORD I.D. IS FOUND #
  3651. BEGIN
  3652. MAXLENG = MXLENG[ITEMP]; # SAVE MAXIMUM LENGTH #
  3653. END
  3654. END
  3655. IF VLENG GR MAXLENG
  3656. THEN # IF VALUE IS TOO LONG #
  3657. BEGIN # FLAG ERROR -- NAME TOO LONG #
  3658. ERRMS1(ERR10,VLINE,VWORD[0]);
  3659. VSTAT = FALSE; # SET ERROR STATUS #
  3660. END
  3661. RIGHT$WORD[0] = VWORD[0];
  3662. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3663. VLINE,VSTAT);
  3664. GOTO EXIT;
  3665. ALPHSTRING:
  3666. # CHECK FOR STRING VALUE #
  3667. IF VLENG GR DEF$MXSTRING
  3668. THEN
  3669. BEGIN
  3670. ERRMS1(ERR10,VLINE,VWORD[0]);
  3671. VSTAT = FALSE;
  3672. END
  3673. CHARCOUNT = 0; # SET CHARACTER COUNT TO ZERO #
  3674. WDC = 0;
  3675. BTC = 0;
  3676. FOR K = 0 STEP 1 UNTIL VLENG-1
  3677. DO
  3678. BEGIN
  3679. IF C<BTC,1>VWORD[WDC] EQ "."
  3680. THEN
  3681. BEGIN
  3682. CHARCOUNT = 0; # CLEAR CHARACTER COUNT #
  3683. END
  3684. ELSE
  3685. BEGIN
  3686. CHARCOUNT = CHARCOUNT + 1;
  3687. IF CHARCOUNT GR 31 # PATH NAMES TOO LONG #
  3688. THEN
  3689. BEGIN
  3690. ERRMS1(ERR10,VLINE,VWORD[0]);
  3691. VSTAT = FALSE;
  3692. GOTO ENT$;
  3693. END
  3694. END
  3695. BTC = BTC + 1; # BUMP CHAR INDEX #
  3696. IF BTC GR 9
  3697. THEN
  3698. BEGIN
  3699. BTC = 0; # RESET BYTE COUNT #
  3700. WDC = WDC + 1; # BUMP WORD COUNT #
  3701. END
  3702. END # END OF FOR #
  3703. ENT$:
  3704. ENTVAL(LABEL$NAME,VKWID,VCSTID[0],VWRD,VLENG,VRPTINFO,
  3705. VLINE,VSTAT);
  3706. GOTO EXIT;
  3707. DECIMAL: # CHECK FOR DECIMAL VALUE #
  3708. CHKDEC(VWRD,VLENG,VKWID,VCSTID[0],ITEMP,VRPTINFO,
  3709. VLINE,VSTAT);
  3710. GOTO EXIT;
  3711. HEXIDECIMAL: # CHECK FOR HEXIDECIMAL VALUE #
  3712. IF VKWID EQ KID"UDATA"
  3713. THEN # IF KEYWORD IS UDATA #
  3714. BEGIN
  3715. FLAGDQ = FALSE; # RESET DOUBLE QUOTE FLAG #
  3716. WDC = 0;
  3717. BTC = 0;
  3718. FOR K = 0 STEP 1 UNTIL VLENG-1
  3719. DO
  3720. BEGIN
  3721. IF C<BTC,1>VWORD[WDC] EQ """" # CHECK DOUBLE QUOTE #
  3722. THEN
  3723. BEGIN
  3724. IF FLAGDQ # TOGGLE THE FLAG #
  3725. THEN
  3726. FLAGDQ = FALSE;
  3727. ELSE
  3728. FLAGDQ = TRUE;
  3729. END
  3730. BTC = BTC + 1; # BUMP CHAR INDEX #
  3731. IF BTC GR 9
  3732. THEN
  3733. BEGIN
  3734. BTC = 0; # RESET BYTE COUNT #
  3735. WDC = WDC + 1; # BUMP WORD COUNT #
  3736. END
  3737. END # END OF FOR LOOP #
  3738. IF FLAGDQ # IF THERE ARE ODD NUMBER OF DOUBLE QUOTE #
  3739. THEN # THEN GIVE ERROR #
  3740. BEGIN
  3741. ERRMS1(ERR45,VLINE,VWORD[0]); # ODD NUMBER OF DOUBLE QUOTES #
  3742. GOTO EXIT;
  3743. END
  3744. I = (VLENG -1 )/10; # WORD INDEX #
  3745. FOR K=0 STEP 1 UNTIL I # COPY TO TEMP STORAGE #
  3746. DO
  3747. BEGIN
  3748. VWORDT0 [K] = VWORD0 [K];
  3749. END
  3750. # #
  3751. # IF ASCII CHARACTERS BETWEEN TWO DOUBLE QUOTES #
  3752. # CONVERT CHARATER TO HEX, TWO DISPLAY CODES #
  3753. # #
  3754. WDC = 0; # RESET WORD AND CHAR #
  3755. BTC = 0; # INDEX FOR BOTH ARRAY #
  3756. WDCT = 0;
  3757. BTCT = 0;
  3758. VLENG1 = 0; # RESET LENGTH #
  3759. FOR K = 0 STEP 1 UNTIL VLENG-1
  3760. DO
  3761. BEGIN
  3762. IF C<BTCT,1>VWORDT[WDCT] EQ """" # CHECK DOUBLE QUOTE #
  3763. THEN
  3764. BEGIN
  3765. IF FLAGDQ # TOGGLE THE FLAG #
  3766. THEN
  3767. FLAGDQ = FALSE;
  3768. ELSE
  3769. FLAGDQ = TRUE;
  3770. END
  3771. ELSE
  3772. BEGIN
  3773. IF FLAGDQ # IF ONE DOULBE QUOTE #
  3774. THEN # THEN CONVERT #
  3775. BEGIN
  3776. C<BTC,2>VWORD[WDC] = A$CHAR[C<BTCT,1>VWORDT[WDCT]];
  3777. BTC = BTC + 2; # BUMP CHAR INDEX #
  3778. VLENG1 = VLENG1 + 2; # BUMP LENGTH BY 2 #
  3779. END
  3780. ELSE # NO DOUBLE QUOTE FOUND #
  3781. BEGIN # NO CONVERSION #
  3782. C<BTC,1>VWORD[WDC] = C<BTCT,1>VWORDT[WDCT];
  3783. BTC = BTC + 1; # BUMP CHAR INDEX #
  3784. VLENG1 = VLENG1 +1 ; # BUMP LENGTH #
  3785. END
  3786. END # NOT DOUBLE QUOTE #
  3787. # #
  3788. # CHECK THE CONVERTED LENGTH #
  3789. # #
  3790. IF VLENG1 GR 248 # IF CONVERTED LENGTH IS GREATER THAN 248 #
  3791. THEN # THEN GIVE ERROR #
  3792. BEGIN
  3793. ERRMS1(ERR46,VLINE,VWORD[0]); # CONVERTED UDATA TOO LONG #
  3794. GOTO EXIT;
  3795. END
  3796. # #
  3797. # RESET THE CHAR INDEX AND WORD COUNT FOR TEMP ARRAY #
  3798. # #
  3799. BTCT = BTCT + 1; # BUMP CHAR INDEX #
  3800. IF BTCT GR 9
  3801. THEN
  3802. BEGIN
  3803. BTCT = 0; # RESET BYTE COUNT #
  3804. WDCT = WDCT + 1; # BUMP WORD COUNT #
  3805. END
  3806. # #
  3807. # RESET THE CHAR INDEX AND WORD COUNT FOR FINAL ARRAY #
  3808. # #
  3809. IF BTC GR 9
  3810. THEN
  3811. BEGIN
  3812. BTC = BTC - 10; # RESET BYTE COUNT #
  3813. WDC = WDC + 1; # BUMP WORD COUNT #
  3814. END
  3815. END # END OF FOR LOOP #
  3816. VLENG = VLENG1; # RESET LENGTH #
  3817. IF VLENG GR MAXUDATA # IF LENGTH GR MAXIMUM UDATA LENGTH #
  3818. THEN
  3819. BEGIN
  3820. ERRMS1(ERR10,VLINE,VWORD[0]); # FLAG -- VALUE TOO LONG #
  3821. VSTAT = FALSE; # SET ERROR STATUS #
  3822. END
  3823. END
  3824. ELSE
  3825. BEGIN
  3826. IF VKWID EQ KID"PAD"
  3827. THEN # IF KEYWORD IS PAD #
  3828. BEGIN
  3829. IF VLENG GR MAXPAD # IF LENGTH GR MAXIMUM PAD LENGTH #
  3830. THEN
  3831. BEGIN
  3832. ERRMS1(ERR10,VLINE,VWORD[0]); # FLAG -- VALUE TOO LONG #
  3833. VSTAT = FALSE; # SET ERROR STATUS #
  3834. END
  3835. IF B<58,2>VLENG NQ 0
  3836. THEN
  3837. BEGIN # PAD VALUES MUST BE IN MULTIPLES OF 4 HEX DIGITS #
  3838. ERRMS1(ERR44,VLINE,VWORD[0]);
  3839. VSTAT = FALSE;
  3840. END
  3841. END
  3842. END
  3843. CHKHEX(VWRD,VLENG,VKWID,VCSTID[0],ITEMP,VRPTINFO,
  3844. VLINE,VSTAT);
  3845. GOTO EXIT;
  3846. NAME: # VALUE SHOULD BE A NAME #
  3847. CHKNAME(VWRD,VKWID,VCSTID[0],CURTYPE,VLENG,VRPTINFO,
  3848. VLINE,VSTAT);
  3849. GOTO EXIT;
  3850. TABLE: # VALUE SHOULD BE IN A TABLE #
  3851. CHKTABL(VWRD,VLENG,VKWID,VCSTID[0],VRPTINFO,VLINE,VSTAT);
  3852. GOTO EXIT;
  3853. EXIT:
  3854. RETURN; # **** RETURN **** #
  3855. END # CKVDEC #
  3856. CONTROL EJECT;
  3857. PROC ENTLABL(LABEL$,LAB$ERR,STMT$ID,ELRPTINFO,ELLINE);
  3858. BEGIN
  3859. *IF,DEF,IMS
  3860. #
  3861. ** ENTLABL - ENTER LABEL INTO TABLES.
  3862. *
  3863. * D.K. ENDO 81/10/28
  3864. *
  3865. * THIS PROCEDURE INITIALIZES THE STATEMENT TABLE ENTRY BUFFERS,
  3866. * CREATES THE HEADER FOR THE ENTRY, AND IF NECESSARY, MAKES
  3867. * ENTRIES INTO VARIOUS OTHER INTERNAL TABLES.
  3868. *
  3869. * PROC ENTLABL(LABEL$,LAB$ERR,STMT$ID,ELLINE)
  3870. *
  3871. * ENTRY LABEL$ = LABEL/ELEMENT NAME.
  3872. * LAB$ERR = LABEL ERROR FLAG.
  3873. * STMT$ID = STATEMENT I.D.
  3874. * ELLINE = CURRENT SOURCE LINE NUMBER.
  3875. *
  3876. * EXIT NONE.
  3877. *
  3878. * METHOD
  3879. *
  3880. * CLEAR STATEMENT TABLE ENTRY BUFFER.
  3881. * SELECT CASE THAT APPLIES: (STMT TABLE ENTRY)
  3882. * CASE 1(TERMINAL):
  3883. * CLEAR TERMINAL STMT ENTRY BUFFER.
  3884. * INITIALIZE TERMIANL HEADER.
  3885. * CASE 2(TERMDEV):
  3886. * CLEAR TERMINAL STMT ENTRY BUFFER.
  3887. * INITIALIZE TERMINAL HEADER.
  3888. * INITIALIZE DEVICE HEADER.
  3889. * CASE 3(DEVICE):
  3890. * INITIALIZE DEVICE HEADER.
  3891. * CASE 4(LINE,GROUP):
  3892. * INITIALIZE LINE HEADER.
  3893. * CASE 5(SUPLINK,OUTCALL,INCALL):
  3894. * INITIALIZE HEADER(NO LABEL ENTRY).
  3895. * CASE 6(ALL OTHERS):
  3896. * INITIALIZE HEADER(WITH LABEL ENTRY).
  3897. * SELECT CASE THAT APPLIES: (OTHER TABLE ENTRIES)
  3898. * CASE 1(NPU):
  3899. * MAKE ENTRY INTO NPU TABLE.
  3900. * CASE 2(COUPLER):
  3901. * MAKE ENTRY INTO COUPLER TABLE.
  3902. * CASE 3(LOGLINK):
  3903. * MAKE ENTRY INTO LOGLINK TABLE.
  3904. * CASE 4(SUPLINK):
  3905. * SET SUPLINK FLAG IN CURRENT NPU TABLE ENTRY.
  3906. * CASE 5(OTHERS):
  3907. * NULL.
  3908. *
  3909. #
  3910. *ENDIF
  3911. ITEM LABEL$ C(10); # LABEL-NAME #
  3912. ITEM LAB$ERR B; # LABEL ERROR FLAG #
  3913. ITEM STMT$ID; # STATEMENT I.D. #
  3914. ITEM ELLINE; # LINE NUMBER OF STATEMENT #
  3915. ARRAY ELRPTINFO [0:0] S(1); # REPEAT INFO #
  3916. BEGIN
  3917. ITEM ELGFLAG B(0,0,1); # GROUP FLAG #
  3918. ITEM ELSVCFLG B(0,1,1); # SVC FLAG #
  3919. END
  3920. # #
  3921. ITEM FOUND B; # FLAG INDICATING LABEL WAS FOUND #
  3922. ITEM I; # SCRATCH ITEM #
  3923. ARRAY STMT$NAMES [0:21] S(1); # ABBREVIATED STMT NAMES #
  3924. ITEM ST$NAME C(0,0,10) = ["UNK ", # NULL STMT #
  3925. "NFL ", # NFILE #
  3926. "NPU ", # NPU #
  3927. "SUP ", # SUPLINK #
  3928. "CPL ", # COUPLER #
  3929. "LLK ", # LOGLINK #
  3930. "GRP ", # GROUP #
  3931. "LIN ", # LINE #
  3932. "UNK ", # #
  3933. "TRM ", # TERMINAL #
  3934. "DEV ", # DEVICE #
  3935. "TRK ", # TRUNK #
  3936. "LFL ", # LFILE #
  3937. "USR ", # USER #
  3938. "APP ", # APPL #
  3939. "OTC ", # OUTCALL #
  3940. "INC ", # INCALL #
  3941. "UNK ", # END #
  3942. "UNK ", # TERMDEV #
  3943. "UNK ", # DEFINE #
  3944. "UNK ", # COMMENT #
  3945. "UNK " # TITLE #
  3946. ];
  3947. SWITCH EL1JUMP
  3948. EL$EXIT, # NULL STATEMENT #
  3949. OTHERS, # NFILE #
  3950. OTHERS, # NPU #
  3951. NO$LABEL, # SUPLINK #
  3952. OTHERS, # COUPLER #
  3953. OTHERS, # LOGLINK #
  3954. LINE$GROUP, # GROUP #
  3955. LINE$GROUP, # LINE #
  3956. EL$EXIT, # #
  3957. EL$TERMINAL, # TERMINAL #
  3958. DEVICE, # DEVICE #
  3959. OTHERS, # TRUNK #
  3960. OTHERS, # LFILE #
  3961. OTHERS, # USER #
  3962. OTHERS, # APPL #
  3963. NO$LABEL, # OUTCALL #
  3964. NO$LABEL, # INCALL #
  3965. EL$EXIT, # END #
  3966. TERMDEV, # TERMDEV #
  3967. EL$EXIT, # DEFINE #
  3968. EL$EXIT, # COMMENT #
  3969. EL$EXIT; # TITLE #
  3970. SWITCH EL2JUMP
  3971. EL$EXIT, # NULL STATEMENT #
  3972. EL$EXIT, # NFILE #
  3973. NPU, # NPU #
  3974. SUPLINK, # SUPLINK #
  3975. COUPLER, # COUPLER #
  3976. LOGLINK, # LOGLINK #
  3977. EL$EXIT, # GROUP #
  3978. EL$EXIT, # LINE #
  3979. EL$EXIT, # #
  3980. EL$EXIT, # TERMINAL #
  3981. EL$EXIT, # DEVICE #
  3982. TRUNK, # TRUNK #
  3983. EL$EXIT, # LFILE #
  3984. EL$EXIT, # USER #
  3985. EL$EXIT, # APPL #
  3986. EL$EXIT, # OUTCALL #
  3987. EL$EXIT, # INCALL #
  3988. EL$EXIT, # END #
  3989. EL$EXIT, # TERMDEV #
  3990. EL$EXIT, # DEFINE #
  3991. EL$EXIT, # COMMENT #
  3992. EL$EXIT; # TITLE #
  3993. CONTROL EJECT;
  3994. # #
  3995. # CODE BEGINS HERE #
  3996. # #
  3997. FOR I=0 STEP 1 UNTIL 2 # CLEAR STMT-TABLE BUFF HEADER #
  3998. DO
  3999. STWORD[I] = 0;
  4000. # #
  4001. # #
  4002. GOTO EL1JUMP[STMT$ID]; # MAKE STATEMENT TABLE ENTRY #
  4003. # #
  4004. EL$TERMINAL:
  4005. FOR I=0 STEP 1 UNTIL 2 # CLEAR TERMINAL STATEMENT BUFF #
  4006. DO
  4007. TBWORD[I] = 0;
  4008. TBNAME[0] = ST$NAME[STID"TRMNL"];# SET ABBREV STMT NAME #
  4009. TBSTID[0] = STMT$ID; # SET STATEMENT I.D. TO TERMINAL #
  4010. TBLINE[0] = ELLINE; # SAVE LINE NUMBER OF STATEMENT #
  4011. TBWC[0] = 1; # SET WORD COUNT TO ONE #
  4012. TBCMB[1] = CMAP$B; # SAVE POINTER TO CONSOLE MAP #
  4013. TBCMW[1] = CMAP$W;
  4014. GOTO NEXT$JUMP;
  4015. # #
  4016. TERMDEV:
  4017. FOR I=0 STEP 1 UNTIL 2 # CLEAR TERMINAL STMT BUFFER #
  4018. DO
  4019. TBWORD[I] = 0;
  4020. TBNAME[0] = ST$NAME[STID"TRMNL"];# SET ABBREV STMT NAME #
  4021. TBSTID[0] = STID"TRMNL";# SET STATEMENT I.D. TO TERMINAL #
  4022. TBLINE[0] = ELLINE; # SAVE LINE NUMBER OF STATEMENT #
  4023. TBWC[0] = 1; # SET WORD COUNT TO ONE #
  4024. TBCMB[1] = CMAP$B; # SAVE POINTER TO CONSOLE MAP #
  4025. TBCMW[1] = CMAP$W;
  4026. # #
  4027. DEVICE:
  4028. STNAME[0] = ST$NAME[STID"DEVICE"]; # SET ABBREV STMT NAME #
  4029. STSTID[0] = STID"DEVICE"; # SET STATEMENT I.D. TO DEVICE #
  4030. STLNUM[0] = ELLINE; # SAVE LINE NUMBER OF STATEMENT #
  4031. STLABEL[1] = LABEL$; # SAVE LABEL-NAME #
  4032. STWC[0] = 2; # SET WORD COUNT TO TWO #
  4033. STLBERR[1] = LAB$ERR; # SAVE LABEL ERROR FLAG #
  4034. GOTO NEXT$JUMP;
  4035. # #
  4036. NO$LABEL:
  4037. STNAME[0] = ST$NAME[STMT$ID]; # SET ABBREV STMT NAME #
  4038. STSTID[0] = STMT$ID; # SAVE STATEMENT I.D. #
  4039. STLNUM[0] = ELLINE; # SAVE LINE NUMBER OF STATEMENT #
  4040. STWC[0] = 0; # WORD COUNT IS ZERO #
  4041. GOTO NEXT$JUMP;
  4042. # #
  4043. LINE$GROUP:
  4044. STNAME[0] = ST$NAME[STMT$ID]; # SET ABBREV STMT NAME #
  4045. STSTID[0] = STMT$ID; # SAVE STATEMENT I.D. #
  4046. STLNUM[0] = ELLINE; # SAVE LINE NUMBER #
  4047. STWC[0] = 2; # SET WORD COUNT TO TWO #
  4048. STLABEL[1] = LABEL$; # SAVE LABEL NAME #
  4049. STLBERR[1] = LAB$ERR; # SAVE LABEL ERROR FLAG #
  4050. GOTO NEXT$JUMP;
  4051. # #
  4052. OTHERS:
  4053. STNAME[0] = ST$NAME[STMT$ID]; # SET ABBREV STMT NAME #
  4054. STSTID[0] = STMT$ID; # SAVE STATEMENT I.D. #
  4055. STLNUM[0] = ELLINE; # SAVE LINE NUMBER OF STATEMENT #
  4056. STWC[0] = 1; # SET WORD COUNT TO ONE #
  4057. STLABEL[1] = LABEL$; # SAVE LABEL NAME #
  4058. STLBERR[1] = LAB$ERR; # SABE LABEL ERROR FLAG #
  4059. # #
  4060. # #
  4061. NEXT$JUMP: # MAKE ENTRIES IN INTERNAL TABLES #
  4062. GOTO EL2JUMP[STMT$ID]; # SWITCH BY STATEMENT I.D. #
  4063. # #
  4064. NPU:
  4065. IF (NTWC[0]*2) GQ NT$LENG - 1 # NEED MORE TABLE SPACE #
  4066. THEN
  4067. BEGIN
  4068. SSTATS(P<NPU$TABLE>,30);
  4069. END
  4070. NTCNP[0] = NTWC[0] + 1; # POINT TO CURRENT NPU ENTRY #
  4071. NTWC[0] = NTWC[0] + NTENTSZ; # INCREMENT ENTRY COUNT #
  4072. FOR I=NTWC[0] STEP -1 UNTIL NTCNP[0] DO
  4073. BEGIN # CLEAR ENTRY #
  4074. NTWORD[I] = 0;
  4075. END
  4076. IF LAB$ERR # IF LABEL IS NOT O.K. #
  4077. THEN
  4078. NTNAME[NTCNP[0]] = BLANK; # CLEAR ENTRY NAME #
  4079. ELSE # LABEL IS O.K. #
  4080. NTNAME[NTCNP[0]] = LABEL$; # SAVE NPU NAME #
  4081. GOTO EL$EXIT;
  4082. # #
  4083. COUPLER:
  4084. IF CTENT[0] GQ CT$LENG - 1 # NEED MORE TABLE SPACE #
  4085. THEN
  4086. BEGIN
  4087. SSTATS(P<COUP$TABLE>,20);
  4088. END
  4089. CTENT[0] = CTENT[0] + 1; # INCREMENT ENTRY COUNT #
  4090. CHNAME[0] = 0; # CLEAR COUPLER NAME #
  4091. CTWORD[CTENT[0]] = 0; # CLEAR ENTRY WORD #
  4092. CTNID[CTENT[0]] = NTNID[NTCNP[0]]; # ENTER NPU I.D. #
  4093. IF LAB$ERR # IF LABEL IS NOT O.K. #
  4094. THEN
  4095. CTNAME[CTENT[0]] = BLANK; # CLEAR ENTRY NAME #
  4096. ELSE # LABEL IS O.K. #
  4097. CTNAME[CTENT[0]] = LABEL$; # SAVE COUPLER NAME #
  4098. GOTO EL$EXIT;
  4099. # #
  4100. LOGLINK:
  4101. IF LNTENT[0] GQ LNT$LENG - 1 # NEED MORE TABLE SPACE #
  4102. THEN
  4103. BEGIN
  4104. SSTATS(P<LLINK$TABLE>,200);
  4105. SSTATS(P<LL$NODE$TABL>,100);
  4106. END
  4107. LNTENT[0] = LNTENT[0] + 1; # INCREMENT LNT ENTRY COUNT #
  4108. LLTENT[0] = LLTENT[0] + 1; # INCREMENT LLT ENTRY COUNT #
  4109. LNTWORD[LNTENT[0]] = 0; # CLEAR ENTRY WORD -- LNT #
  4110. LLTWORD[LLTENT[0]] = 0; # CLEAR ENTRY WORD -- LLT #
  4111. LLTWORD1[LLTENT[0]] = 0; # CLEAR ENTRY WORD 2 -- LLT #
  4112. LLTHNID[LLTENT[0]] = CTHNID[CTENT[0]]; # ENTER HOST NODE I.D. #
  4113. LLTHNAME[LLTENT[0]] = CHNAME[0]; # ENTER HOST NAME #
  4114. IF LAB$ERR # IF LABEL IS NOT O.K. #
  4115. THEN
  4116. LLTNAME[LLTENT[0]] = BLANK; # CLEAR ENTRY NAME #
  4117. ELSE # LABEL IS O.K. #
  4118. LLTNAME[LLTENT[0]] = LABEL$; # SAVE LOGLINK NAME #
  4119. GOTO EL$EXIT;
  4120. # #
  4121. SUPLINK:
  4122. NTSPLK[NTCNP[0]] = TRUE; # SUPLINK PRESENT FLAG #
  4123. GOTO EL$EXIT;
  4124.  
  4125. TRUNK:
  4126. IF TNIWC[0] GQ TNI$LENG - 1 # NEED MORE TABLE SPACE #
  4127. THEN
  4128. BEGIN
  4129. SSTATS(P<TNI$TABLE>,10); # ALLOCATE MORE SPACE #
  4130. SSTATS(P<TNN$TABLE>,20);
  4131. END
  4132. TNIWC[0] = TNIWC[0] + 1; # INCREMENT ENTRY COUNT #
  4133. TNNEC[0] = TNNEC[0] + 1;
  4134. TNIWORD[TNIWC[0]] = 0; # CLEAR NEXT ENTRY #
  4135. TNNWORD[TNNEC[0]] = 0;
  4136. TNNWORD1[TNNEC[0]] = 0;
  4137. GOTO EL$EXIT;
  4138. # #
  4139. EL$EXIT:
  4140.  
  4141. RETURN; # **** RETURN **** #
  4142. END # ENTLABL #
  4143. CONTROL EJECT;
  4144. PROC ENTNID;
  4145. BEGIN
  4146. *IF,DEF,IMS
  4147. #
  4148. ** ENTNID - ENTER NODE I.D. INTO LOGICAL LINK TABLE.
  4149. *
  4150. * D.K. ENDO 81/10/29
  4151. *
  4152. * THIS PROCEDURE INSERTS A TERMINAL NODE I.D. INTO EACH ENTRY OF
  4153. * THE LOGICAL LINK TABLE BASED ON A NAME IN THE CORRESPONDING ENTRY
  4154. * IN THE LOGICAL LINK NODE NAME TABLE.
  4155. *
  4156. * PROC ENTNID
  4157. *
  4158. * ENTRY NONE.
  4159. *
  4160. * EXIT NONE.
  4161. *
  4162. * METHOD
  4163. *
  4164. * FOR EACH ENTRY IN THE LOGICAL LINK NODE NAME TABLE
  4165. * SEARCH COUPLER TABLE FOR NODE NAME.
  4166. * IF FOUND,
  4167. * THEN,
  4168. * PUT NODE I.D. INTO CORRESPONDING ENTRY OF LOGICAL LINK TABLE.
  4169. * OTHERWISE,
  4170. * SEARCH NPU TABLE FOR NODE NAME.
  4171. * IF FOUND,
  4172. * PUT NODE I.D. INTO LOGICAL LINK TABLE.
  4173. *
  4174. #
  4175. *ENDIF
  4176. ITEM FOUND B; # FLAG SET IF NAME IS FOUND #
  4177. ITEM I; # SCRATCH ITEM #
  4178. ITEM J; # SCRATCH ITEM #
  4179. # #
  4180. # CODE BEGINS HERE #
  4181. # #
  4182. FOR I=1 STEP 1 UNTIL LNTENT[0] DO
  4183. BEGIN # FOR EACH ENTRY IN THE LLINK-NODE-TABLE #
  4184. FOUND = FALSE; # CLEAR FOUND FLAG #
  4185. FOR J=1 STEP 1 WHILE J LQ CTENT[0] AND NOT FOUND DO
  4186. BEGIN # SEARCH COUPLER TABLE FOR NAME #
  4187. IF CTNAME[J] EQ LNTNAME[I]
  4188. THEN # IF NAME IS FOUND IN COUPLER TABLE #
  4189. BEGIN
  4190. LLTNID[I] = CTHNID[J]; # PUT HNID OF COUPLER IN LLT #
  4191. FOUND = TRUE; # SET FOUND FLAG #
  4192. END
  4193. END
  4194. FOR J=1 STEP NTENTSZ WHILE J LS NTWC[0] AND NOT FOUND DO
  4195. BEGIN # SEARCH NPU TABLE FOR NAME IF NOT IN CT #
  4196. IF NTNAME[J] EQ LNTNAME[I]
  4197. THEN # IF NAME IS FOUND IN NPU TABLE #
  4198. BEGIN
  4199. LLTNID[I] = NTNID[J]; # PUT NID OF NPU IN LLT #
  4200. FOUND = TRUE; # SET FOUND FLAG #
  4201. END
  4202. END
  4203. END
  4204. FOR I=1 STEP 1 UNTIL TNNEC[0]
  4205. DO # FOR EACH ENTRY IN TNN TABLE #
  4206. BEGIN
  4207. FOR J=1 STEP NTENTSZ UNTIL NTWC[0]
  4208. DO # FOR EACH ENTRY IN NPU TABLE #
  4209. BEGIN
  4210. IF TNNN1[I] EQ NTNAME[J] # IF N1 VALUE MATCHES CRNT NAME #
  4211. THEN
  4212. BEGIN
  4213. TNIN1[I] = NTNID[J]; # PUT NODE I.D. IN TNI TABLE #
  4214. END
  4215. ELSE # NO MATCH ON -N1- VALUE #
  4216. BEGIN
  4217. IF TNNN2[I] EQ NTNAME[J] # IF N2 VALUE MATCHES CRNT NAME #
  4218. THEN
  4219. BEGIN
  4220. TNIN2[I] = NTNID[J]; # PUT NODE I.D. IN TNI TABLE #
  4221. END
  4222. END
  4223. END
  4224. END
  4225. RETURN; # **** RETURN **** #
  4226. END # ENTNID #
  4227. CONTROL EJECT;
  4228. PROC ENTVAL(EVVALUE,EVKWID,EVSTID,EVNA,EVLENG,EVRINFO,
  4229. EVLINE,EVSTAT);
  4230. BEGIN
  4231. *IF,DEF,IMS
  4232. #
  4233. ** ENTVAL - ENTER VALUE INTO TABLES.
  4234. *
  4235. * D.K. ENDO 81/10/29
  4236. *
  4237. * THIS PROCEDURE, BASED ON STATEMENT AND KEYWORD I.D., MAKES ENTRIES
  4238. * INTO STATEMENT TABLE ENTRY BUFFER AND OTHER VARIOUS INTERNAL
  4239. * TABLES.
  4240. *
  4241. * PROC ENTVAL(EVVALUE,EVKWID,EVSTID,EVNA,EVRINFO,EVLINE,EVSTAT)
  4242. *
  4243. * ENTRY EVVALUE = VALUE TO BE ENTER INTO TABLE.
  4244. * EVKWID = KEYWORD I.D.
  4245. * EVSTID = STATEMENT I.D.
  4246. * EVNA = KEYWORD NAME.
  4247. * EVRINFO = REPEAT INFORMATION.
  4248. * EVLINE = CURRENT SOURCE LINE NUMBER.
  4249. * EVSTAT = STATUS(SET TRUE IF VALUE O.K.)
  4250. *
  4251. * EXIT NONE.
  4252. *
  4253. * METHOD
  4254. *
  4255. * SELECT CASE THAT APPLIES:
  4256. * CASE 1(COUPLER):
  4257. * IF KEYWORD IS -NODE-,
  4258. * ENTER VALUE IN CURRENT COUPLER ENTRY.
  4259. * CASE 2(LOGLINK):
  4260. * IF KEYWORD IS -NCNAME-,
  4261. * ENTER VALUE IN CURRENT LOGICAL LINK NODE NAME TABLE ENTRY.
  4262. * CASE 3(NPU):
  4263. * IF KEYWORD IS -NODE-,
  4264. * ENTER VALUE IN CURRENT NPU TABLE ENTRY.
  4265. * CASE 4(OTHER STMT-S):
  4266. * NULL.
  4267. * SELECT CASE THAT APPLIES:
  4268. * CASE 1(AUTO,DT,LTYPE,STIP,TC,TIPTYPE):
  4269. * PUT ORDINAL INTO ORDINAL WORD
  4270. * CASE 2(CTYP):
  4271. * IF VALUE IS -SVC-,
  4272. * SET SVC FLAG IN REPEAT INFO.
  4273. * CASE 3(NCIR,NI,PORT):
  4274. * SAVE VALUE AS PART OF REPEAT INFO.
  4275. * IF NOT DUPLICATE VALUE DECLARATION,
  4276. * THEN,
  4277. * MAKE ENTRY INTO STATEMENT TABLE ENTRY BUFFER.
  4278. * OTHERWISE,
  4279. * FIND ENTRY.
  4280. * REPLACE WITH NEW ENTRY
  4281. * FLAG WARNING THAT ENTRY WAS REPLACED.
  4282. *
  4283. #
  4284. *ENDIF
  4285. DEF MAXSTRINGW # 14 #; # MAX WORD COUNT NEEDED FOR SERVICE/DOMAIN#
  4286. ITEM EVKWID; # KEYWORD I.D. #
  4287. ITEM EVSTID; # CURRENT STATEMENT I.D. #
  4288. ARRAY EVNA [0:25] S(1);
  4289. BEGIN
  4290. ITEM EVVNAME C(0,0,10); # CURRENT WORDS FROM SOURCE LINE#
  4291. END
  4292. ITEM EVLENG; # LENGTH OF VALUE #
  4293. ITEM EVLINE; # LINE NUMBER OF VALUE FOR KEYWORD #
  4294. ITEM EVSTAT B; # STATUS OF VALUE ENTRY #
  4295. ARRAY EVVALUE [0:0] S(1); # VALUE TO BE ENTERED #
  4296. BEGIN
  4297. ITEM RIGHT$VAL U(0,18,42); # VALUE IN RIGHT MOST 42 BITS #
  4298. ITEM RIGHT$NAM C(0,18,7); # NAME IN RIGHT MOST 42 BITS #
  4299. ITEM FULL$VAL U(00,00,60); # FULL WORD ENTRY FOR FAC #
  4300. END
  4301. ARRAY EVRINFO [0:0] S(1); # REPEAT INFORMATION #
  4302. BEGIN
  4303. ITEM EVGRPFLG B(00,00,01); # GROUP FLAG #
  4304. ITEM EVSVC B(00,01,01); # SVC FLAG #
  4305. ITEM EVPRTNUM U(00,06,09); # PORT NUMBER #
  4306. ITEM EVGRPCNT U(00,15,09); # GROUP COUNT #
  4307. ITEM EVNCIR U(00,24,09); # CIRCUIT COUNT #
  4308. END
  4309. # #
  4310. ITEM I, J, ITEMP, JTEMP; # INTEGER TEMPORARY #
  4311. # #
  4312. SWITCH EVJUMP , # NULL STMT #
  4313. , # NFILE #
  4314. NPU , # NPU #
  4315. KWD$ENTRY, # SUPLINK #
  4316. COUPLER , # COUPLER #
  4317. LOGLINK , # LOGLINK #
  4318. KWD$ENTRY, # GROUP #
  4319. KWD$ENTRY, # LINE #
  4320. , # #
  4321. KWD$ENTRY, # TERMINAL #
  4322. KWD$ENTRY, # DEVICE #
  4323. TRUNK$ , # TRUNK #
  4324. , # LFILE #
  4325. KWD$ENTRY, # USER #
  4326. KWD$ENTRY, # APPL #
  4327. KWD$ENTRY, # OUTCALL #
  4328. KWD$ENTRY, # INCALL #
  4329. , # END #
  4330. KWD$ENTRY, # TERMDEV #
  4331. , # DEFINE #
  4332. , # COMMENT #
  4333. ; # TITLE #
  4334. # #
  4335. SWITCH EVKWDJUMP , ST$ENTRY , # UNK , NODE ,#
  4336. ST$ENTRY , ST$ENTRY , # VARIANT , OPGO ,#
  4337. ST$ENTRY , ST$ENTRY , # DMP , LLNAME ,#
  4338. , , # , ,#
  4339. , , # , ,#
  4340. ST$ENTRY , ST$ENTRY , # HNAME , LOC ,#
  4341. , , # , ,#
  4342. , , # , ,#
  4343. , , # , ,#
  4344. ST$ENTRY , ST$ENTRY , # NCNAME , DI ,#
  4345. ST$ENTRY , ST$ENTRY , # N1 , P1 ,#
  4346. ST$ENTRY , ST$ENTRY , # N2 , P2 ,#
  4347. ST$ENTRY , ST$ENTRY , # NOLOAD1 , NOLOAD2 ,#
  4348. , , # , ,#
  4349. , , # , ,#
  4350. NI , PORT , # NI , PORT ,#
  4351. LTYPE , TIPTYPE , # LTYPE , TIPTYPE ,#
  4352. AUTO , ST$ENTRY , # AUTO , AL ,#
  4353. ST$ENTRY , ST$ENTRY , # LSPEED , DFL ,#
  4354. ST$ENTRY , ST$ENTRY , # FRAME , RTIME ,#
  4355. ST$ENTRY , ST$ENTRY , # RCOUNT , NSVC ,#
  4356. ST$ENTRY , ST$ENTRY , # PSN , DCE ,#
  4357. ST$ENTRY3 , ST$ENTRY , # DTEA , ARSPEED ,#
  4358. ST$ENTRY , ST$ENTRY , # LCN , IMDISC ,#
  4359. ST$ENTRY , , # RC , ,#
  4360. STIP , TC , # STIP , TC ,#
  4361. TB$ENTRY , TB$ENTRY , # RIC , CSET ,#
  4362. TB$ENTRY , TB$ENTRY , # TSPEED , CA ,#
  4363. TB$ENTRY , TB$ENTRY , # CO , BCF ,#
  4364. TB$ENTRY , TB$ENTRY , # MREC , W ,#
  4365. CTYP , NCIR , # CTYP , NCIR ,#
  4366. TB$ENTRY , COLLECT$ , # NEN , COLLECT ,#
  4367. AUTO , DT , # XAUTO , DT ,#
  4368. ST$ENTRY , ST$ENTRY , # SDT , TA ,#
  4369. ST$ENTRY , ST$ENTRY , # ABL , DBZ ,#
  4370. ST$ENTRY , ST$ENTRY , # UBZ , DBL ,#
  4371. ST$ENTRY , ST$ENTRY , # UBL , XBZ ,#
  4372. ST$ENTRY , ST$ENTRY , # DO , STREAM ,#
  4373. ST$ENTRY , , # HN , AUTOLOG ,#
  4374. ST$ENTRY , ST$ENTRY , # AUTOCON , PRI ,#
  4375. ST$ENTRY , ST$ENTRY , # P80 , P81 ,#
  4376. ST$ENTRY , ST$ENTRY , # P82 , P83 ,#
  4377. ST$ENTRY , ST$ENTRY , # P84 , P85 ,#
  4378. ST$ENTRY , ST$ENTRY , # P86 , P87 ,#
  4379. ST$ENTRY , ST$ENTRY , # P88 , P89 ,#
  4380. ST$ENTRY , ST$ENTRY , # AB , BR ,#
  4381. ST$ENTRY , ST$ENTRY , # BS , B1 ,#
  4382. ST$ENTRY , ST$ENTRY , # B2 , CI ,#
  4383. ST$ENTRY , ST$ENTRY , # CN , CT ,#
  4384. ST$ENTRY , ST$ENTRY , # DLC , DLTO ,#
  4385. ST$ENTRY , ST$ENTRY , # DLX , EP ,#
  4386. ST$ENTRY , ST$ENTRY , # IN , LI ,#
  4387. ST$ENTRY , ST$ENTRY , # OP , PA ,#
  4388. ST$ENTRY , ST$ENTRY , # PG , PL ,#
  4389. ST$ENTRY , ST$ENTRY , # PW , SE ,#
  4390. ST$ENTRY , ST$ENTRY , # FA , XLC ,#
  4391. ST$ENTRY , ST$ENTRY , # XLX , XLTO ,#
  4392. ST$ENTRY , ST$ENTRY , # ELO , ELX ,#
  4393. ST$ENTRY , ST$ENTRY , # ELR , EBO ,#
  4394. ST$ENTRY , ST$ENTRY , # EBR , CP ,#
  4395. ST$ENTRY , ST$ENTRY , # IC , OC ,#
  4396. ST$ENTRY , ST$ENTRY , # LK , EBX ,#
  4397. , ST$ENTRY , # , MC ,#
  4398. ST$ENTRY , TB$ENTRY , # XLY , EOF ,#
  4399. TB$ENTRY , ST$ENTRY , # PAD , RTS ,#
  4400. ST$ENTRY , ST$ENTRY , # MCI , MLI ,#
  4401. ST$ENTRY , STRING$ENTR, # NETOSD , DOMAIN ,#
  4402. STRING$ENTR , , # SERVICE , ,#
  4403. ST$ENTRY , ST$ENTRY , # MFAM , MUSER ,#
  4404. ST$ENTRY , ST$ENTRY , # MAPPL , DFAM ,#
  4405. ST$ENTRY , ST$ENTRY , # DUSER , PFAM ,#
  4406. ST$ENTRY , , # PUSER , ,#
  4407. ST$ENTRY , ST$ENTRY , # PAPPL , RS ,#
  4408. ST$ENTRY , ST$ENTRY , # MXCOPYS , NETXFR ,#
  4409. ST$ENTRY , ST$ENTRY , # UID , PRIV ,#
  4410. ST$ENTRY , ST$ENTRY , # KDSP , PRU ,#
  4411. ST$ENTRY , ST$ENTRY , # NAME1 , NAME2 ,#
  4412. ST$ENTRY , ST$ENTRY , # SNODE , DNODE ,#
  4413. ST$ENTRY , ST$ENTRY , # ACCLEV , DHOST ,#
  4414. ST$ENTRY , ST$ENTRY , # DPLR , DPLS ,#
  4415. ST$ENTRY , ST$ENTRYN , # PRID , UDATA ,#
  4416. ST$ENTRY , ST$ENTRY , # WR , WS ,#
  4417. ST$ENTRY , , # PID , ,#
  4418. ST$ENTRY , ST$ENTRY , # FAM , UNAME ,#
  4419. ST$FAC , ST$FAC , # FAC1 , FAC2 ,#
  4420. ST$FAC , ST$FAC , # FAC3 , FAC4 ,#
  4421. ST$FAC , ST$FAC , # FAC5 , FAC6 ,#
  4422. ST$FAC , ST$FAC , # FAC7 , FAC8 ,#
  4423. ST$FAC , ST$FAC , # FAC9 , FAC10 ,#
  4424. ST$FAC , ST$FAC , # FAC11 , FAC12 ,#
  4425. ST$FAC , ST$FAC , # FAC13 , FAC14 ,#
  4426. ST$FAC , ST$FAC , # FAC15 , FAC16 ,#
  4427. ST$FAC , ST$FAC , # FAC17 , FAC18 ,#
  4428. ST$FAC , ST$FAC , # FAC19 , FAC20 ,#
  4429. ST$FAC , ST$FAC , # FAC21 , FAC22 ,#
  4430. ST$FAC , ST$FAC , # FAC23 , FAC24 ,#
  4431. ST$FAC , ST$FAC , # FAC25 , FAC26 ,#
  4432. ST$FAC , ST$FAC , # FAC27 , FAC28 ,#
  4433. ST$FAC , ST$FAC , # FAC29 , FAC30 ,#
  4434. ST$FAC , ST$ENTRY , # FAC31 , ANAME ,#
  4435. ST$ENTRY , ST$ENTRY ; # SHOST , FASTSEL ,#
  4436. CONTROL EJECT;
  4437. # #
  4438. # CODE BEGINS HERE #
  4439. # #
  4440. GOTO EVJUMP[EVSTID];
  4441. # #
  4442. COUPLER: # FOR -COUPLER- STATEMENT #
  4443. IF EVKWID EQ KID"NODE" AND EVSTAT
  4444. THEN # IF NODE AND O.K. #
  4445. BEGIN # MAKE ENTRY IN COUPLER TABLE #
  4446. CTHNID[CTENT[0]] = RIGHT$VAL[0];
  4447. END
  4448. GOTO ST$ENTRY;
  4449. LOGLINK: # FOR -LOGLINK- STATEMENT #
  4450. IF EVKWID EQ KID"NCNAME" AND EVSTAT
  4451. THEN # IF NCNAME AND O.K. #
  4452. BEGIN # MAKE ENTRY IN LOGLINK NODE TABLE #
  4453. LNTNAME[LNTENT[0]] = RIGHT$NAM[0];
  4454. END
  4455. GOTO ST$ENTRY;
  4456. NPU: # FOR -NPU- STATEMENT #
  4457. IF EVKWID EQ KID"NODE" AND EVSTAT
  4458. THEN # IF NODE AND O.K. #
  4459. BEGIN # MAKE ENTRY IN NPU TABLE #
  4460. NTNID[NTCNP[0]] = RIGHT$VAL[0];
  4461. END
  4462. GOTO ST$ENTRY;
  4463. TRUNK$: # FOR -TRUNK- STATEMENT #
  4464. IF EVSTAT
  4465. THEN # IF VALUE IS O.K. #
  4466. BEGIN
  4467. IF EVKWID EQ KID"N1" # IF KEYWORD ID -N1- #
  4468. THEN
  4469. BEGIN # SAVE VALUE IN TNN TABLE #
  4470. TNNN1[TNNEC[0]] = RIGHT$NAM[0];
  4471. END
  4472. ELSE # KEYWORD IS NOT -N1- #
  4473. BEGIN
  4474. IF EVKWID EQ KID"N2" # IF KEYWORD ID -N2- #
  4475. THEN
  4476. BEGIN # SAVE VALUE IN TNN TABLE #
  4477. TNNN2[TNNEC[0]] = RIGHT$NAM[0];
  4478. END
  4479. END
  4480. END
  4481. GOTO ST$ENTRY;
  4482. # #
  4483. KWD$ENTRY: # FOR ALL OTHER STATEMENTS EXCEPT ABOVE #
  4484. GOTO EVKWDJUMP[EVKWID];
  4485. AUTO:
  4486. IF STORD3[2] EQ 0 # IF NOT SPECIFIED YET #
  4487. THEN
  4488. BEGIN
  4489. STORD3[2] = STWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4490. END
  4491. GOTO ST$ENTRY;
  4492. CTYP:
  4493. IF RIGHT$NAM[0] NQ "SVC" # IF VALUE IS NOT -SVC- #
  4494. THEN
  4495. BEGIN
  4496. EVSVC[0] = FALSE; # CLEAR -SVC- FLAG #
  4497. END
  4498. GOTO TB$ENTRY;
  4499. DT:
  4500. IF STORD1[2] EQ 0 # IF NOT SPECIFIED YET #
  4501. THEN
  4502. BEGIN
  4503. STORD1[2] = STWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4504. END
  4505. GOTO ST$ENTRY; # MAKE VALUE-DECLARATION ENTRY #
  4506. LTYPE:
  4507. IF STORD1[2] EQ 0 # IF NOT SPECIFIED YET #
  4508. THEN
  4509. BEGIN
  4510. STORD1[2] = STWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4511. END
  4512. CRNT$LTYPE = RIGHT$NAM[0]; # SAVE CURRENT LTYPE #
  4513. GOTO ST$ENTRY;
  4514. NCIR:
  4515. IF EVSTAT # IF VALUE IS O.K. #
  4516. THEN
  4517. BEGIN
  4518. EVNCIR[0] = RIGHT$VAL[0]; # SAVE CURRENT CIRCUIT COUNT #
  4519. END
  4520. GOTO TB$ENTRY;
  4521. NI:
  4522. IF EVSTAT # IF VALUE IS O.K. #
  4523. THEN
  4524. BEGIN
  4525. EVGRPCNT[0] = RIGHT$VAL[0]; # SAVE GROUP COUNT #
  4526. END
  4527. GOTO ST$ENTRY;
  4528. PORT:
  4529. IF EVSTAT AND # IF VALUE IS O.K. AND ON GROUP #
  4530. EVSTID EQ STID"GROUP" # STATEMENT #
  4531. THEN
  4532. BEGIN
  4533. EVPRTNUM[0] = RIGHT$VAL[0]; # SAVE PORT NUMBER #
  4534. END
  4535. GOTO ST$ENTRY;
  4536. STIP:
  4537. IF TBORD1[1] EQ 0 # IF NOT SPECIFIED YET #
  4538. THEN
  4539. BEGIN
  4540. TBORD1[1] = TBWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4541. END
  4542. GOTO TB$ENTRY; # MAKE VALUE-DECLARATION ENTRY #
  4543. TC:
  4544. IF TBORD2[1] EQ 0 # IF NOT SPECIFIED YET #
  4545. THEN
  4546. BEGIN
  4547. TBORD2[1] = TBWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4548. END
  4549. GOTO TB$ENTRY; # MAKE VALUE-DECLARATION ENTRY #
  4550. TIPTYPE:
  4551. IF STORD2[2] EQ 0 # IF NOT SPECIFIED YET #
  4552. THEN
  4553. BEGIN
  4554. STORD2[2] = STWC[0] + 1; # PUT ORDINAL IN ENTRY #
  4555. END
  4556. CRNT$TIP = RIGHT$NAM[0]; # SAVE CURRENT TIP VALUE #
  4557. GOTO ST$ENTRY; # MAKE VALUE-DECLARATION ENTRY #
  4558. COLLECT$:
  4559. IF EVSTID EQ STID"INCALL"
  4560. THEN # COLLECT IS SPECIFIED ON INCALL STMT #
  4561. GOTO ST$ENTRY; # STORE STATEMENT TABLE ENTRY #
  4562. ELSE # COLLECT IS SPECIFIED ON TERM STMT #
  4563. GOTO TB$ENTRY; # STORE IN TERMINAL BUFFER #
  4564. # #
  4565. ST$ENTRY: # MAKE VALUE-DECLARATION ENTRY #
  4566. IF (EVSTID EQ STID"COUPLER") AND (EVKWID EQ KID"HNAME")
  4567. THEN
  4568. BEGIN
  4569. # SET CURRENT COUPLER HOST NAME #
  4570. CHNAME[0] = RIGHT$VAL[0];
  4571. END
  4572. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4573. THEN
  4574. BEGIN
  4575. STWC[0] = STWC[0] + 1; # INCREMENT WORD COUNT #
  4576. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL IN TABLE #
  4577. IF EVKWID EQ KID"AUTO" # KWID = AUTO #
  4578. THEN
  4579. BEGIN
  4580. KYWD$ORD[KID"XAUTO"] = STWC[0]; # SET XAUTO POINTER #
  4581. END
  4582. ELSE
  4583. BEGIN
  4584. IF EVKWID EQ KID"XAUTO" # KEYWORD ID = XAUTO #
  4585. THEN
  4586. BEGIN
  4587. KYWD$ORD[KID"AUTO"] = STWC[0]; # SET AUTO POINTER #
  4588. END
  4589. END
  4590. END
  4591. ELSE # MUST HAVE ALREADY BEEN DEFINED #
  4592. BEGIN
  4593. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERRIDING DEC#
  4594. END
  4595. IF STB$LENG-1 LS STWC[0]
  4596. THEN # IF NEED MORE TABLE SPACE #
  4597. BEGIN # ALLOCATE MORE SPACE #
  4598. SSTATS(P<STMT$TABLE>,20);
  4599. END
  4600. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4601. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4602. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. #
  4603. STVALLEN[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4604. STVALNUM[ITEMP] = RIGHT$VAL[0]; # INSERT VALUE #
  4605. IF NOT EVSTAT # IF VALUE IS NO GOOD #
  4606. THEN
  4607. BEGIN
  4608. STVLERR[ITEMP] = TRUE; # SET VALUE ERROR FLAG #
  4609. END
  4610. GOTO EXIT;
  4611. ST$ENTRY2: # MAKE 2-WORD VAL-DEC ENTRY #
  4612. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4613. THEN
  4614. BEGIN
  4615. STWC[0] = STWC[0] +1; # INCREMENT WORD COUNT #
  4616. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL INTO TABLE #
  4617. STWC[0] = STWC[0] + 1; # INCREMENT COUNT FOR 2ND WORD #
  4618. END
  4619. ELSE # MUST HAVE ALREADY BEEN SPECIFIED #
  4620. BEGIN
  4621. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERRIDING DEC#
  4622. END
  4623. IF STWC[0]+1 GQ STB$LENG
  4624. THEN # IF NOT ENOUGH ROOM FOR ENTRY #
  4625. BEGIN
  4626. SSTATS(P<STMT$TABLE>,20); # ALLOCATE MORE TABLE SPACE #
  4627. END
  4628. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4629. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4630. STWORD[ITEMP+1] = 0;
  4631. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4632. STVALLEN[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4633. STVALNAM[ITEMP] = C<0,7>EVVNAME[0]; # INSERT 1ST 7 CHAR OF VALUE #
  4634. STVALNAM[ITEMP+1] = C<7,3>EVVNAME[0]; # INS 2ND 7 CHAR OF VALUE #
  4635. C<3,4>STVALNAM[ITEMP+1] = C<0,4>EVVNAME[1];
  4636. IF NOT EVSTAT #IF VALUE IS NO GOOD #
  4637. THEN
  4638. BEGIN
  4639. STVLERR[ITEMP] = TRUE; # SET VALUE-DEC ERROR FLAG #
  4640. END
  4641. GOTO EXIT;
  4642. ST$ENTRY3: # MAKE 3-WORD VAL-DEC ENTRY #
  4643. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4644. THEN
  4645. BEGIN
  4646. STWC[0] = STWC[0] +1; # INCREMENT WORD COUNT #
  4647. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL INTO TABLE #
  4648. STWC[0] = STWC[0] + 2; # INCREMENT COUNT FOR 2ND WORD #
  4649. END
  4650. ELSE # MUST HAVE ALREADY BEEN SPECIFIED #
  4651. BEGIN
  4652. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERRIDING DEC#
  4653. END
  4654. IF STWC[0]+1 GQ STB$LENG
  4655. THEN # IF NOT ENOUGH ROOM FOR ENTRY #
  4656. BEGIN
  4657. SSTATS(P<STMT$TABLE>,20); # ALLOCATE MORE TABLE SPACE #
  4658. END
  4659. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4660. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4661. STWORD[ITEMP+1] = 0;
  4662. STWORD[ITEMP+2] = 0;
  4663. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4664. STVALLEN[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4665. STVALNAM[ITEMP] = C<0,7>EVVNAME[0]; # INSERT 1ST 7 CHAR OF VALUE #
  4666. STVALNAM[ITEMP+1] = C<7,3>EVVNAME[0]; # INS 2ND 7 CHAR OF VALUE #
  4667. C<3,4>STVALNAM[ITEMP+1] = C<0,4>EVVNAME[1];
  4668. C<0,1>STVALNAM[ITEMP + 2] = C<4,1>EVVNAME[1];
  4669. IF NOT EVSTAT #IF VALUE IS NO GOOD #
  4670. THEN
  4671. BEGIN
  4672. STVLERR[ITEMP] = TRUE; # SET VALUE-DEC ERROR FLAG #
  4673. END
  4674. GOTO EXIT;
  4675. ST$FAC: # MAKE ENTRY FOR FAC #
  4676. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4677. THEN
  4678. BEGIN
  4679. STWC[0] = STWC[0] +1; # INCREMENT WORD COUNT #
  4680. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL INTO TABLE #
  4681. STWC[0] = STWC[0] + 1; # INCREMENT COUNT FOR 2ND WORD #
  4682. END
  4683. ELSE # MUST HAVE ALREADY BEEN SPECIFIED #
  4684. BEGIN
  4685. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERRIDING DEC#
  4686. END
  4687. IF STWC[0]+1 GQ STB$LENG
  4688. THEN # IF NOT ENOUGH ROOM FOR ENTRY #
  4689. BEGIN
  4690. SSTATS(P<STMT$TABLE>,20); # ALLOCATE MORE TABLE SPACE #
  4691. END
  4692. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4693. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4694. STWORD[ITEMP+1] = 0;
  4695. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4696. STVALLEN[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4697. STWORD[ITEMP + 1] = FULL$VAL[0]; # STORE FULL WORD VALUE #
  4698. IF NOT EVSTAT #IF VALUE IS NO GOOD #
  4699. THEN
  4700. BEGIN
  4701. STVLERR[ITEMP] = TRUE; # SET VALUE-DEC ERROR FLAG #
  4702. END
  4703. GOTO EXIT;
  4704. ST$ENTRYN: # MAKE N-WORD ENTRY #
  4705. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4706. THEN
  4707. BEGIN
  4708. STWC[0] = STWC[0] + 1; # INCREMENT WORD COUNT #
  4709. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL INTO TABLE #
  4710. IF EVKWID EQ KID"UDATA" # STATEMENT TABLE ENTRY SIZES #
  4711. THEN # DEPEND ON MAX PARAMETER LENGTH#
  4712. BEGIN
  4713. STWC[0] = STWC[0] + MAXUDATW; # MAX WORDS FOR UDATA #
  4714. END
  4715. END
  4716. ELSE # MUST HAVE ALREADY BEEN #
  4717. BEGIN # SPECIFIED #
  4718. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERIDING DEC #
  4719. END
  4720.  
  4721. IF STWC[0]+1 GQ STB$LENG
  4722. THEN
  4723. BEGIN
  4724. SSTATS(P<STMT$TABLE>,30); # ALLOCATE TABLE SPACE #
  4725. END
  4726.  
  4727. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4728. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4729. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4730. STVALNUM[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4731. IF EVVNAME[0] EQ "NONE" # IF NONE SPECIFIED #
  4732. THEN
  4733. BEGIN
  4734. STVALNUM[ITEMP] = 0; # SPECIAL CASE IT #
  4735. END
  4736. ELSE
  4737. BEGIN
  4738. # MAKE WORD ENTRIES INTO STATEMENT TABLE: ROUND UP, NEAREST WORD #
  4739.  
  4740. EVLENG = (EVLENG*4 + 5)/6; # GET DISPLAY CODE COUNT #
  4741. JTEMP = (EVLENG+9)/10; # NUMBER OF WORDS, SIGNIF. DATA #
  4742. FOR I = 1 STEP 1 WHILE I LQ JTEMP
  4743. DO
  4744. BEGIN
  4745. J = 10*I;
  4746. IF J LQ EVLENG # INSERT VALUE INTO TABLE: #
  4747. THEN
  4748. BEGIN # EITHER 10 CHARS PER WORD, OR #
  4749. STWORD[ITEMP+I] = B<0,60>EVVNAME[I-1];
  4750. END
  4751. ELSE
  4752. BEGIN # LAST (PARTIAL WORD) ENTRY: #
  4753. STWORD[ITEMP+I] = 0; # CLEAR ENTRY #
  4754. J = EVLENG-(J-10); # LENGTH MODULO 10, LAST LENGTH #
  4755. C<0,J>STWORD[ITEMP+I] = C<0,J>EVVNAME[I-1];
  4756. END
  4757. END
  4758. END
  4759. IF NOT EVSTAT
  4760. THEN
  4761. BEGIN
  4762. STVLERR[ITEMP] = TRUE; # SET VALUE-DEC ERROR FLAG #
  4763. END
  4764. GOTO EXIT;
  4765.  
  4766. STRING$ENTR: # MAKE STRING ENTRY #
  4767. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4768. THEN
  4769. BEGIN
  4770. STWC[0] = STWC[0] + 1; # INCREMENT WORD COUNT #
  4771. KYWD$ORD[EVKWID] = STWC[0]; # PUT ORDINAL INTO TABLE #
  4772. STWC[0] = STWC[0] + MAXSTRINGW;# MAX WORDS FOR STRING #
  4773. END
  4774. ELSE # MUST HAVE ALREADY BEEN #
  4775. BEGIN # SPECIFIED #
  4776. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERIDING DEC #
  4777. END
  4778.  
  4779. IF STWC[0]+1 GQ STB$LENG
  4780. THEN
  4781. BEGIN
  4782. SSTATS(P<STMT$TABLE>,30); # ALLOCATE TABLE SPACE #
  4783. END
  4784.  
  4785. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4786. STWORD[ITEMP] = 0; # CLEAR ENTRY #
  4787. STKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4788. STVALNUM[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4789. JTEMP = EVLENG/10 + 1; # ROUND UP TO INTEGER NUMBER #
  4790. # OF WORDS #
  4791. FOR I = 1 STEP 1 UNTIL JTEMP
  4792. DO
  4793. BEGIN
  4794. STWORD[ITEMP + I] = EVVNAME[I - 1]; # TRANSFER WORDS #
  4795. END
  4796. IF NOT EVSTAT
  4797. THEN
  4798. BEGIN
  4799. STVLERR[ITEMP] = TRUE; # SET VALUE-DEC ERROR FLAG #
  4800. END
  4801. GOTO EXIT;
  4802. TB$ENTRY: # MAKE VALUE- ENTRY IN TERM BUFFER #
  4803. IF KYWD$ORD[EVKWID] EQ 0 # IF NOT SPECIFIED YET #
  4804. THEN
  4805. BEGIN
  4806. KYWD$ORD[EVKWID] = TBWC[0] + 1;# PUT ORDINAL IN TABLE #
  4807. TBWC[0] = TBWC[0] + 1; # INCREMENT WORD COUNT #
  4808. IF EVKWID EQ KID"PAD" # TERM BUFF TABLE ENTRY SIZES #
  4809. THEN # DEPEND ON MAX PARAMETER LENGTH#
  4810. BEGIN
  4811. TBWC[0] = TBWC[0] + MAXPADW; # MAX WORDS FOR PAD #
  4812. END
  4813. END
  4814. ELSE # MUST HAVE ALREADY BEEN DEFINED #
  4815. BEGIN
  4816. ERRMS1(ERR39,EVLINE,EVVNAME[0]);# FLAG WARNING - OVERRIDING DEC#
  4817. END
  4818.  
  4819. IF TB$LENG-1 LS TBWC[0]
  4820. THEN # IF NEED MORE TABLE SPACE #
  4821. BEGIN # ALLOCATE MORE SPACE #
  4822. SSTATS(P<TERM$BUFFER>,30);
  4823. END
  4824.  
  4825. ITEMP = KYWD$ORD[EVKWID]; # SAVE ORDINAL #
  4826. TBWORD[ITEMP] = 0; # CLEAR ENTRY #
  4827. TBKWID[ITEMP] = EVKWID; # INSERT KEYWORD I.D. INTO ENTRY#
  4828.  
  4829. IF EVKWID NQ KID"PAD"
  4830. THEN
  4831. BEGIN
  4832. TBVALLEN[ITEMP] = EVLENG; # INSERT VALUE LENGTH #
  4833. TBVALNUM[ITEMP] = RIGHT$VAL[0];# INSERT VALUE #
  4834. END
  4835. ELSE
  4836. BEGIN
  4837. TBVALNUM[ITEMP] = EVLENG / 2; # NUMBER OF 8-BIT PAD ENTRIES #
  4838. EVLENG = (EVLENG*4 + 5)/6; # 4-BIT HEX STRINGS ARE 4/6 THE #
  4839. # SIZE OF 6-BIT CHAR. HEX STRNGS#
  4840. #PUT WORD ENTRIES INTO TERM BUFF TABLE: ROUND UP, NEAREST WORD #
  4841. JTEMP = (EVLENG+9)/10; # NUMBER OF WORDS, SIGNIF. DATA #
  4842. FOR I = 1 STEP 1 WHILE I LQ JTEMP
  4843. DO
  4844. BEGIN
  4845. J = 10*I;
  4846. IF J LQ EVLENG # INSERT VALUE INTO TABLE: #
  4847. THEN
  4848. BEGIN # EITHER 10 CHARS PER WORD, OR #
  4849. TBWORD[ITEMP+I] = B<0,60>EVVNAME[I-1];
  4850. END
  4851. ELSE
  4852. BEGIN # LAST (PARTIAL WORD) ENTRY: #
  4853. TBWORD[ITEMP+I] = 0; # CLEAR ENTRY #
  4854. J = EVLENG-(J-10); # LENGTH MODULO 10, LAST LNGTH#
  4855. C<0,J>TBWORD[ITEMP+I] = C<0,J>EVVNAME[I-1];
  4856. END
  4857. END
  4858. END
  4859.  
  4860. IF NOT EVSTAT # IF VALUE IS NO GOOD #
  4861. THEN
  4862. BEGIN
  4863. TBVLERR[ITEMP] = TRUE; # SET VALUE ERROR FLAG #
  4864. END
  4865. GOTO EXIT;
  4866. EXIT:
  4867. RETURN; # **** RETURN **** #
  4868. END # ENTVAL #
  4869. CONTROL EJECT;
  4870. PROC NAMEGEN(RPTNAME,GROUPSIZE,NCIR$CNT,PORT$NUM,NGLINE,NGSTAT);
  4871. BEGIN
  4872. *IF,DEF,IMS
  4873. #
  4874. ** NAMEGEN - NAME GENERATOR
  4875. *
  4876. * D.K. ENDO 81/10/29
  4877. *
  4878. * THIS PROCEDURE CONTATINATES PORT NUMBER AND/OR CIRCUIT COUNT ON
  4879. * TO A GIVEN ROOT NAME.
  4880. *
  4881. * PROC NAMEGEN(RPTNAME,GROUPSIZE,NCIR$CNT,PORT$NUM,NGLINE,NGSTAT)
  4882. *
  4883. * ENTRY RPTNAME = ROOT NAME.
  4884. * GROUPSIZE = -NI- VALUE ON GROUP STATEMENT.
  4885. * NCIR$CNT = -NCIR- VALUE.
  4886. * PORT$NUM = PORT NUMBER.
  4887. * NGLINE = CURRENT SOURCE LINE NUMBER.
  4888. *
  4889. * EXIT NGSTAT = RETURNED STATUS (SET -TRUE- IF GENERATED OK)
  4890. *
  4891. * NOTE
  4892. *
  4893. * THE ALGORITHM FOR CONCATINATION IS SUCH THAT BOTH A PORT NUMBER
  4894. * AND A CIRCUIT COUNT NUMBER CAN BE CONCATINATED TO A ROOT NAME.
  4895. * THIS IS BECAUSE WHEN THIS PROC WAS FIRST WRITTEN THERE WAS A
  4896. * NEED FOR IT. EVEN THOUGH IT IS NO LONGER NECESSARY TO HAVE THE
  4897. * CAPABILITY, THE CODE WAS LEFT IN SHOULD THE NEED ARISE.
  4898. *
  4899. * METHOD
  4900. *
  4901. * CHECK RPTNAME LENGTH, GROUPSIZE,NCIR$CNT, AND SUM OF PORTNUM AND
  4902. * GROUPSIZE TO BE TOO LARGE. IF SO, THEN FLAG AN ERROR, OTHERWISE
  4903. * CONCATINATE NUMBER TO NAME AS FOLLOWS:
  4904. *
  4905. * FOR EACH ITERATION OF PORTNUM UNTIL GROUPSIZE
  4906. * IF GROUPSIZE GREATER THAN ZERO,
  4907. * CONCATINATE PORT TO ROOT NAME.
  4908. * IF NCIR$CNT GREATER THAN ZERO,
  4909. * THEN,
  4910. * FOR EACH ITERATION OF NUMBER FROM ZERO UNTIL NCIR$CNT,
  4911. * CONCATINATE NUMBER TO CURRENT NAME.
  4912. * CHECK FOR DUPLICATE LABEL (SEE CKGNAME)
  4913. * OTHERWISE,
  4914. * CHECK NAME FOR DUPLICATE LABLE (SEE CKGNAME)
  4915. *
  4916. #
  4917. *ENDIF
  4918. ITEM RPTNAME C(10); # ROOT-NAME #
  4919. ITEM GROUPSIZE; # GROUP SIZE #
  4920. ITEM NCIR$CNT; # NCIR COUNT #
  4921. ITEM PORT$NUM; # PORT NUMBER #
  4922. ITEM NGLINE; # CURRENT LINE NUMBER #
  4923. ITEM NGSTAT B; # STATUS RETURNED, SET TRUE IF NO ERRORS #
  4924. # #
  4925. XREF
  4926. BEGIN
  4927. FUNC XCHD C(10); # CONVERTS BINARY TO HEX DISPLAY CODE #
  4928. END
  4929. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  4930. ITEM GRP$CNT; # GROUP COUNT #
  4931. ITEM ITEMP; # INTEGER TEMPORARY #
  4932. ITEM LENGTH; # LENGTH OF NAME AFTER ADDING PORT #
  4933. ITEM NAME$TEMP C(10); # BUFFER FOR CHARACTER CONCATINATION #
  4934. ITEM RCOUNT; # REPEAT COUNT #
  4935. ITEM RLNGTH; # LENGTH OF NAME AFTER ADDING RPT$CNT #
  4936. ITEM RNLENG; # LENGTH OF ROOT-NAME IN CHARACTERS #
  4937. CONTROL EJECT;
  4938. # #
  4939. # CODE BEGINS HERE #
  4940. # #
  4941. NGSTAT = TRUE; # INITIALIZE RETURN STATUS TO O.K. #
  4942. RNLENG = 0; # INITIALIZE CHARACTER COUNT #
  4943. FOR ITEMP=0 STEP 1 UNTIL 9 DO # FIND LENGTH OF ROOT-NAME #
  4944. BEGIN
  4945. IF C<ITEMP,1>RPTNAME NQ " " # ASSUME NAME IS LEFT JUSTIFIED #
  4946. THEN # AND BLANK FILLED #
  4947. BEGIN
  4948. RNLENG = RNLENG + 1;
  4949. END
  4950. END
  4951. IF RNLENG GR 5 # THERE IS NO ROOM TO CONCAT NUM TO NAME #
  4952. THEN
  4953. BEGIN
  4954. ERRMS1(ERR31,NGLINE,RPTNAME); # FLAG ERROR -- LABEL TOO LONG #
  4955. NGSTAT = FALSE; # RETURN ERROR STATUS #
  4956. END
  4957. ELSE # THERE IS ROOM TO CONCAT AT LEAST 1 CHAR #
  4958. BEGIN
  4959. IF NCIR$CNT GQ 255 # -NCIR- PARAMETER OUT OF RANGE #
  4960. THEN
  4961. BEGIN
  4962. ERRMS1(ERR27,NGLINE,BLANK); # FLAG ERROR -- NI TOO LARGE #
  4963. NGSTAT = FALSE; # RETURN ERROR STATUS #
  4964. END
  4965. ELSE # REPEAT COUNT IS O.K. #
  4966. BEGIN
  4967. IF GROUPSIZE GQ 255 # -NI- PARAMETER TO LARGE #
  4968. THEN
  4969. BEGIN
  4970. ERRMS1(ERR37,NGLINE,BLANK);# FLAG ERROR -- NI TOO LARGE #
  4971. NGSTAT = FALSE; # RETURN ERROR STATUS #
  4972. END
  4973. ELSE # GROUP SIZE IS O.K. #
  4974. BEGIN
  4975. IF PORT$NUM + GROUPSIZE GR X"FF" # PORT IS TOO LARGE #
  4976. THEN
  4977. BEGIN
  4978. ERRMS1(ERR38,NGLINE,BLANK); #FLAG ERROR--PORT OUT OF RNGE#
  4979. NGSTAT = FALSE; # RETURN ERROR STATUS #
  4980. END
  4981. END
  4982. END
  4983. END
  4984. IF NGSTAT # NOT LIMIT ERRORS DETECTED #
  4985. THEN
  4986. BEGIN
  4987. ITEMP = 0; # INITIALIZE TEMP TO CONTAIN CURRENT PORT #
  4988. # #
  4989. # THE FOLLOWING LOOP WAS CODED IN A MANNER THAT WOULD #
  4990. # SIMULATE A -FASTLOOP-. SYMPL COMPILER DOES NOT #
  4991. # GENERATE THE LOOP PROPERLY. #
  4992. # #
  4993. GRP$CNT = 0; # INITIALIZE GROUP COUNT #
  4994. NGLOOP: BEGIN
  4995. NAME$TEMP = RPTNAME; # PUT ROOT-NAME IN BUFFER #
  4996. LENGTH = RNLENG; # INITIALIZE CHAR COUNT OF NAME #
  4997. IF GROUPSIZE NQ 0 # GROUP STMT MUST HAVE BEEN SPECIFIED #
  4998. THEN
  4999. BEGIN
  5000. ITEMP = PORT$NUM + GRP$CNT;# CALCULATE PORT #
  5001. CTEMP = XCHD(ITEMP); # CONVERT PORT TO DISPLAY CODE #
  5002. LENGTH = LENGTH + 2; # INCREMENT LENGTH #
  5003. IF ITEMP GR X"F" # IF PORT GREATER THAN 15 #
  5004. THEN # THEN MUST BE TWO CHAR LONG #
  5005. BEGIN
  5006. C<RNLENG,2>NAME$TEMP = C<8,2>CTEMP;# CONCAT PORT TO NAME #
  5007. END
  5008. ELSE # MUST BE ONLY ONE CHARACTER #
  5009. BEGIN
  5010. C<RNLENG,1>NAME$TEMP = "0"; # CONCAT PORT TO NAME #
  5011. C<RNLENG+1,1>NAME$TEMP = C<9,1>CTEMP;
  5012. END
  5013. END
  5014. IF NCIR$CNT GR 0 # NCIR MUST BAVE BEEN SPECIFIED #
  5015. THEN # CONCAT REPEAT ITERATION #
  5016. BEGIN
  5017. *IF,DEF,IMS
  5018. #
  5019. ** PS1TERM - PASS 1 TERMINATION ROUTINE.
  5020. *
  5021. * D.K. ENDO 81/10/29
  5022. *
  5023. * THIS PROCEDURE DOES FINAL CHECKING AND PROCESSING FOR PASS 1.
  5024. *
  5025. * PROC PS1TERM(P1TCSTMT,P1TNEXW,P1TLINE,P1TEOF)
  5026. *
  5027. * ENTRY P1TCSTMT = CURRENT STATEMENT INFORMATION.
  5028. * P1TNEXW = NEXT TOKEN/WORD.
  5029. * P1TLINE = CURRENT SOURCE LINE NUMBER.
  5030. * P1TEOF = END OF FILE FLAG.
  5031. *
  5032. * EXIT NONE.
  5033. *
  5034. * METHOD
  5035. *
  5036. * IF CURRENT STATEMENT IS -END-,
  5037. * THEN,
  5038. * IF SUPERFLUOUS DATA AFTER END,
  5039. * FLAG ERROR.
  5040. * OTHERWISE,
  5041. * IF CURRENT STATEMENT IS NOT LFILE OR NFILE,
  5042. * FLAG ERROR -- MISSING END.
  5043. * IF NCF DIVISION,
  5044. * CALL ENTNID TO PUT TERMINAL NODE I.D.-S IN LOGLINK TABLE.
  5045. * FLUSH CIO BUFFERS FOR SECONDARY INPUT FILE, EXPANDED SECONDARY
  5046. * INPUT FILE, STATEMENT TABLE, AND PASS 1 ERROR FILE.
  5047. *
  5048. #
  5049. *ENDIF
  5050. FOR RCOUNT=0 STEP 1 WHILE RCOUNT LS NCIR$CNT AND NGSTAT DO
  5051. BEGIN
  5052. CTEMP = XCHD(RCOUNT); # CONVERT REPEAT COUNT TO HEX #
  5053. RLNGTH = LENGTH + 2; # INCREMENT LENGTH #
  5054. IF RCOUNT GR X"F" # MUST BE TWO CHAR LONG #
  5055. THEN
  5056. BEGIN
  5057. C<LENGTH,2>NAME$TEMP = C<8,2>CTEMP;# CONCAT CNT TO NAME#
  5058. END
  5059. ELSE
  5060. BEGIN # MUST BE ONE CHAR LONG #
  5061. C<LENGTH,1>NAME$TEMP = "0"; # CONCAT COUNT TO NAME #
  5062. C<LENGTH+1,1>NAME$TEMP = C<9,1>CTEMP;
  5063. END
  5064. CKGNAME(NAME$TEMP,RLNGTH,ITEMP,NGLINE,NGSTAT);#CHECK NAME#
  5065. END
  5066. END
  5067. ELSE
  5068. BEGIN
  5069. CKGNAME(NAME$TEMP,LENGTH,ITEMP,NGLINE,NGSTAT); #CHECK NAME#
  5070. END
  5071. END
  5072. GRP$CNT = GRP$CNT + 1; # INCREMENT COUNT #
  5073. IF GRP$CNT LS GROUPSIZE AND NGSTAT
  5074. THEN
  5075. BEGIN
  5076. GOTO NGLOOP;
  5077. END
  5078. # #
  5079. # THIS SHOULD BE THE END OF THE LOOP #
  5080. # #
  5081. END
  5082. RETURN; # **** RETURN **** #
  5083. END # NAMEGEN #
  5084. CONTROL EJECT;
  5085. PROC PS1TERM(P1TCSTMT,P1TNEXW,P1TLINE,P1TEOF);
  5086. BEGIN # PASS 1 TERMINATION ROUTINE #
  5087. ITEM P1TNEXW C(10); # NEXT WORD/ELEMENT #
  5088. ITEM P1TLINE; # LINE NUMBER OF LAST LINE #
  5089. ITEM P1TEOF B; # END OF FILE FLAG #
  5090. ARRAY P1TCSTMT [0:0] S(1); # CURRENT STATEMENT INFO #
  5091. BEGIN
  5092. ITEM P1TCSTID U(0,0,9); # CURRENT STATEMENT I.D. #
  5093. END
  5094. # #
  5095. ITEM I; # SCRATCH ITEM #
  5096. ITEM STATS; # STATUS RETURNED BY WRITEH #
  5097. # #
  5098. # CODE BEGINS HERE #
  5099. # #
  5100. IF P1TCSTID[0] EQ STID"END$" # LAST STMT SENSED WAS -END- #
  5101. THEN
  5102. BEGIN
  5103. IF P1TNEXW EQ "." # OF NEXT ELEMENT IS A PERIOD #
  5104. THEN
  5105. BEGIN
  5106. LEXSCAN; # FORM NEXT ELEMENT #
  5107. IF NEXTYPE NQ TYPEEOF # IF NEXT END OF FILE #
  5108. THEN
  5109. BEGIN
  5110. ERRMS1(ERR35,NEXLINE,BLANK);#FLAG ERROR -- SUPERFLUOUS DATA#
  5111. FOR I=0 WHILE NEXTYPE NQ TYPEEOF DO
  5112. BEGIN # SCAN TO END OF FILE #
  5113. LEXSCAN; # GET NEXT WORD/ELEMENT #
  5114. END
  5115. END
  5116. END
  5117. ELSE # NEXT WORD IS NOT PERIOD #
  5118. BEGIN
  5119. IF P1TNEXW EQ TYPEEOF
  5120. THEN # IF END OF FILE #
  5121. BEGIN
  5122. ERRMS1(ERR8,P1TLINE,BLANK);# FLAG ERROR -- NO PERIOD #
  5123. END
  5124. ELSE # NOT END OF FILE #
  5125. BEGIN
  5126. ERRMS1(ERR35,P1TLINE,BLANK);#FLAG ERROR -- SUPERFLUOUS DATA#
  5127. FOR I=0 WHILE NEXTYPE NQ TYPEEOF DO
  5128. BEGIN # SCAN TO END OF FILE #
  5129. LEXSCAN; # GET NEXT WORD/ELEMENT #
  5130. END
  5131. END
  5132. END
  5133. END
  5134. ELSE # LAST STMT SENSED WAS NOT END #
  5135. BEGIN
  5136. IF P1TCSTID[0] NQ STID"NFILE" AND
  5137. P1TCSTID[0] NQ STID"LFILE"
  5138. THEN # IF NOT NFILE OR LFILE STATEMENT #
  5139. BEGIN
  5140. ERRMS1(ERR21,LINE,BLANK); # FLAG ERROR -- MISSING END #
  5141. WRITEH(SECFET,INPBUFF,11,STATS);
  5142. END
  5143. END
  5144. IF NCFDIV
  5145. THEN # IF THIS IS AN NCF DIVISION #
  5146. BEGIN
  5147. ENTNID; # ENTER NODE I.D.-S IN LL AND TNI TABLES #
  5148. SSTATS(P<LL$NODE$TABL>,-LNT$LENG); # RELEASE LL NODE TABLE #
  5149. SSTATS(P<TNN$TABLE>,-TNN$LENG); # RELEASE TNN TABLE #
  5150. END
  5151. FIRSTDIV = FALSE; # CLEAR FIRST DIVIVSION FLAG #
  5152. WRITEF(SECFET); # FLUSH SECONDARY INPUT FILE BUFFER #
  5153. RECALL(SECFET);
  5154. WRITEF(ESIFET); # FLUSH EXPANDED SECONDARY INPUT FILE BUFF#
  5155. RECALL(ESIFET);
  5156. WRITEF(STFET); # WRITE EOF ON STMT-TABLE FILE #
  5157. RECALL(STFET);
  5158. ERRMS1(0,0,0); # FLUSH PASS 1 ERROR FILE BUFFER #
  5159. RETURN; # **** RETURN **** #
  5160. END # PS1TERM #
  5161. CONTROL EJECT;
  5162. PROC SCNTOPRD;
  5163. BEGIN # SCAN TO PERIOD #
  5164. *IF,DEF,IMS
  5165. #
  5166. ** SCNTOPRD - SCAN TO PERIOD
  5167. *
  5168. * D.K. ENDO 81/10/29
  5169. *
  5170. * THIS PROCEDURE SCAN SOURCE LINE TO PERIOD, MARKING THE END OF
  5171. * CURRENT STATEMENT.
  5172. *
  5173. * PROC SCNTOPRD
  5174. *
  5175. * ENTRY NONE.
  5176. *
  5177. * EXIT NONE.
  5178. *
  5179. * METHOD
  5180. *
  5181. * KEEP CALLING LEXSCAN TO FORM TOKENS TILL A PERIOD IS FOUND.
  5182. *
  5183. #
  5184. *ENDIF
  5185. ITEM I;
  5186. # #
  5187. # CODE BEGINS HERE #
  5188. # #
  5189. FOR I=0 WHILE CURWORD[0] NQ "." AND NEXTYPE NQ TYPEEOF
  5190. DO
  5191. BEGIN
  5192. LEXSCAN;
  5193. END
  5194. RETURN; # **** RETURN **** #
  5195. END # SCNTOPRD #
  5196. CONTROL EJECT;
  5197. PROC SDEFINE(SDCSTMT);
  5198. BEGIN # STORE DEFINE STRING #
  5199. *IF,DEF,IMS
  5200. #
  5201. ** SDEFINE - STORE DEFINE STRING.
  5202. *
  5203. * D.K. ENDO 81/10/29
  5204. *
  5205. * THIS PROCEDURE STORES A DEFINE STRING INTO THE DEFINE TABLE
  5206. * PACKING OUT EXTRA BLANKS.
  5207. *
  5208. * PROC SDEFINE(SDCSTMT)
  5209. *
  5210. * ENTRY SDCSTMT = CURRENT STATEMENT INFORMATION
  5211. *
  5212. * EXIT NONE.
  5213. *
  5214. * METHOD
  5215. *
  5216. * PUT DEFINE NAME INTO NEW ENTRY.
  5217. * IF NEXT TOKEN IS NOT COMMA,
  5218. * STORE NEXT WORD IN BEGIN OF DEFINE TEXT.
  5219. * IF NEXT TOKEN IS A PERIOD,
  5220. * THEN,
  5221. * STORE PERIOD IN DEFINE TEXT.
  5222. * OTHERWISE,
  5223. * ENTER STATE TABLE:
  5224. *E
  5225. *
  5226. * ***STATE I 0) I 1) I 2)LAST CHAR I 3)LAST CHAR I
  5227. * *** I INIT I ALPHA- I BEFORE BLNKSI NON- I
  5228. * STIM ***I I NUMERIC I --ALPHANUM I ALPHANUM I
  5229. * ---------+-------------+-------------+-------------+-------------+
  5230. * I 0 I 2 I 2 I 3 I
  5231. * I I I I I
  5232. * I I I I I
  5233. * BLANK I NONE I NONE I NONE I NONE I
  5234. * I I I I I
  5235. * I I I I I
  5236. * I I I I I
  5237. * ---------+-------------+-------------+-------------+-------------+
  5238. * I 1 I 1 I 1 I 1 I
  5239. * I I I I I
  5240. * LETTER I PACK I PACK I PACK COMMA I PACK I
  5241. * DIGIT I CHARACTER I CHARACTER I PACK I CHARACTER I
  5242. * ASTERISK I I I CHARACTER I I
  5243. * I I I I I
  5244. * I I I I I
  5245. * ---------+-------------+-------------+-------------+-------------+
  5246. * I 3 I 3 I 3 I 3 I
  5247. * I I I I I
  5248. * + I PACK I PACK I PACK I PACK I
  5249. * DELIM I CHARACTER I CHARACTER I CHARACTER I CHARACTER I
  5250. * I I I I I
  5251. * I I I I I
  5252. * I I I I I
  5253. * ---------+-------------+-------------+-------------+-------------+
  5254. * I 0 I 0 I 0 I 0 I
  5255. * I I I I I
  5256. * I PACK I PACK I PACK I PACK I
  5257. * PERIOD I CHARACTER I CHARACTER I CHARACTER I CHARACTER I
  5258. * I I I I I
  5259. * I I I I I
  5260. * I (E)I (E)I (E)I (E)I
  5261. * ---------+-------------+-------------+-------------+-------------+
  5262. * I 2 I 2 I 2 I 2 I
  5263. * I I I I I
  5264. * * I FLAG ERROR I FLAG ERROR I FLAG ERROR I FLAG ERROR I
  5265. * SPECIAL I PACK I PACK I PACK I PACK I
  5266. * I CHARACTER I CHARACTER I CHARACTER I CHARACTER I
  5267. * I I I I I
  5268. * I I I I I
  5269. * ---------+-------------+-------------+-------------+-------------+
  5270. *
  5271. * (E) -- EXIT STATE TABLE
  5272. * + -- DELIMITER --> : / = / ,
  5273. * * -- ALL CHARACTERS THAT ARE NOT ONE OF ABOVE
  5274. *
  5275. #
  5276. *ENDIF
  5277. ARRAY SDCSTMT [0:0] S(1); # CURRENT STATEMENT INFO #
  5278. BEGIN
  5279. ITEM SDCSTID U(0,0,9); # STATEMENT I.D. #
  5280. ITEM SDCEFLG B(0,15,1); # LABEL ERROR FLAG #
  5281. ITEM SDCLABL C(0,18,7); # LABEL-NAME #
  5282. END
  5283. # #
  5284. DEF STATE0 # 0 #; # STATE 0 -- BIT NUM OF COL IN STATE TABLE#
  5285. DEF STATE1 # 6 #; # STATE 1 -- #
  5286. DEF STATE2 # 12 #; # STATE 2 -- BIT NUM OF COL IN STATE TABLE#
  5287. DEF STATE3 # 18 #; # STATE 3 -- #
  5288. DEF STATE4 # 24 #; # STATE 4 -- #
  5289. ITEM CHARCNT; # CHARACTER COUNT #
  5290. ITEM CHARCNT1; # CHARACTER COUNT #
  5291. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  5292. ITEM I; # INTEGER TEMPORARY #
  5293. ITEM STATE; # CURRENT STATE #
  5294. ARRAY STATETAB [0:10] S(1); # STATE TABLE #
  5295. ITEM STATETABLE U(0,0,60) = [
  5296. # / STATES #
  5297. # STIMULUS / 0123456789#
  5298. # BLANK # "AJAAA ",
  5299. # LETTER # "CCBCC ",
  5300. # DIGIT # "CCBCC ",
  5301. # DELIMITER# "EEEEE ",
  5302. # PERIOD # "GGGGG ",
  5303. # ASTERISK # "CCBCC ",
  5304. # SPECIAL # "FFFFF ",
  5305. # EOF # "HHHHH ",
  5306. # EOC # "AAAAA ",
  5307. # TRACE # "DDDDD ",
  5308. # SQUOTE # "LLLLJ "];
  5309. SWITCH SDEFJMP ERR, # COLON 00 #
  5310. PROCEED, # A 01 #
  5311. STORCOMMA, # B 02 #
  5312. STORCHAR, # C 03 #
  5313. SETTRACE, # D 04 #
  5314. DELIMITER, # E 05 #
  5315. SPECIAL, # F 06 #
  5316. PERIOD, # G 07 #
  5317. EOF, # H 10 #
  5318. TRANS01, # I 11 #
  5319. TRANS02, # J 12 #
  5320. TRANS03, # K 13 #
  5321. TRANS04; # L 14 #
  5322. CONTROL EJECT;
  5323. # #
  5324. # CODE BEGINS HERE #
  5325. # #
  5326. P<DT$TEMPLATE> = LOC(DEFNAME[DTWC[0]])+ 1; #INITIALIZE TABLE PNTR#
  5327. DTMP$NAME[0] = SDCLABL[0]; # SAVE DEFINE NAME #
  5328. DTMP$WCNT[0] = 1; # INITIALIZE WORD COUNT #
  5329. CHARCNT = 0; # INITIALIZE CHARACTER COUNT #
  5330. CHARCNT1 = 0 ; # INITIALIZE CHARACTER COUNT #
  5331. STATE = STATE0; # INITIALIZE STATE TO STATE 0 #
  5332. IF DT$LENG - DTWC[0] LS 50 # NEED MORE TABLE SPACE #
  5333. THEN
  5334. BEGIN
  5335. SSTATS(P<DEFINE$TABLE>,200);
  5336. END
  5337. IF C<0,1>NEXWORD[0] NQ "," # SAVE NEXWORD IN DEFINE STRING #
  5338. THEN
  5339. BEGIN
  5340. FOR I=1 STEP 1 UNTIL NEXLENG DO
  5341. BEGIN
  5342. IF CHARCNT GQ 10 # AT END OF WORD #
  5343. THEN # STORE IN NEXT WORD #
  5344. BEGIN
  5345. DTMP$WCNT[0] = DTMP$WCNT[0] + 1; # INCREMENT WORD COUNT#
  5346. CHARCNT = 0; # INITIALIZE CHARACTER COUNT #
  5347. END
  5348. C<CHARCNT,1>DTMP$DSTRG[DTMP$WCNT[0]] = # STORE CHARACTER FROM#
  5349. C<CHARCNT1,1>NEXWORD[0] ; # NEXWORD #
  5350. CHARCNT = CHARCNT + 1; # INCREMENT CHARACTER COUNT #
  5351. CHARCNT1 = CHARCNT1 + 1; # BUMP CHARCNT1 #
  5352. END
  5353. STATE = STATE2; # SET STATE TO STATE 2 #
  5354. END
  5355. IF NEXTYPE EQ TYPEUNK AND NEXLENG EQ 1 # MUST BE A SPECIAL #
  5356. THEN # CHARACTER #
  5357. BEGIN
  5358. ERRMS1(ERR6,LINE,NEXWORD[0]);# FLAG ERROR #
  5359. END
  5360. IF NEXWORD[0] EQ "."
  5361. THEN
  5362. GOTO PERIOD;
  5363. GOTO STARTSTATE;
  5364. # #
  5365. STORCOMMA: # STORE COMMA IN DEFINE STRING #
  5366. IF CHARCNT GQ 10 # WORD IS FULL #
  5367. THEN # STORE IN NEXT WORD #
  5368. BEGIN
  5369. DTMP$WCNT[0] = DTMP$WCNT[0] + 1; # INCREMENT WORD COUNT #
  5370. CHARCNT = 0; # INITIAL CHARACTER COUNT #
  5371. END
  5372. C<CHARCNT,1>DTMP$DSTRG[DTMP$WCNT[0]] = ","; # STORE COMMA #
  5373. CHARCNT = CHARCNT + 1; # INCREMENT CHAR COUNT #
  5374. STORCHAR: # STORE CHARACTER IN DEFINE STRING #
  5375. STATE = STATE1; # SET STATE TO STATE 2 #
  5376. IF CHARCNT GQ 10 # WORD IS FULL #
  5377. THEN # STORE CHARACTER IN NEXT WORD #
  5378. BEGIN
  5379. DTMP$WCNT[0] = DTMP$WCNT[0] + 1; # INCREMENT WORD COUNT #
  5380. CHARCNT = 0; # INITIALIZE CHARACTER COUNT #
  5381. END
  5382. C<CHARCNT,1>DTMP$DSTRG[DTMP$WCNT[0]] = CURCHAR;#PUT CHAR IN STRNG#
  5383. CHARCNT = CHARCNT + 1; # INCREMENT CHARACTER COUNT #
  5384. # #
  5385. PROCEED: # GET NEXT CHARACTER #
  5386. GETSCHAR(CURCHAR,LINE,CURSTAT);
  5387. # #
  5388. STARTSTATE:
  5389. GOTO SDEFJMP[B<STATE,6>STATETABLE[CURSTAT]];
  5390. # #
  5391. SETTRACE:
  5392. TFLAG = TFLAG + 1;# RESECT TRACE FLAG #
  5393. GOTO PROCEED;
  5394. # #
  5395. DELIMITER:
  5396. STATE = STATE3; # SET STATE TO STATE 3 #
  5397. IF CHARCNT GQ 10 # WORD IS FULL #
  5398. THEN # STORE CHARACTER IN NEXT WORD #
  5399. BEGIN
  5400. DTMP$WCNT[0] = DTMP$WCNT[0] + 1; # INCREMENT WORD COUNT #
  5401. CHARCNT = 0;
  5402. END
  5403. C<CHARCNT,1>DTMP$DSTRG[DTMP$WCNT[0]] = CURCHAR;#PUT CHAR IN STRNG#
  5404. CHARCNT = CHARCNT + 1; # INCREMENT CHARACTER COUNT #
  5405. GOTO PROCEED; # GET NEXT CHARACTER #
  5406. # #
  5407. SPECIAL:
  5408. CTEMP = CURCHAR;
  5409. ERRMS1(ERR6,LINE,CTEMP); # MAKE ENTRY IN ERROR-FILE #
  5410. STATE = STATE2; # SET STATE TO STATE 2 #
  5411. GOTO STORCHAR; # STORE CHARACTER #
  5412. # #
  5413. PERIOD: # MARKS END OF DEFINE STRING #
  5414. IF CHARCNT GQ 10 # WORD IS FULL #
  5415. THEN # STORE PERIOD IN NEXT WORD #
  5416. BEGIN
  5417. DTMP$WCNT[0] = DTMP$WCNT[0] + 1; # INCREMENT WORD COUNT #
  5418. CHARCNT = 0; # INTIALIZE CHARACTER COUNT #
  5419. END
  5420. C<CHARCNT,1>DTMP$DSTRG[DTMP$WCNT[0]] = "."; # STORE PERIOD #
  5421. CHARCNT = CHARCNT + 1; # INCREMENT CHARACTER COUNT #
  5422. IF CHARCNT LS 10 # IF WORD IS NOT FULL #
  5423. THEN # ZERO FILL REST OF WORD #
  5424. BEGIN
  5425. FOR I=CHARCNT STEP 1 UNTIL 9 DO
  5426. B<I*6,6>DTMP$DSTRG[DTMP$WCNT[0]] = " ";
  5427. END
  5428. DTWC[0] = DTWC[0] + DTMP$WCNT[0] + 1; # INCR DEF TAB WORD COUNT#
  5429. IF CURSTAT EQ STAT"PER"# IF CURRENT CHARACTER IS PERIOD #
  5430. THEN # STORE IT IN NEXWORD #
  5431. LEXSCAN;
  5432. # #
  5433. EOF:
  5434. LEXSCAN;
  5435. ERR:
  5436. RETURN; # **** RETURN **** #
  5437. # #
  5438. TRANS01:
  5439. STATE = STATE1; # SET STATE #
  5440. GOTO PROCEED; # GET NEXT CHARACTER #
  5441. # #
  5442. TRANS02:
  5443. STATE = STATE2;
  5444. GOTO PROCEED;
  5445. # #
  5446. TRANS03:
  5447. STATE = STATE3;
  5448. GOTO PROCEED;
  5449. # #
  5450. TRANS04:
  5451. STATE = STATE4;
  5452. GOTO PROCEED;
  5453. END # SDEFINE #
  5454. CONTROL EJECT;
  5455. PROC STERM(TRPTINFO,TLINE,TCSTMT,TL$STID);
  5456. BEGIN # STATEMENT TERMINATION ROUTINE #
  5457. *IF,DEF,IMS
  5458. #
  5459. ** STERM - STATEMENT TERMINATION ROUTINE
  5460. *
  5461. * D.K. ENDO 81/10/29
  5462. *
  5463. * THIS PROCEDURE DOES FINAL CHECKING AND PROCESSING ON A STATEMENT.
  5464. *
  5465. * PROC STERM(TRPTINFO,TLINE,TCSTMT,TL$STID)
  5466. *
  5467. * ENTRY TRPTINFO = REPEAT INFORMATION.
  5468. * TLINE = CURRENT SOURCE LINE NUMBER.
  5469. * TCSTMT = CURRENT STATEMENT INFORMATION.
  5470. * TL$STID = PREVIOUS STATEMENT-S I.D.
  5471. *
  5472. * EXIT NONE.
  5473. *
  5474. * METHOD
  5475. *
  5476. * IF CURRENT STATEMENT IS GROUP AND NI NOT SPECIFIED,
  5477. * DEFAULT NI TO ONE.
  5478. * IF CURRENT LINE IS X.25,
  5479. * IF STATEMENT IS GROUP,
  5480. * THEN
  5481. * FLAG ERROR -- GROUP NOT ALLOWED FOR X.25.
  5482. * SET LABEL ERROR FLAG.
  5483. * CLEAR LABEL POINTER.
  5484. * OTHERWISE,
  5485. * IF CURRENT STATEMENT IS TERMINAL OR TERMDEV
  5486. * IF CURRENT CIRCUIT IS SVC,
  5487. * THEN,
  5488. * IF CURRENT CIRCUIT COUNT IS ZERO,
  5489. * DEFAULT CIRCUIT COUNT TO ONE.
  5490. * OTHERWISE,
  5491. * CLOSE THE CIRCUIT COUNT.
  5492. * IF NI IS GREATER THAN ZERO,
  5493. * THEN,
  5494. * IF PORT NUMBER IS GREATER THAN ZERO,
  5495. * THEN,
  5496. * IF LABEL WAS SPECIFIED AND IS O.K.
  5497. * THEN,
  5498. * GENERATE NAMES FOR GROUP.
  5499. * IF ERRORS WERE DETECTED IN NAME GENERATION,
  5500. * THEN,
  5501. * SET LABEL ERROR FLAG.
  5502. * CLEAR LABEL POINTER.
  5503. * OTHERWISE,
  5504. * SAVE LABEL POINTER.
  5505. * OTHERWISE,
  5506. * FLAG ERROR -- NO PORT, NAME GENERATION SUPPRESSED.
  5507. * SET LABEL ERROR FLAG.
  5508. * CLEAR LABEL POINTER.
  5509. * OTHERWISE,
  5510. * IF NCIR IS GREATER THAN ZERO,
  5511. * THEN
  5512. * IF LABEL WAS SPECIFIED AND IS O.K.,
  5513. * GENERATE NAMES FOR CIRCUITS
  5514. * IF ERRORS DETECTED IN NAME GENERATION,
  5515. * THEN,
  5516. * SET LABEL ERROR FLAG.
  5517. * CLEAR LABEL POINTER.
  5518. * OTHERWISE,
  5519. * SAVE LABEL POINTER.
  5520. * OTHERWISE,
  5521. * IF LABEL WAS SPECIFIED AND IS O.K.,
  5522. * SEARCH LABEL TABLE FOR CURRENT LABEL.
  5523. * IF FOUND,
  5524. * THEN,
  5525. * FLAG ERROR -- DUPLICATE LABEL NAME.
  5526. * OTHERWISE,
  5527. * PUT LABEL INTO LABEL TABLE.
  5528. * SAVE LABEL POINTER.
  5529. * SELECT CASE THAT APPLIES,
  5530. * CASE 1(TERMINAL):
  5531. * WRITE TERMINAL STATEMENT ENTRY TO STATEMENT TABLE FILE.
  5532. * CASE 2(TERMDEV):
  5533. * WRITE TERMINAL STATEMENT ENTRY TO STATEMENT TABLE FILE.
  5534. * WRITE STATEMENT ENTRY BUFFER TO STATEMENT TABLE FILE.
  5535. * CASE 3(ALL OTHER STATEMENTS):
  5536. * WRITE STATEMENT ENTRY BUFFER TO STATEMENT TABLE FILE.
  5537. * IF CURRENT STATEMENT IS NOT TRUNK,
  5538. * SAVE CURRENT STATEMENT I.D.
  5539. * CLEAR KEYWORD ORDINAL TABLE.
  5540. * CLEAR VALUE DECLARATION PORTION FLAG.
  5541. *
  5542. #
  5543. *ENDIF
  5544. ITEM TLINE; # CURRENT LINE NUMBER #
  5545. ITEM TL$STID; # LAST STATEMENT-ID #
  5546. ARRAY TRPTINFO [0:0] S(1); # REPEAT INFORMATION #
  5547. BEGIN
  5548. ITEM TGRPFLG B(0,0,1); # GROUP FLAG #
  5549. ITEM TSVC B(0,1,1); # SVC FLAG #
  5550. ITEM TPRTNUM U(0,6,9); # PORT NUMBER #
  5551. ITEM TGRPCNT U(0,15,9); # GROUP COUNT #
  5552. ITEM TNCIR U(0,24,9); # CIRCUIT COUNT #
  5553. END
  5554. ARRAY TCSTMT [0:0] S(1); # CURRENT STATEMENT INFO #
  5555. BEGIN
  5556. ITEM TCSTID U(0,0,9); # STATEMENT-ID #
  5557. ITEM TCEFLG B(0,15,1); # LABEL ERROR FLAG #
  5558. ITEM TCLABL C(0,18,7); # LABEL-NAME #
  5559. END
  5560. # #
  5561. ITEM CTEMP C(10); # CHARACTER TERMPORARY #
  5562. ITEM FOUND B; # FOUND FLAG #
  5563. ITEM ITEMP; # INTEGER TEMPORARY #
  5564. ITEM TSTAT B; # STATUS RETURNED FROM NAMEGEN #
  5565. # #
  5566. SWITCH STRMJUMP EXIT, # NULL STATEMENT #
  5567. OTHERS, # NFILE #
  5568. OTHERS, # NPU #
  5569. OTHERS, # SUPLINK #
  5570. OTHERS, # COUPLER #
  5571. OTHERS, # LOGLINK #
  5572. OTHERS, # GROUP #
  5573. OTHERS, # LINE #
  5574. EXIT, # #
  5575. TERMINAL$, # TERMINAL #
  5576. OTHERS, # DEVICE #
  5577. OTHERS, # TRUNK #
  5578. OTHERS, # LFILE #
  5579. OTHERS, # USER #
  5580. OTHERS, # APPL #
  5581. OTHERS, # OUTCALL #
  5582. OTHERS, # INCALL #
  5583. NEXT, # END #
  5584. TERMDEV, # TERMDEV #
  5585. EXIT, # DEFINE #
  5586. EXIT, # COMMENT #
  5587. EXIT; # TITLE #
  5588. CONTROL EJECT;
  5589. # #
  5590. # CODE BEGINS HERE #
  5591. # #
  5592. IF TCSTID[0] EQ STID"GROUP" AND # NI PARAMETER WAS #
  5593. TGRPCNT[0] EQ 0
  5594. THEN # NOT SPECIFIED #
  5595. BEGIN
  5596. TGRPCNT[0] = 1; # DEFAULT IS ONE #
  5597. END
  5598. IF CRNT$TIP EQ "X25" OR # IF X25 LINE #
  5599. ((CRNT$LTYPE EQ "H1" OR CRNT$LTYPE EQ "H2") AND
  5600. C<0,3>CRNT$TIP EQ USER$TIP)
  5601. THEN
  5602. BEGIN
  5603. IF TCSTID[0] EQ STID"GROUP" # IF CRNT STMT IS -GROUP- #
  5604. THEN
  5605. BEGIN # CLEAR GROUP COUNT #
  5606. TGRPCNT[0] = 0; # FLAG ERROR - GROUP INVALID FOR X25 #
  5607. ERRMS1(ERR28,TLINE," ");
  5608. STLBERR[1] = TRUE; # SET LABEL ERROR FLAG #
  5609. STLBPNTR[1] = 0; # CLEAR LABEL POINTER #
  5610. END
  5611. ELSE # NOT A GROUP STMT #
  5612. BEGIN # IF CRNT STMT IS TERMINAL OR #
  5613. IF TCSTID[0] EQ STID"TRMNL" OR # TERMDEV #
  5614. TCSTID[0] EQ STID"TERMDEV"
  5615. THEN
  5616. BEGIN
  5617. IF TSVC[0] # IF CURRENT CIRCUIT IS -SVC- #
  5618. THEN
  5619. BEGIN
  5620. IF TNCIR[0] EQ 0 # IF CIRCUIT COUNT IS ZERO #
  5621. THEN
  5622. BEGIN
  5623. TNCIR[0] = 1; # DEFAULT COUNT TO ONE #
  5624. END
  5625. END
  5626. ELSE # NOT AN SVC CIRCUIT #
  5627. BEGIN
  5628. TNCIR[0] = 0; # CLEAR CIRCUIT COUNT #
  5629. END
  5630. END
  5631. END
  5632. END
  5633. ELSE # NOT AN X25 LINE #
  5634. BEGIN
  5635. TNCIR[0] = 0; # CLEAR CIRCUIT COUNT #
  5636. END
  5637. IF TGRPCNT[0] GR 0 # GROUP STMT WAS SPECIFIED #
  5638. THEN
  5639. BEGIN
  5640. IF TPRTNUM GR 0 # PORT WAS SPECIFIED OR IS O.K. #
  5641. THEN
  5642. BEGIN
  5643. IF NOT TCEFLG[0] AND TCLABL[0] NQ " "
  5644. THEN # NO LABEL ERROR AND A LABEL #
  5645. BEGIN # EXISTS #
  5646. ITEMP = LABLCNT[0] + 1; # SAVE LABEL TABLE POINTER #
  5647. CTEMP = TCLABL[0]; # PUT ROOT-NAME IN TEMPORARY #
  5648. NAMEGEN(CTEMP,TGRPCNT[0],TNCIR[0],TPRTNUM[0],TLINE,TSTAT);
  5649. # GENERATE GROUP/DEVICE NAMES #
  5650. IF NOT TSTAT # ERRORS WERE DETECTED IN NAME GENERATION #
  5651. THEN
  5652. BEGIN
  5653. STLBERR[1] = TRUE; # SET LABEL ERROR FLAG #
  5654. STLBPNTR[1] = 0; # CLEAR LABEL TABLE POINTER #
  5655. END
  5656. ELSE # NO ERRORS DETECTED #
  5657. BEGIN
  5658. STLBPNTR[1] = ITEMP; # SET LABEL TABLE POINTER #
  5659. END
  5660. END
  5661. END
  5662. ELSE # NO PORT NUMBER #
  5663. BEGIN
  5664. CTEMP = TCLABL[0];
  5665. ERRMS1(ERR32,TLINE,CTEMP); # FLAG ERROR #
  5666. STLBERR[1] = TRUE; # SET LABEL ERROR FLAG #
  5667. STLBPNTR[1] = 0; # CLEAR LABEL TABLE POINTER #
  5668. END
  5669. END
  5670. ELSE # NO GROUP STMT SPECIFIED #
  5671. BEGIN
  5672. IF TNCIR[0] GR 0 # NCIR VALUE WAS SPECIFIED #
  5673. THEN
  5674. BEGIN
  5675. IF NOT TCEFLG[0] AND TCLABL[0] NQ " "
  5676. THEN # NO LABEL ERROR AND A LABEL #
  5677. BEGIN # EXISTS #
  5678. ITEMP = LABLCNT[0] + 1; # SAVE LABEL TABLE POINTER #
  5679. CTEMP = TCLABL[0]; # PUT ROOT-NAME IN TEMPORARY #
  5680. FOR I = 4 STEP -1 WHILE C<I,1>CTEMP EQ " "
  5681. DO # CHARACTER ZERO-FILL NAME TO RIGHT #
  5682. BEGIN
  5683. C<I,1>CTEMP = "0";
  5684. END
  5685. STLABEL[1] = CTEMP; # REPLACE NEW NAME IN TABLE #
  5686. NAMEGEN(CTEMP,TGRPCNT[0],TNCIR[0],TPRTNUM[0],TLINE,TSTAT);
  5687. # GENERATE GROUP/REPEAT NAMES #
  5688. IF NOT TSTAT # ERRORS DETECTED IN NAME GENERATION #
  5689. THEN
  5690. BEGIN
  5691. STLBERR[1] = TRUE; # SET LABEL ERROR FLAG #
  5692. STLBPNTR[1] = 0; # CLEAR LABEL TABLE POINTER #
  5693. END
  5694. ELSE
  5695. BEGIN
  5696. STLBPNTR[1] = ITEMP; # SET LABEL TABLE POINTER #
  5697. END
  5698. END
  5699. END
  5700. ELSE # JUST ENTER LABEL INTO LABEL-TABLE #
  5701. BEGIN
  5702. IF NOT TCEFLG[0] # IF LABEL IS O.K. #
  5703. THEN
  5704. BEGIN
  5705. IF TCLABL[0] NQ BLANK # IF LABEL IS NOT BLANK #
  5706. THEN
  5707. BEGIN
  5708. FOUND = FALSE; # CLEAR FOUND FLAG #
  5709. FOR I=1 STEP 1 WHILE NOT FOUND AND I LQ LABLCNT[0]
  5710. DO
  5711. BEGIN # SEARCH FOR LABEL IN LABEL-TABLE #
  5712. IF TCLABL[0] EQ LABLNAM[I]
  5713. THEN
  5714. BEGIN # IF LABEL IS FOUND AND NOT A PID STMT #
  5715. TCEFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  5716. FOUND = TRUE; # SET FOUND FLAG #
  5717. # FLAG ERROR -- DUPLICATE LABEL #
  5718. ERRMS1(ERR1,TLINE,TCLABL[0]);
  5719. END
  5720. END
  5721. IF NOT FOUND # IF NOT A DUPLICATE LABEL #
  5722. THEN
  5723. BEGIN
  5724. IF LABLCNT[0] GQ LT$LENG - 1 # NEED MORE TABLE SPACE #
  5725. THEN
  5726. BEGIN
  5727. SSTATS(P<LABEL$TABLE>,500);
  5728. END
  5729. LABLCNT[0] = LABLCNT[0] + 1; # INCREMENT LABEL COUNT #
  5730. LABEL$WORD[LABLCNT[0]] = 0; # CLEAR ENTRY #
  5731. LABLNAM[LABLCNT[0]] = TCLABL[0]; # PUT LABEL INTO TABLE#
  5732. STLBPNTR[1] = LABLCNT[0]; # SAVE LABEL POINTER #
  5733. END
  5734. END
  5735. END
  5736. END
  5737. END
  5738. # #
  5739. GOTO STRMJUMP[TCSTID[0]]; # WRITE BUFF TO STMT TABLE FILE #
  5740. # #
  5741. TERMINAL$:
  5742. ITEMP = TBWC[0] + 1; # ENTRY WORD COUNT PLUS HEADER #
  5743. WRITEW(STFET,TERM$BUFFER,ITEMP); # WRITE TERMINAL BUFFER TO FILE #
  5744. GOTO NEXT;
  5745. # #
  5746. TERMDEV:
  5747. ITEMP = TBWC[0] + 1; # CALCULATE WORD COUNT #
  5748. WRITEW(STFET,TERM$BUFFER,ITEMP); # WRITE TEMINAL BUFFER TO FILE #
  5749. OTHERS:
  5750. ITEMP = STWC[0] + 1; # ENTRY WORD COUNT PLUS HEADER #
  5751. WRITEW(STFET,STMT$TABLE,ITEMP); # WRITE STMT$TABL BUFFER TO FILE#
  5752. GOTO NEXT;
  5753. # #
  5754. NEXT:
  5755. IF TCSTID[0] NQ STID"TRUNK" # IF CURRENT STMT IS NOT -TRUNK-#
  5756. THEN
  5757. BEGIN
  5758. TL$STID = TCSTID; # SAVE THE CURRENT STMT I.D. #
  5759. END
  5760. IF TCSTID[0] EQ STID"DEVICE" OR
  5761. TCSTID[0] EQ STID"TERMDEV"
  5762. THEN # IF CRNT STMT IS DEVICE OR TERMDEV #
  5763. BEGIN
  5764. IF STORD1[2] EQ 0
  5765. THEN # IF -DT- WAS NOT SPECIFIED #
  5766. BEGIN # ASSUME A DEFAULT OF CONSOLE #
  5767. B<CMAP$B,1>CMWORD[CMAP$W] = 1; # SET FLAG #
  5768. END
  5769. ELSE # -DT- WAS SPECIFED #
  5770. BEGIN
  5771. IF STVALNAM[STORD1[2]] EQ "CON" OR
  5772. STVALNAM[STORD1[2]] EQ "DT7" OR
  5773. STVALNAM[STORD1[2]] EQ "AP"
  5774. THEN # IF -DT- VALUE IS CONSOLE #
  5775. BEGIN
  5776. B<CMAP$B,1>CMWORD[CMAP$W] = 1;# SET FLAG #
  5777. END
  5778. ELSE
  5779. BEGIN
  5780. # DT IS NOT CON #
  5781. IF B<CMAP$B,1>CMWORD[CMAP$W] EQ 0#IF NO CONSOLE DEFINED YET#
  5782. THEN
  5783. BEGIN
  5784. ERRMS1(ERR41,TLINE,STVALNAM[STORD1[2]]);
  5785. END
  5786. END
  5787. END
  5788. END
  5789. FOR ITEMP = 0 STEP 1 UNTIL MXKYWD DO
  5790. BEGIN
  5791. KYWD$ORD[ITEMP] = 0; # CLEAR ORDINAL TABLE #
  5792. END
  5793. EXIT:
  5794. VAL$DEC = FALSE; # NO LONGER VALUE-DEC PORTION - CLEAR FLAG#
  5795. RETURN; # **** RETURN **** #
  5796. END # STERM #
  5797. CONTROL EJECT;
  5798. PROC STITLE(STTLINE);
  5799. BEGIN
  5800. *IF,DEF,IMS
  5801. #
  5802. ** STITLE - STORE TITLE.
  5803. *
  5804. * D.K. ENDO 81/10/29
  5805. *
  5806. * THIS PROCEDURE TITLE TEXT FOR FILE HEADER RECORD
  5807. *
  5808. * PROC STITLE(STTLINE)
  5809. *
  5810. * ENTRY STTLINE = SOURCE LINE NUMBER.
  5811. *
  5812. * EXIT NONE.
  5813. *
  5814. * METHOD
  5815. *
  5816. * IF TITLE WAS SPECIFIED ALREADY,
  5817. * FLAG ERROR -- PREVIOUS TITLE OVER-WRITTEN.
  5818. * IF CURRENT CHARACTER IS NOT A PERIOD,
  5819. * THEN,
  5820. * IF CURRENT CHARACTER IS A COMMA,
  5821. * SKIP TO NEXT CHARACTER.
  5822. * FOR EACH CHARACTER UNTIL PERIOD OR 45 CHARACTERS
  5823. * PUT CHARACTER IN THE TITLE STRING
  5824. * IF PERIOD NOT FOUND,
  5825. * THEN,
  5826. * FLAG ERROR -- STORED ONLY 1ST 45 CHARACTERS
  5827. * OTHERWISE,
  5828. * GET TOKEN FOR NEXT LINE.
  5829. * OTHERWISE,
  5830. * GET TOKEN FOR NEXT LINE.
  5831. *
  5832. #
  5833. *ENDIF
  5834. ITEM STTLINE; # LINE NUMBER OF TITLE STATEMENT #
  5835. # #
  5836. ITEM FOUND B; # FLAG SET IF PERIOD IS FOUND #
  5837. ITEM I; # SCRATCH ITEM #
  5838. CONTROL EJECT;
  5839. # #
  5840. # CODE BEGINS HERE #
  5841. # #
  5842. TITLE$WORD[0] = " "; # CLEAR TEXT FOR TITLE #
  5843. IF TITLE$FLAG # IF TITLE WAS SPECIFIED ALREADY #
  5844. THEN
  5845. BEGIN
  5846. ERRMS1(ERR33,STTLINE,BLANK); # FLAG ERROR -- THIS TITLE OVER-#
  5847. END # RIDES PREVIOUS ONE #
  5848. ELSE # TITLE NOT SPECIFIED YET #
  5849. BEGIN
  5850. TITLE$FLAG = TRUE; # SET TITLE FLAG #
  5851. END
  5852. IF CURSTAT EQ STAT"BLANK" # IF CURRENT CHARACTER IS BLANK,#
  5853. THEN # SCAN TO 1ST NON-BLANK #
  5854. BEGIN
  5855. FOR I=0 WHILE CURSTAT EQ STAT"BLANK" DO
  5856. BEGIN
  5857. GETSCHAR(CURCHAR,LINE,CURSTAT);
  5858. END
  5859. END
  5860. IF CURSTAT NQ STAT"PER" # IF CURRENT CHARACTER IS NOT #
  5861. THEN # A PERIOD, STORE TEXT #
  5862. BEGIN
  5863. IF CURCHAR EQ "," # IF FIRST NON-BLANK IS A COMMA,#
  5864. THEN # IGNORE IT #
  5865. BEGIN
  5866. GETSCHAR(CURCHAR,LINE,CURSTAT);
  5867. END
  5868. FOUND = FALSE; # CLEAR PERIOD FOUND FLAG #
  5869. FOR I=0 STEP 1 WHILE I LS 45 AND NOT FOUND DO
  5870. BEGIN # STORE TITLE TEXT TILL PERIOD #
  5871. IF CURSTAT EQ STAT"PER" # OR FIRST 45 CHARACTERS #
  5872. THEN # IF CURRENT CHAR IS A PERIOD, #
  5873. BEGIN
  5874. FOUND = TRUE; # SET PERIOD FOUND FLAG #
  5875. END
  5876. ELSE # NON-PERIOD #
  5877. BEGIN
  5878. C<I,1>TITLE$WORD[0] = CURCHAR; # STORE CHARACTER #
  5879. GETSCHAR(CURCHAR,LINE,CURSTAT); # GET NEXT CHARACTER #
  5880. END
  5881. END
  5882. IF NOT FOUND AND CURCHAR NQ "."
  5883. THEN # IF NO PERIOD FOUND YET #
  5884. BEGIN
  5885. ERRMS1(ERR34,LINE,BLANK); # FLAG ERROR -- STORED ONLY 1ST #
  5886. SCNTOPRD; # 45 CHARACTERS #
  5887. END
  5888. ELSE # PERIOD WAS FOUND #
  5889. BEGIN
  5890. LEXSCAN; # PUT PERIOD IN NEXWORD #
  5891. LEXSCAN; # EXECUTES LINE TERMINATION PROCEDURES #
  5892. END # FORMS 1ST ELEMENT ON NEXT LINE #
  5893. END
  5894. ELSE # NO TEXT FOR TITLE #
  5895. BEGIN
  5896. COL = COL + 1; # SKIP SCAN OF PERIOD #
  5897. GETSCHAR(CURCHAR,LINE,CURSTAT);
  5898. LEXSCAN; # PUT PERIOD IN NEXWORD #
  5899. # EXECUTES LINE TERMINALTION PROCEDURES #
  5900. END # FORMS 1ST ELEMENT ON NEXT LINE #
  5901. RETURN; # **** RETURN **** #
  5902. END # STITLE #
  5903. CONTROL EJECT;
  5904. # SSSSSS U U BBBBBBB RRRRRRR #
  5905. # S S U U B B R R #
  5906. # S U U B B R R #
  5907. # S U U B B R R #
  5908. # SSSSS U U BBBBBBB RRRRRRR #
  5909. # S U U B B R R #
  5910. # S U U B B R R #
  5911. # S S U U B B R R #
  5912. # SSSSSS UUUUU BBBBBBB R R #
  5913. # #
  5914. CKCMNT:
  5915. IF B<51,9>NEXLXID EQ STID"COMMENT"
  5916. THEN
  5917. STDYES;
  5918. ELSE
  5919. STDNO;
  5920. CKLBNM:
  5921. CTEMP = CURWORD[0];
  5922. CKLNAME(CTEMP,CURTYPE,CURLXID,CURLENG,KWDFLAG,NEXWORD[0],
  5923. CURLINE,CKSTAT);
  5924. CURLABL[0] = CTEMP; # SAVE STATEMENT LABEL #
  5925. CURKLBL[0] = KWDFLAG; # SET IF LABEL IS KEYWORD #
  5926. IF CKSTAT # IF THE LABEL IS O.K. #
  5927. THEN
  5928. CUREFLG[0] = FALSE; # CLEAR LABEL ERROR FLAG #
  5929. ELSE # LABEL IS NOT O.K. #
  5930. CUREFLG[0] = TRUE; # SET LABEL ERROR FLAG #
  5931. STDNO; # RETURN TO STD WITH STDFLAG=NO #
  5932. CKSTDEC:
  5933. CKSTMTDEC(CURSTMT,CURWORD[0],CURLXID,CURMAP,
  5934. RPTINFO,CURLINE,LAST$STID,CKSTAT);
  5935. IF CKSTAT
  5936. THEN
  5937. BEGIN
  5938. CURSTID[0] = B<54,6>CURLXID; # SAVE STMT-ID OF CURRENT STMT #
  5939. STDYES; # RETURN TO STD WITH -YES- #
  5940. END
  5941. ELSE
  5942. STDNO; # RETURN TO STD WITH STDFLAG = NO #
  5943. SCNTOPD:
  5944. SCNTOPRD;
  5945. STDNO;
  5946. CKDELIM:
  5947. IF B<50,1>NEXLXID EQ 1
  5948. THEN # DELIMITER FLAG IS SET #
  5949. STDYES; # RETURN STATUS OF -YES- #
  5950. ELSE # NEXWORD IS NOT A DELIMITER #
  5951. STDNO; # RETURN STATUS OF -NO- #
  5952. CKDEFNM:
  5953. IF NEXTYPE EQ TYPENAM # IF NEXWORD IS A NAME #
  5954. THEN
  5955. BEGIN # CHECK IF IT IS A DEFINE-NAME #
  5956. CKDEFNAM(NEXWORD[0],DEFFLAG,NEXLENG,NEXLINE,CKSTAT);
  5957. IF CKSTAT # NEXWORD WAS A DEFINE NAME #
  5958. THEN
  5959. STDYES; # RETURN STATUS OF -YES- #
  5960. ELSE # NEXWORD IS NOT A DEFINE NAME #
  5961. STDNO; # RETURN STATUS OF -NO- #
  5962. END
  5963. ELSE # NEXWORD IS NOT A NAME #
  5964. STDNO;
  5965. CKKYWD:
  5966. CKKWD(CURWORD[0],CURSTMT,NEXWORD[0],CURLXID,
  5967. CURMAP,RPTINFO,CURLINE,CKSTAT);
  5968. IF CKSTAT
  5969. THEN
  5970. BEGIN
  5971. KWID = B<51,9>CURLXID; # SAVE KEYWORD-ID #
  5972. STDYES; # RETURN TO STD WITH STDFLAG = YES #
  5973. END
  5974. ELSE
  5975. STDNO; # RETURN TO STD WITH STDFLAG = NO #
  5976. CKVALDC:
  5977. PERIOD$SKIP = FALSE;
  5978. CKVDEC(KWID,CWORD,CURLENG,CURLINE,CURSTMT,RPTINFO);
  5979. STDNO;
  5980. STORDEF:
  5981. SDEFINE(CURSTMT);
  5982. STDNO;
  5983. STORTITLE:
  5984. STITLE(NEXLINE);
  5985. STDNO;
  5986. STMTTRM:
  5987. RINFOWORD = RPTINFO$WORD[0]; # SAVE REPEAT INFORMATION #
  5988. IF CURSTID[0] EQ STID"TRUNK"
  5989. THEN
  5990. BEGIN
  5991. RPTINFO$WORD[0] = 0; # CLEAR REPEAT INFORMATION #
  5992. END
  5993. STERM(RPTINFO,CURLINE,CURSTMT,LAST$STID);
  5994. RPTINFO$WORD[0] = RINFOWORD; # RESTORE REPEAT INFORMATION #
  5995. STDNO;
  5996. PSS1TRM:
  5997. PS1TERM(CURSTMT,NEXWORD[0],CURLINE,EOFFLAG);
  5998. STD$RET; # **** RETURN ***** TO PASS 1 #
  5999. END # SUBR #
  6000. CONTROL EJECT;
  6001. # PASS1 CODE BEGINS HERE #
  6002. # #
  6003. LBLPNTR = LOC(LBLPTRS); # SAVE LOCATION OF LBLPTRS TABLE#
  6004. SWITCHV = LOC(SUBRJUMP);
  6005. SYNTBL = LOC(SYNTBLE); # SAVE LOCATION OF SYNTAX TABLE #
  6006. TRACE = LOC(TRACEM); # SAVE LOCATION OF TRACE TABLE #
  6007. NDLDIAG = LOC(DIAG); # SAVE LOCATION OF DIAG #
  6008. P<LEXICN> = LOC(LEXICON); # SET ARRAY TO LEXICON #
  6009. P<LXWRDS> = LOC(LEXWORD); # SET ARRAY TO LEXWORD #
  6010. P<INPTEMPLET> = LOC(INPLINE[0]); # POINT TO BUFFER FOR READH #
  6011. COL = 0; # INITIALIZE COLUMN COUNT #
  6012. DEFCOL = 20; # INITIALIZE ESIBUFF COLUMN POINTER #
  6013. LABLCNT[0] = 0; # INITIALIZE LABEL COUNT #
  6014. LCFDIV = FALSE; # INITIALIZE LCF DIVISION FLAG #
  6015. LINE = 1; # INITIALIZE SOURCE LINE COUNT #
  6016. LINECTR = 1; # INITIALIZE TOTAL LINE COUNT #
  6017. LINELMT = 100000; # LINITIALIZE TOTAL LINE COUNT LIMIT #
  6018. PERIOD$SKIP = FALSE; # INITIALIZE PERIOD SKIP TO FALSE #
  6019. NCFDIV = FALSE; # CLEAR NCF DIVISION FLAG #
  6020. ENDFLAG = FALSE; # INITIALIZE END FLAG TO NOT DETECTED #
  6021. EOFFLAG = FALSE; # INITIALIZE EOF FLAG #
  6022. ERRCNT = 0; # CLEAR FATAL ERROR COUNT #
  6023. ESIBUFF[0] = " "; # CLEAR ESI BUFFER #
  6024. FIRST$STMT = TRUE; # INITIAL FIRST STMT FLAG #
  6025. INPWRD1 = " "; # CLEAR WORD 1 OF INPUT BUFFER #
  6026. INPWRD2 = " "; # CLEAR WORD 2 OF INPUT BUFFER #
  6027. INPLNUM = " 1"; # INITIALIZE LINE NUMBER ON SOURCE LINE #
  6028. ESILINE[0] = INPLNUM[0]; # DO SAME FOR ESI BUFFER #
  6029. DEFFLAG = FALSE; # INITIALIZE DEFINE FLAG #
  6030. SCN$TO$END = FALSE; # INITIALIZE IGNORE DIVISION FLAG #
  6031. TITLE$FLAG = FALSE; # CLEAR TITLE SPECIFIED FLAG #
  6032. TITLE$WORD[0] = " "; # CLEAR TITLE TEXT #
  6033. VAL$DEC = FALSE; # CLEAR VALUE-DEC FLAG #
  6034. WARNCNT = 0; # CLEAR WARNING ERROR COUNT #
  6035. P<CHARSET> = 55; # SET ARRAY TO CHARACTER SET INDICATOR #
  6036. FOR I=0 STEP 1 UNTIL LT$LENG - 1 DO
  6037. BEGIN # CLEAR DEFINE TABLE #
  6038. DTWORD[I] = 0;
  6039. END
  6040. FOR I=0 STEP 1 UNTIL MXKYWD DO
  6041. BEGIN
  6042. KYWD$ORD[I] = 0; # CLEAR ORDINAL TABLE #
  6043. END
  6044. IF FIRSTDIV
  6045. THEN
  6046. BEGIN
  6047. READH(INFET,INPTEMPLET,9,CURSTAT); # READ IN FIRST LINE #
  6048. IF CURSTAT NQ TRNS$OK # NO TEXT IN FILE OR NO FILE #
  6049. THEN
  6050. BEGIN
  6051. MESSAGE(EMPTY$FILE,0); # ISSUE DAYFILE MSG, EMPTY FILE #
  6052. ABORT; # ABORT JOB #
  6053. END
  6054. END
  6055. GETSCHAR(CURCHAR,LINE,CURSTAT); # GET FIRST CHARACTER #
  6056. REWIND(STFET); # REWIND STATEMENT TABLE FILE #
  6057. RECALL(STFET);
  6058. REWIND(ERR1FET); # REWIND PASS 1 ERROR FILE #
  6059. RECALL(ERR1FET);
  6060. REWIND(SECFET); # REWIND SECONDARY INPUT FILE #
  6061. RECALL(SECFET);
  6062. REWIND(ESIFET); # REWIND EXPANDED SECONDARY INPUT FILE #
  6063. RECALL(ESIFET);
  6064. LEXSCAN; # GET FIRST WORD #
  6065. STD$START; # TRANSFER CONTROL TO SYNTAX TABLE DRIVER #
  6066. RETURN; # **** RETURN **** TO MAIN #
  6067. END # NDLPSS1 #
  6068. TERM
cdc/nos2.source/nam5871/ndlpss1.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator