User Tools

Site Tools


cdc:nos2.source:nam5871:ndlem2

NDLEM2

Table Of Contents

  • [00005] PROC NDLEM2(CODE,LINE,CLRWORD)
  • [00009] PASS 2 ERROR MESSAGE PROC.
  • [00047] PROC RECALL
  • [00048] PROC WRITEF
  • [00049] PROC WRITEW

Source Code

NDLEM2.txt
  1. *DECK NDLEM2
  2. USETEXT NDLDATT
  3. USETEXT NDLER2T
  4. USETEXT NDLFETT
  5. PROC NDLEM2(CODE,LINE,CLRWORD);
  6. BEGIN
  7. *IF,DEF,IMS
  8. #
  9. ** NDLEM2 - PASS 2 ERROR MESSAGE PROC.
  10. *
  11. * D.K. ENDO 81/10/22
  12. *
  13. * THIS PROCEDURE MAKES AN ENTRY INTO THE PASS 2 ERROR FILE AND,
  14. * IF NEEDED, FLUSHES THE CIO BUFFER.
  15. *
  16. * PROC NDLEM2(CODE,LINE,CLRWORD)
  17. *
  18. * ENTRY CODE = ERROR CODE.
  19. * LINE = SOURCE LINE NUMBER ERROR WAS DETECTED ON.
  20. * CLRWORD = CLARIFIER WORD.
  21. *
  22. * EXIT NONE.
  23. *
  24. * METHOD
  25. *
  26. * IF ERROR CODE IS NON-ZERO,
  27. * THEN,
  28. * SET UP ENTRY.
  29. * IF FATAL ERROR,
  30. * THEN,
  31. * INCREMENT ERROR COUNT.
  32. * OTHERWISE,
  33. * INCREMENT WARNING COUNT.
  34. * OTHERWISE,
  35. * CREATE ZERO ENTRY(FLAGS EOF).
  36. * WRITE ENTRY TO FILE.
  37. * IF ERROR CODE IS ZERO,
  38. * FLUSH CIO BUFFER.
  39. *
  40. #
  41. *ENDIF
  42. #
  43. **** PROC NDLEM2 - XREF LIST BEGINS
  44. #
  45. XREF
  46. BEGIN
  47. PROC RECALL;
  48. PROC WRITEF; # FLUSHES BUFFER AND WRITES EOF #
  49. PROC WRITEW; # WRITES ENTRY TO FILE #
  50. END
  51. #
  52. ****
  53. #
  54. ITEM CODE; # ERROR CODE #
  55. ITEM LINE; # LINBE NUMBER THAT ERROR WAS DETECTED #
  56. ITEM CLRWORD C(10); # CLARIFIER WORD #
  57. ARRAY ELT [0:0] S(2); # ERROR LISTING TABLE #
  58. BEGIN
  59. ITEM ELTCODE I(0,0,12); # ERROR CODE #
  60. ITEM ELTLINE I(0,12,18); # LINE NUMBER #
  61. ITEM ELTCLRW C(1,0,10); # CLARIFIER WORD #
  62. ITEM ELTWRD1 U(0,0,60);
  63. ITEM ELTWRD2 U(1,0,60);
  64. END
  65. CONTROL EJECT;
  66. # #
  67. # NDLEM2 CODE BEGINS HERE #
  68. # #
  69. IF CODE NQ 0 # BUFFER SHOULD NOT BE CLEARED #
  70. THEN
  71. BEGIN
  72. ELTWRD1[0] = 0; # CLEAR FIRST WORD OF ENTRY #
  73. ELTCODE[0] = CODE; # MAKE ENTRY IN ERROR TABLE #
  74. ELTLINE[0] = LINE;
  75. ELTCLRW[0] = CLRWORD;
  76. IF EMT2TYPE[CODE] EQ "E"
  77. THEN # SET FLAG IN SOURCE #
  78. BEGIN
  79. ERRCNT = ERRCNT + 1; # INCREMENT FATAL ERROR COUNT #
  80. END
  81. ELSE
  82. BEGIN
  83. WARNCNT = WARNCNT + 1; # INCREMENT WARNING ERROR COUNT #
  84. END
  85. END
  86. ELSE # CLEAR BUFFER #
  87. BEGIN
  88. ELTWRD1[0] = 0; # MAKE ZEROED ENTRY #
  89. ELTWRD2[0] = 0; # FLAGGING END OF TABLE #
  90. END
  91. WRITEW(ERR2FET,ELT,2); # WRITE ENTRY TO FILE #
  92. IF CODE EQ 0
  93. THEN # WRITE BUFFER TO FILE #
  94. BEGIN
  95. WRITEF(ERR2FET);
  96. RECALL(ERR2FET);
  97. END
  98. RETURN; # **** RETURN **** #
  99. END # NDLEM2 #
  100. TERM
cdc/nos2.source/nam5871/ndlem2.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator