User Tools

Site Tools


cdc:nos2.source:nam5871:dlscan

DLSCAN

Table Of Contents

  • [00021] PROC DLSCAN
  • [00122] PROC DLABEND
  • [00123] PROC DLDIS
  • [00124] PROC DLDISDE
  • [00125] PROC DLDISO
  • [00126] PROC DLABH
  • [00127] PROC DLAREP
  • [00128] PROC DLDFM
  • [00129] PROC DLFLUSH
  • [00130] PROC DLINT
  • [00131] PROC DLMSG
  • [00132] PROC DLNBH
  • [00133] PROC DLNREP
  • [00134] PROC DLSM
  • [00135] PROC DLRECL
  • [00136] PROC DLRDW
  • [00137] PROC DLUPTM
  • [00138] PROC DLWRITC
  • [00139] PROC DLWRT

Source Code

DLSCAN.txt
  1. *DECK DLSCAN
  2. USETEXT DLFPDEF
  3. USETEXT ABH
  4. USETEXT DIRTBL
  5. USETEXT DIRTBLH
  6. USETEXT DIRTBLM
  7. USETEXT DIRTBLS
  8. USETEXT DLONEL
  9. USETEXT DLNOD
  10. USETEXT DLTLC
  11. USETEXT DRHDR
  12. USETEXT ERRMSG
  13. USETEXT MISRES
  14. USETEXT NHEADER
  15. USETEXT OCIOBB
  16. USETEXT OFETB
  17. USETEXT OUTCDA
  18. USETEXT WRDPAIR
  19. USETEXT ZFETB
  20. USETEXT ZHRCD
  21. PROC DLSCAN; # SCAN DEBUG LOG FILE #
  22. *IF DEF,IMS
  23. #
  24. *1DC DLSCAN
  25. *
  26. * 1. PROC NAME AUTHOR DATE.
  27. * DLSCAN S.KRULEVITCH 79/01/08
  28. *
  29. * 2. FUNCTIONAL DESCRIPTION.
  30. * SCAN DEBUG LOG FILE FOR SPECIFIED MESSAGES.
  31. *
  32. * 3. METHOD USED.
  33. * LOOP EXECUTING AS FOLLOWS UNTIL THE COMPLETE FLAG IS SET.
  34. *
  35. * READ FIRST 3 WORDS IF NIP LOG FILE, FIRST 2 WORDS IF AIP
  36. * LOG FILE. CALL DLDFM, SET COMPLETE FLAG, AND TEST LOOP
  37. * IF A READ ERROR OR EOF/EOI IS ENCOUNTERED.
  38. * UPDATE CURRENT MESSAGE NUMBER REFLECTING ACTUAL NUMBER
  39. * OF MESSAGES ON ZZZZZDN FILE.
  40. * CHECK TIME OF CURRENT MESSAGE TO SEE IF IT IS PAST
  41. * MIDNIGHT. IF SO, COMPUTE NEW MIDNIGHT RT VALUE, AND
  42. * UPDATE DATE RECORDED.
  43. * SET CHOSEN FLAG.
  44. * CALL DLMSG TO PROCESS ENTRIES IN MESSAGE PROCESSING TABLE.
  45. * IF AIP LOG FILE, DETERMINE IF GET OR PUT CALL. IF NOT, AND
  46. * ABH/NBH PROCESSING TABLE OR SUPMSG PROCESSING TABLES
  47. * ARE NOT EMPTY, CLEAR CHOSEN FLAG. IF NETON CALL, READ
  48. * UP REST OF ENTRY.
  49. * READ ABH WORD. (CALL DLDFM, SET COMPLETE FLAG, AND TEST LOOP
  50. * IF A READ ERROR IS ENCOUNTERED.)
  51. * IF CHOSEN FLAG STILL SET AND ENTRIES EXIST IN ABH/DBC
  52. * PROCESSING TABLE:
  53. * IF AIP LOG FILE, CALL DLABH TO PROCESS ENTRIES IN
  54. * ABH/NBH PROCESSING TABLE.
  55. * IF NIP LOG FILE, CALL DLNBH TO PROCESS ENTRIES IN
  56. * ABH/NBH PROCESSING TABLE.
  57. * IF TEXT EXISTS, READ IT. (CALL DLDFM, SET COMPLETE FLAG, AND
  58. * TEST LOOP CONDITION IF A READ ERROR IS ENCOUNTERED.)
  59. * IF CHOSEN FLAG STILL SET, CALL DLSM TO PROCESS
  60. * ENTRIES IS THE SUPMSG PROCESSING TABLE.
  61. * IF TEXT DOES NOT EXIST, AND ENTRIES EXIST IN SUPMSG
  62. * PROCESSING TABLE, CLEAR CHOSEN FLAG.
  63. * IF CHOSEN FLAG STILL SET, CHECK IF SM COUNT IS NONZERO.
  64. * IF SM COUNT IS NONZERO, DECREMENT IT AND CLEAR CHOSEN
  65. * FLAG.
  66. * IF SM COUNT IS ZERO, OUTPUT TIME,CALL DLAREP(IF AIP LOG FILE)
  67. * OR DLNREP (IF NIP LOG FILE) TO FORMAT AND WRITE DEBUG
  68. * LOG FILE ENTRY TO OUTPUT. ALSO INCREMENT COUNTER OF
  69. * NUMBER OF ENTRIES WRITTEN TO OUTPUT.
  70. * TRUNCATE TEXT LENGTH IF NECESSARY.
  71. * IF NETGETF, NETGTFL, OR NETPUTF, SET UP FRAGMENT SIZE
  72. * HEADING.
  73. * OUTPUT TEXT.
  74. * IF (EOF) IS ENCOUNTERED SET EOFFLAG TO TRUE AND
  75. * INITIALIZE FILE FOR READ.
  76. *
  77. * 4. ENTRY PARAMETERS.
  78. * COMPLETE =FALSE TO CONTINUE SEARCH
  79. *
  80. * 5. EXIT PARAMETERS.
  81. * NONE.
  82. *
  83. * ARGTBL NCIOBB NFETB
  84. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  85. * DIRTBL DIRTBLH DIRTBLM DIRTBLS
  86. * DLFPDEF DLONEL DLNOD DLTLC
  87. * DRHDR ERRMSG MISRES NHEADER
  88. * NP$DLA NP$TAA
  89. * OCIOBB OFETB OUTCDA WRDPAIR
  90. * ZFETB ZHRCD
  91. *
  92. * 7. PROCEDURES CALLED.
  93. * DLABEND ABORT PROGRAM
  94. * DLDIS CONVERT FIELD TO HEX, OCTAL, DISPLAY, ASCII
  95. * DLDISDE CONVERT FIELD FROM BINARY TO DECIMAL D C
  96. * DLDISO CONVERT FIELD TO OCTAL DISPLAY
  97. * DLABH PROCESS AIP ABH DIRECTIVE TABLE
  98. * DLAREP AIP DEBUG LOG FILE HEADERS
  99. * DLDFM DAYFILE MESSAGE PROCESSOR
  100. * DLFLUSH WRITE EOR ON FILE
  101. * DLINT INITIALIZE READING ON FILE
  102. * DLMSG PROCESS MESSAGE DIRECTIVE TABLE
  103. * DLNBH PROCESS NIP NBH DIRECTIVE TABLE
  104. * DLNREP NIP DEBUG LOG FILE HEADERS
  105. * DLRECL RECALL ON EVENT
  106. * DLSM PROCESS SUPERVISORY DIRECTIVE TABLE
  107. * DLRDW READ A SPECIFIED NO OF WORDS FROM FILE
  108. * DLUPTM CALCULATE THE CLOCK TIME FROM OFFSET
  109. * DLWRITC TRANSFER LINE TO CIO BUFFER
  110. *
  111. * 8. DAYFILE MESSAGES.
  112. * *BAD FILE CONTENT*
  113. *
  114.  #
  115. *ENDIF
  116.  
  117. #
  118.   EXTERNAL VARIABLES
  119. #
  120. XREF
  121. BEGIN
  122. PROC DLABEND; # ABORT MAIN PROGRAM #
  123. PROC DLDIS; # CONVERT TO HEX, OCTAL, DISPLAY, ASCII #
  124. PROC DLDISDE; # CONVERT FIELD TO DECIMAL DISPLAY #
  125. PROC DLDISO; # CONVERT FIELD TO OCTAL DISPLAY #
  126. PROC DLABH; # PROCESS AIP ABH DIRECTIVE TABLE #
  127. PROC DLAREP; # AIP DEBUG LOG FILE HEADERS #
  128. PROC DLDFM; # DAYFILE MESSAGE PROCESSOR #
  129. PROC DLFLUSH; # WIRTE EOR ON FILE #
  130. PROC DLINT; # INITIALIZE READING OF FILE #
  131. PROC DLMSG; # PROCESS MESSAGE DIRECTIVE TABLE #
  132. PROC DLNBH; # PROCESS NIP NBH DIRECTVE TABLE #
  133. PROC DLNREP; # NIP DEBUG LOG FILE HEADERS #
  134. PROC DLSM; # PROCESS SUPERVISORY MESSAGE TABLE #
  135. PROC DLRECL; # RECALL ON EVENT #
  136. PROC DLRDW; # READ RECORD FROM CIO BUFFER #
  137. PROC DLUPTM; # CALCULATE CLOCK TIME #
  138. PROC DLWRITC; # WRITE LINE TO CIO BUFFER #
  139. PROC DLWRT; # DIRECT WRITE TO CIO BUFFER #
  140. END
  141.  
  142. XREF
  143. BEGIN
  144. ARRAY PSTAB [0:0] S(2);
  145. ITEM PSNAME C(0,0,7),# NEMONIC IN DISPLAY CODE #
  146. PSVALUE I(1); # VALUE OF THE PFC/SFC NEMONIC #
  147. ITEM PSSIZE; # SIZE OF THE PFC/SFC NEMONIC TABLE #
  148. END
  149.  
  150. #
  151.   COMMON VARIABLES
  152. #
  153. CONTROL NOLIST; # SEE DLFP FOR LISTING OF ARGTBL #
  154. *CALL ARGTBL
  155. CONTROL LIST;
  156. CONTROL NOLIST; # SEE DLFP FOR LISTING OF NCIOBB #
  157. *CALL NCIOBB
  158. CONTROL LIST;
  159. CONTROL NOLIST; # SEE DLFP FOR LISTING OF NFETB #
  160. *CALL NFETB
  161. CONTROL LIST;
  162. LABEL EXIT ;
  163. BASED ARRAY DATLINE P(4);
  164. *CALL NP$DLA
  165. *CALL NP$TAA
  166. #
  167.   LOCAL VARIABLES
  168. #
  169.  
  170. ITEM
  171. I, # TEMPORARY INDEX VARIABLE #
  172. J I, # TRACKS TAA LOCATIONS #
  173. K I, # TEMPORARY LOOP #
  174. LNCNTR, # LINE COUNT FOR TEXT #
  175. MSG$LEN I, # MESSAGE LENGTH #
  176. N I, # TRACKS FRAGMENT/MESSAGE SIZE #
  177. RSIZE I, # READ IN DATA SIZE #
  178. RETWDH C(15), # HEX DISPLAY LITERAL #
  179. RETWDO C(20), # OCTAL DISPLAY LITERAL #
  180. RETWDD C(WC), # DISPLAY CODE LITERAL #
  181. RETWDA C(8), # ASCII DISPLAY CODE LITERAL #
  182. SHORT B=FALSE, # SHORT AIP ENTRY #
  183. YY, # YEAR TEMPORARY VARIABLE #
  184. MM, # MONTH TEMPORARY VARIABLE #
  185. DD, # DAY TEMPORARY VARIABLE #
  186. ENTRSZ, # SIZE OF ENTRY HEADER #
  187. RCDHR, # WORD TO HOLD TIME FOR RECORD HEADER #
  188. IA, # TEMP VARIABLE FOR BINARY S #
  189. IB, # TEMP VARIABLE FOR BINARY S #
  190. IC, # TEMP VARIABLE FOR BINARY S #
  191. ILOG,
  192. FOUND B, # TEMP VAR FOR BINARY SE #
  193. TEMP1 C(WC), # TEMPORARY VARIABLE #
  194. TEMP2 I, # TEMPORARY VARIABLE #
  195. TLWDIF I; # REMAINING WORDS IN FRAGMENT #
  196. ARRAY TEMP3A S(1) ;
  197. BEGIN
  198. ITEM TEMP3 I(00,00,60) ;
  199. ITEM TEMP3PFC U(00,44,08) ;
  200. ITEM TEMP3SFC U(00,52,08) ;
  201. END
  202.  
  203. ARRAY TEMP4A S(1) ;
  204. BEGIN
  205. ITEM TEMP4 I(00,00,60) ;
  206. ITEM TEMP4PFC U(00,04,08) ;
  207. ITEM TEMP4SFC U(00,16,08) ;
  208. END
  209.  
  210.  
  211. ARRAY FRAGLN P(6); # CHARACTER ARRAY FOR FRAGMENT HEADER #
  212. BEGIN
  213. ITEM FH$CC C(0, 0, 1);
  214. ITEM FH$FMT1 C(0, 0,10) = [" FRAGMENT "];
  215. ITEM FH$NUM C(1, 0, 3);
  216. ITEM FH$FMT2 C(1, 0,10) = [" SIZE"];
  217. ITEM FH$SZEQ C(2, 0, 2);
  218. ITEM FH$SIZE C(2,12,8);
  219. ITEM FH$FMT3 C(3, 0,10) = ["ADDRESS = "];
  220. ITEM FH$ADDR C(4, 0,10);
  221. ITEM FH$FMT4 I(5, 0,WL) = [0];
  222. END
  223.  
  224. ARRAY L4 S(2);
  225. BEGIN
  226. ITEM L4FIL1 C(0,0,1) =[" "];
  227. ITEM L4CLTM C(0,6,8);
  228. ITEM L4DOT3 C(0,54,1) =["."];
  229. ITEM L4MILS C(1,0,3);
  230. ITEM L4FIL2 C(1,18,7) =[" "];
  231. END # L4 TIME #
  232.  
  233. ARRAY L6 S(7);
  234. BEGIN
  235. ITEM L6FIL1 C(0,0, 6) =[" "];
  236. ITEM L6LNO C(0,36,3);
  237. ITEM L6FIL2 C(0,54,1) =[" "];
  238. ITEM L6HEX C(1, 0,15);
  239. ITEM L6FIL3 C(2,30,1) =[" "];
  240. ITEM L6OCT C(2,36,20);
  241. ITEM L6FIL4 C(4,36,2) =[" "];
  242. ITEM L6DIS C(4,48,10);
  243. ITEM L6FIL5 C(5,48,2) =[" "];
  244. ITEM L6ASCI C(6,0,8);
  245. ITEM L6ZERO U(6,48,12) =[0];
  246. END # TEXT ARRAY #
  247.  
  248. # THE MAXIMUM LENGTH MESSAGE IS A MESSAGE OF LENGTH TLWMAX #
  249. # IF THE MESSAGE HAS BEEN FRAGMENTED, THE MESSAGE LENGTH MAY BE #
  250. # INCREASED BY A MAXIMUM OF MAXNA FRAGMENT SIZE/ADDRESS #
  251. # DEFINITION WORDS INCLUDED WITH THE MESSAGE. #
  252. # THE SIZE OF TEMPB2+TEMPTAA = TLWMAX+MAXNA #
  253.  
  254. ARRAY TEMPB2[0:TLWMAX];# AREA FOR MESSAGE TEXT FROM DEBUG LOG #
  255. BEGIN
  256. ITEM TEMPE2 U(0,0,WL);
  257. ITEM TEMPFC U(0,0,16);
  258. END
  259.  
  260. ARRAY TEMPTAA[2:MAXNA];;# RESERVE AREA FOR FRAGMENTED TEXT ARRAY #
  261.  
  262. ARRAY TWOL S(1);
  263. BEGIN
  264. ITEM TOFIL1 C(0,0,8) =["-"];
  265. ITEM TOFIL2 U(0,48,12) =[0];
  266. END
  267.  
  268. BASED ARRAY DUMMY; ;
  269.  
  270. # ******************************************************************** #
  271.  
  272.  
  273. BEGIN
  274. P<DRHDRWD> = LOC(ZHWD1[0]);
  275. P<NHEADER> = P<DRHDRWD> + BLKHSIZE;
  276. OUPART = FALSE; # WRITE FULL LINES TO OUTPUT #
  277. EOFFLAG = FALSE;
  278.  
  279.  
  280. # LOOP TO GENERATE OUTPUT #
  281.  
  282. FOR PAGE$COUNT = PAGE$COUNT WHILE NOT COMPLETE
  283. DO
  284. BEGIN
  285. IF NIP
  286. THEN
  287. TEMP2 = ZNSIZE;
  288. ELSE
  289. TEMP2 = ZASIZE;
  290. DLRDW(ZFET, TEMP2, TEMPB1, RSIZE);
  291. IF RSIZE EQ 0
  292. THEN
  293. BEGIN # EOR ENCOUNTERED #
  294. DLINT(ZFET, READNR);# INITIALIZE READ AFTER EOR #
  295. DLRDW(ZFET, 1, RCDHR, RSIZE);
  296. DLRDW(ZFET, TEMP2, TEMPB1, RSIZE);
  297. END
  298. IF RSIZE GQ 0 # NOT (EOF) OR (EOI) #
  299. THEN
  300. BEGIN # DATA READ #
  301. IF TEMP2 NQ RSIZE
  302. THEN
  303. BEGIN # LOG FILE NOT CLOSED #
  304. COMPLETE = TRUE;
  305. DLDFM(NOT$CLOSED);
  306. TEST PAGE$COUNT;
  307. END
  308. OUMSGNO = OUMSGNO + 1;
  309. ENTRSZ = RSIZE;
  310.  
  311. IF ZNMILS[0] GR MIDNITE
  312. THEN
  313. BEGIN
  314. MIDNITE = MIDNITE + 86400000;
  315. YY = (C<0,1>L2DATE[0] - O"33") * 10
  316. + C<1,1>L2DATE[0] - O"33";
  317. MM = (C<3,1>L2DATE[0] - O"33") * 10
  318. + C<4,1>L2DATE[0] - O"33";
  319. DD = (C<6,1>L2DATE[0] - O"33") * 10
  320. + C<7,1>L2DATE[0] - O"33";
  321. IF YY - YY / 4 * 4 EQ 0
  322. THEN
  323. NOD[2] = 29;
  324. ELSE
  325. NOD[2] = 28;
  326. DD = DD + 1;
  327. IF DD GR NOD[MM]
  328. THEN
  329. BEGIN
  330. DD = 1;
  331. MM = MM + 1;
  332. IF MM GR 12
  333. THEN
  334. BEGIN
  335. YY = YY + 1;
  336. MM = 1;
  337. END
  338. END
  339. TEMP1 = " / /";
  340. C<0,1>TEMP1 = YY/10 + O"33";
  341. C<1,1>TEMP1 = YY - YY /10 * 10 + O"33";
  342. C<3,1>TEMP1 = MM / 10 + O"33";
  343. C<4,1>TEMP1 = MM - MM / 10 * 10 + O"33";
  344. C<6,1>TEMP1 = DD / 10 + O"33";
  345. C<7,1>TEMP1 = DD - DD / 10 * 10 + O"33";
  346. L2DATE[0] = TEMP1;
  347. END
  348. CHOSEN = TRUE;
  349.  
  350. IF DIRNUMM NQ 0
  351. THEN
  352. DLMSG; # PROCESS MSG INPUT DIRECTIVES #
  353.  
  354. IF NOT NIP
  355. THEN # AIP HEADER MAY BE 3 WORDS #
  356. BEGIN
  357. P<DATLINE> = LOC(TEMPB1);
  358. IF DL$OPC[0] LQ OP$GSM OR
  359. DL$OPC[0] EQ OP$LOG OR
  360. (DL$OPC[0] GQ OP$GETF AND DL$OPC[0] LQ OP$GTFL)
  361. THEN # GET OR PUT OR LOG CALL #
  362. BEGIN
  363. TEMP2 = 2; # 3 WORD HEADER #
  364. SHORT = FALSE;
  365. END
  366.  
  367. ELSE
  368. BEGIN
  369. SHORT = TRUE;
  370. IF DIRNUMH NQ 0 OR DIRNUMS NQ 0
  371. THEN
  372. BEGIN
  373. CHOSEN = FALSE;
  374. END
  375. IF DL$OPC[0] EQ OP$ON
  376. THEN
  377. BEGIN
  378. NTOFF = FALSE;
  379. TEMP2 = 2;
  380. END
  381.  
  382. ELSE
  383. BEGIN
  384. IF DL$OPC[0] EQ OP$OFF
  385. THEN
  386. BEGIN
  387. NTOFF = TRUE;
  388. COMPLETE = TRUE;
  389. END
  390. TEMP2 = 0;
  391. END
  392. END # NOT GET OR PUT ENTRY #
  393.  
  394. P<DUMMY> = LOC(TEMPB1) + ZASIZE;
  395. RSIZE = 0;
  396. IF TEMP2 NQ 0
  397. THEN
  398. BEGIN
  399. DLRDW(ZFET,TEMP2,DUMMY,RSIZE);
  400. ENTRSZ = ENTRSZ + TEMP2;
  401. END
  402. IF TEMP2 NQ RSIZE
  403. THEN
  404. BEGIN
  405. COMPLETE = TRUE;
  406. DLDFM(NOT$CLOSED);# LOG FILE NOT CLOSED #
  407. TEST PAGE$COUNT;
  408. END
  409.  
  410. END # AIP HEADER ENTRY #
  411.  
  412. IF CHOSEN
  413. THEN
  414. BEGIN # OUTPUT MESSAGE HEADER #
  415.  
  416. DLCC = 0;
  417. LTAA = 0;
  418.  
  419. IF DIRNUMH NQ 0
  420. THEN
  421. BEGIN
  422. IF NIP
  423. THEN
  424. DLNBH; # NIP DEBUG LOG FILE HEADER DIRECTIVE #
  425. ELSE
  426. DLABH; # AIP DEBUG LOG FILE HEADER DIR TABLE #
  427. END # HEADERS OUTPUT #
  428.  
  429. END
  430.  
  431. # PROCESS TEXT AREA #
  432.  
  433. MSG$LEN = BLKBS[0] - 2;
  434. IF NOT NIP
  435. THEN
  436. MSG$LEN = MSG$LEN - 1;
  437.  
  438. IF NOT SHORT
  439. THEN
  440. IF 0 LS MSG$LEN AND MSG$LEN LQ TLWMAX
  441. THEN
  442. BEGIN # READ MSG TEXT IN #
  443. DLRDW(ZFET, MSG$LEN, TEMPB2, RSIZE);
  444. IF RSIZE NQ MSG$LEN
  445. THEN
  446. BEGIN # FILE NOT CLOSED #
  447. COMPLETE = TRUE;
  448. DLDFM(NOT$CLOSED);
  449. TEST PAGE$COUNT;
  450. END
  451. ELSE
  452. IF CHOSEN AND# IF SUP DIRECTIVES PRESENT, #
  453. DIRNUMS NQ 0# TEST MSG FOR SELECTION #
  454. THEN
  455. DLSM(TEMPB2);
  456. END
  457. ELSE
  458. IF 0 GR MSG$LEN OR MSG$LEN GR TLWMAX
  459. THEN
  460. BEGIN # BAD LOG FILE #
  461. COMPLETE = TRUE;
  462. DLDFM(BAD$ZFILE);
  463. TEST PAGE$COUNT;
  464. END
  465.  
  466. ELSE # NO TEXT #
  467. IF DIRNUMS NQ 0
  468. THEN
  469. CHOSEN = FALSE;
  470.  
  471. IF CHOSEN
  472. THEN
  473. IF SM NQ 0
  474. THEN
  475. BEGIN
  476. SM = SM - 1; # DECREMENT STARTING NUMBER #
  477. CHOSEN = FALSE;
  478. END
  479.  
  480. IF CHOSEN AND NOT ARGFLAG[NFILE]
  481. THEN
  482. BEGIN
  483.  
  484. # WRITE ENTRY HEADER #
  485. TEMP3 = ZNMILS[0] - SRTMILS;
  486. TEMP2 = TEMP3 / 1000;
  487. DLUPTM(SCLHHMMSS, TEMP2, TEMP1);# GET CLOCK TIME #
  488. L4CLTM[0] = TEMP1;
  489. DLDISDE(TEMP3 - TEMP2 * 1000, 3, TEMP1);
  490. L4MILS[0] = TEMP1;
  491. OUPART = TRUE; # OUTPUT A PARTIAL LINE #
  492. DLWRITC(L4,2);
  493. OUPART = FALSE;
  494.  
  495. MSG$COUNT = MSG$COUNT + 1; # NUMBER OF MESSAGES OUTPUT #
  496. IF NIP
  497. THEN
  498. DLNREP; # OUTPUT NIP HEADERS #
  499. ELSE
  500. BEGIN # OUTPUT AIP HEADER #
  501. DLAREP ;
  502. P<ABH> = P<DATLINE> + 3 ;
  503. END
  504.  
  505. DLWRITC(ONEL,1); # OUTPUT BLANK LINE #
  506.  
  507. IF MSG$LEN NQ 0
  508. THEN
  509. BEGIN # WRITE ENTRY TEXT #
  510. PAIR = FALSE;
  511. IF NIP
  512. THEN
  513. TRUNC = MSG$LEN;
  514. IF TRUNC GR LENGTH
  515. THEN
  516. TRUNC = LENGTH;
  517. LNCNTR = 0;# NUMBER OF LINES OUTPUT #
  518. N = TRUNC - 1;
  519. P<TAA> = LOC(TEMPE2[0]);
  520. J = 1;
  521. TLWDIF = TRUNC;
  522. P<PWLHDR> = P<DRHDRWD> ;
  523. IF NIP
  524. AND PWLID[0] EQ PWLIDVALUE
  525. THEN
  526. BEGIN
  527. LNCNTR = LNCNTR + 1 ;
  528. FOR LNCNTR = 1 STEP 1 UNTIL ZNSIZE
  529. DO
  530. BEGIN
  531. DLDISDE(LNCNTR,3,TEMP1) ;
  532. L6LNO[0] = TEMP1 ;
  533. DLDIS(CMWORD[LNCNTR-1] ,RETWDH,RETWDO,RETWDD,RETWDA) ;
  534. L6HEX[0] = RETWDH ;
  535. L6OCT[0] = RETWDO ;
  536. L6DIS[0] = RETWDD ;
  537. L6ASCI[0] = RETWDA ;
  538. DLWRITC(L6,7) ;
  539. END
  540. END
  541.  
  542. IF NOT NIP
  543. AND DL$OPC[0] EQ OP$LOG
  544. AND DL$FORMAT[0] EQ 1
  545. THEN
  546. BEGIN # PROCESS NETLOG ENTRY #
  547. ILOG = 0 ;
  548. FOR I = 0 STEP 1 WHILE I LQ N
  549. AND DLCC NQ 0
  550. DO
  551. BEGIN
  552. TEMP2 = TEMPE2[I] ;
  553. IF ILOG EQ 0
  554. THEN
  555. BEGIN # FIRST WORD IN LINE TO LOG #
  556. DLWRITC(TEMP2,1) ;
  557. ILOG = ILOG + 1 ;
  558. END
  559. ELSE
  560. BEGIN # WORD 1 TO 11 ON SAME LINE #
  561. DLWRT(OFET,TEMP2,1) ;
  562. ILOG = ILOG + 1 ;
  563. IF ILOG EQ 14
  564. THEN
  565. BEGIN # 12 PER LINE #
  566. ILOG = 0 ; # RESET TO BEGINNING OF LINE#
  567. LINE$COUNT = LINE$COUNT + 1 ; # INCREMENT THE CNT#
  568. END
  569. END
  570. END
  571.  
  572. DLWRITC(ONEL,1) ;
  573. DLWRITC(ONEL,1) ;
  574.  
  575. GOTO EXIT ;
  576. END # PROCESS NETLOG #
  577. CONTROL FASTLOOP;
  578. FOR K = 1 STEP 1 WHILE K LQ LTAA AND
  579. TLWDIF GR 0
  580. DO
  581. BEGIN
  582. IF LTAA NQ 0
  583. THEN
  584. BEGIN
  585. N = TAASIZE[J] - 1;
  586. IF N GQ TLWDIF
  587. THEN
  588. N = TLWDIF - 1;
  589.  
  590. # FORMAT LOG ENTRY FOR FRAGMENTS #
  591. DLDISDE(K, 3, TEMP1);# COMPUTE FRAGMENT NUMBER #
  592. FH$NUM[0] = C<0,3> TEMP1;
  593.  
  594. DLDISDE(TAASIZE[J], 4, TEMP1);# CONVERT FRAG SIZE #
  595. FH$SIZE[0] = C<0,4> TEMP1;
  596. FH$SZEQ[0] = " =";
  597.  
  598. DLDISO(TAADDR[J], 6, TEMP1);# CONVERT FRAG ADDR #
  599. FH$ADDR[0] = C<0,6> TEMP1;
  600.  
  601. IF K EQ 1
  602. THEN
  603. FH$CC[0] = "0";# DOUBLE SPACE #
  604. ELSE
  605. FH$CC[0] = " ";# SINGLE SPACE #
  606.  
  607. DLWRITC(FRAGLN, 6);
  608. TLWDIF = TLWDIF - TAASIZE[J];
  609. J = J + 1;
  610. END
  611.  
  612. CONTROL SLOWLOOP;
  613. FOR I = 0 STEP 1 WHILE I LQ N AND
  614. DLCC NQ 0
  615. DO
  616. BEGIN
  617. LNCNTR = LNCNTR + 1;# OUTPUT LINE OF TEXT #
  618. DLDISDE(LNCNTR, 3, TEMP1);
  619. L6LNO[0] = TEMP1;
  620. TEMP2 = TEMPE2[I+J-1];
  621. IF NOT NIP
  622. THEN
  623. IF ABHACT[0] EQ APPCMD # CHARACTER TYPE IS 3 #
  624. AND ABHADR[0] NQ 0 # A SYNCHRONOUS COMMAND #
  625. THEN
  626. BEGIN
  627. TEMP4 = TEMP2;
  628. TEMP3PFC[0] = TEMP4PFC[0];
  629. TEMP3SFC[0] = TEMP4SFC[0];
  630. END
  631. ELSE
  632. TEMP3 = TEMPFC[I+J-1];
  633. ELSE
  634. TEMP3 = TEMPFC[I+J-1];
  635.  
  636.  
  637. BEGIN # REST OF THE CASES #
  638. DLDIS(TEMP2, RETWDH, RETWDO, RETWDD,
  639. RETWDA);
  640. L6HEX[0] = RETWDH;
  641. L6OCT[0] = RETWDO;
  642. L6DIS[0] = RETWDD;
  643. L6ASCI[0] = RETWDA;
  644. IF I EQ 0 AND
  645. LTAA EQ 0 AND
  646. (( NOT NIP AND DL$ADR[0] EQ 0 AND ABHABT[0] GR APMSG
  647. AND DL$OPC[0] NQ OP$LOG )
  648. OR
  649. ( NIP AND ( ( CN[0] EQ 0 ) OR ( BT[0] EQ 7 )
  650. OR ( ( CN[0] NQ 0 ) AND ( BT[0] EQ 4 ) )
  651. )
  652. )
  653. OR ( NIP AND (( PWLID[0] EQ PWLIDVALUE )
  654. AND ( PWLOP[0] EQ PWLOPNSM ) ) )
  655. )
  656.  
  657. THEN
  658. BEGIN # FIRST WORD OF CONNECTION ZERO #
  659. IA = 0;
  660. IB = PSSIZE / 2;
  661. FOUND = FALSE;
  662. FOR IC = IC WHILE NOT FOUND AND
  663. IA NQ IB
  664. DO
  665. BEGIN# BINARY SEARCH TABLE #
  666. IC = (IA + IB) / 2;
  667. IF TEMP3 GR PSVALUE[IC]
  668. THEN
  669. BEGIN
  670. IA = IC;
  671. END
  672. ELSE
  673. IF TEMP3 LS PSVALUE[IC]
  674. THEN
  675. IB = IC;
  676. ELSE
  677. BEGIN
  678. FOUND = TRUE;
  679. L6DIS[0] = PSNAME[IC];
  680. END
  681. IF IB EQ IA+1
  682. THEN
  683. BEGIN
  684. FOUND = TRUE;
  685. IF TEMP3 EQ PSVALUE[IA]
  686. THEN
  687. L6DIS[0] = PSNAME[IA] ;
  688. ELSE
  689. L6DIS[0] = "UNKNOWN" ;
  690. END
  691. END
  692. END
  693. DLWRITC(L6,7);
  694. END
  695. END
  696.  
  697. DLWRITC(ONEL, 1);
  698. DLWRITC(ONEL, 1);
  699. IF LTAA NQ 0
  700. THEN
  701. J = J + TAASIZE[J-1];
  702. END
  703. END
  704. ELSE
  705. DLWRITC(ONEL, 1);
  706. END
  707. EXIT:
  708. IF CHOSEN AND
  709. ARGFLAG[NFILE]
  710. THEN
  711. BEGIN # WRITE NEW DEBUG LOG FILE #
  712.  
  713. IF NMSGCNT GQ 500 AND
  714. NOT NIP
  715. THEN
  716. BEGIN # OVER 500 ENTRIES, EOR WRITTEN #
  717. NMSGCNT = 0;
  718. DLFLUSH(NFET); # WRITE EOR #
  719. DLRECL(NFET);
  720. DLWRT(NFET, RCDHR, 1); # TIME FOR RECORD HDR #
  721. END
  722. DLWRT(NFET, TEMPB1, ENTRSZ);
  723. IF NOT SHORT
  724. THEN
  725. DLWRT(NFET, TEMPB2, MSG$LEN);
  726. NMSGCNT = NMSGCNT + 1;
  727. END
  728. END
  729. ELSE
  730. BEGIN # (EOF) OR (EOI) ENCOUNTERED #
  731. IF RSIZE EQ -1
  732. THEN # (EOF) ENCOUNTERED #
  733. BEGIN
  734. EOFFLAG = TRUE;
  735. DLINT(ZFET,READNR); # INITIALIZE READ AFTER (EOF) #
  736. END
  737. COMPLETE = TRUE;
  738. END
  739. END
  740. END # DLSCAN #
  741. TERM
cdc/nos2.source/nam5871/dlscan.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator