User Tools

Site Tools


cdc:nos2.source:nam5871:ndlwlcr

NDLWLCR

Table Of Contents

  • [00006] PROC NDLWLCR(NPU$NAME,LAST$ENTRY)
  • [00010] WRITE LINE CONFIGURE RECORD.
  • [00049] PROC SSTATS
  • [00050] PROC RECALL
  • [00051] PROC WRITER
  • [00052] PROC WRITEW

Source Code

NDLWLCR.txt
  1. *DECK NDLWLCR
  2. USETEXT NDLDATT
  3. USETEXT NDLFETT
  4. USETEXT NDLNCFT
  5. USETEXT NDLTBLT
  6. PROC NDLWLCR(NPU$NAME,LAST$ENTRY);
  7. BEGIN
  8. *IF,DEF,IMS
  9. #
  10. ** NDLWLCR - WRITE LINE CONFIGURE RECORD.
  11. *
  12. * D.K. ENDO 81/11/10
  13. *
  14. * THIS PROCEDURE MAKES ENTRIES IN LINE CONFIGURE INDEX AND WRITES
  15. * LINE CONFIGURE ENTRY TO FILE.
  16. *
  17. * PROC NDLWLCR(NPU$NAME,LAST$ENTRY)
  18. *
  19. * ENTRY NPU$NAME = NAME OF NPU SUPPORT LINE.
  20. * LAST$ENTRY = LAST ENTRY FLAG.
  21. *
  22. * EXIT NONE.
  23. *
  24. * METHOD
  25. *
  26. * IF NO FATAL ERRORS HAVE BEEN DETECTED,
  27. * IF NPU$NAME IS NOT EQUAL TO NAME IN CURRENT INDEX ENTRY,
  28. * IF NEED MORE TABLE SPACE FOR INDEX,
  29. * ALLOCATE MORE SPACE.
  30. * MAKE NEW ENTRY IN INDEX.
  31. * IF LAST$ENTRY IS NOT SET,
  32. * THEN,
  33. * INCREMENT RECORD LENGTH.
  34. * INCREMENT ENTRY COUNT.
  35. * WRITE ENTRY TO FILE.
  36. * OTHERWISE,
  37. * FLUSH CIO BUFFER FOR LINE CONFIG FILE.
  38. * WRITE EOR MAKER FOR RECORD.
  39. *
  40. #
  41. *ENDIF
  42. ITEM NPU$NAME C(7); # NAME OF NPU SUPPORTING LINE #
  43. ITEM LAST$ENTRY B; # LAST ENTRY INDICATOR #
  44. #
  45. **** PROC NDLWLCR - XREF LIST BEGINS.
  46. #
  47. XREF
  48. BEGIN
  49. PROC SSTATS; # ALLOCATES MORE TABLE SPACE #
  50. PROC RECALL; # RETURNS CONTROL WHEN RECALL BIT CLEARED #
  51. PROC WRITER; # WRITES -EOR- #
  52. PROC WRITEW; # WRITES GIVEN NUMBER OF WORDS #
  53. END
  54. #
  55. ****
  56. #
  57. ITEM I; # SCRATCH ITEM #
  58. ITEM ITEMP; # INTEGER TEMPORARY #
  59. CONTROL EJECT;
  60. # #
  61. # NDLWLNR CODE BEGINS HERE #
  62. # #
  63. IF ERRCNT EQ 0 # IF NO FATAL ERRORS HAVE BEEN DETECTED #
  64. THEN
  65. BEGIN
  66. IF NPU$NAME NQ LCRNAME[LCRWC[1] - 1]
  67. THEN # MUST BE A NEW ENTRY #
  68. BEGIN
  69. IF (LCRWC[1] + 2) GQ LCR$LENG
  70. THEN # NEED MORE TABLE SPACE #
  71. BEGIN
  72. SSTATS(P<LIN$CON$INDX>,30);
  73. END
  74. LCRWC[1] = LCRWC[1] + 1; # INCREMENT WORD COUNT #
  75. LCRWORD[LCRWC[1]] = 0; # CLEAR FIRST WORD IN ENTRY #
  76. LCRNAME[LCRWC[1]] = NPU$NAME;# PUT NPU NAME IN ENTRY #
  77. LCRWC[1] = LCRWC[1] + 1; # INCREMENT WORD COUNT #
  78. LCRRL[LCRWC[1]] = 0; # CLEAR RECORD LENGTH #
  79. LCRRANINDX[LCRWC[1]] = LRCRI[0]; # SET POINTER TO SECTOR #
  80. END
  81. IF NOT LAST$ENTRY # LAST ENTRY HAS NOT BEEN DETECTED YET #
  82. THEN
  83. BEGIN
  84. # INCREMENT RECORD LENGTH #
  85. LCRRL[LCRWC[1]] = LCRRL[LCRWC[1]] + LCWC[0] + 1;
  86. IF LCNI[0] EQ 0 # IF THIS IS NOT A -GROUP- DEFINITION #
  87. THEN
  88. BEGIN # INCREMENT ENTRY COUNT BY ONE #
  89. LCRENT[LCRWC[1] - 1] = LCRENT[LCRWC[1] - 1] + 1;
  90. END
  91. ELSE # THIS IS A -GROUP- DEFINITION #
  92. BEGIN # INCREMENT ENTRY COUNT BY -NI- VALUE #
  93. LCRENT[LCRWC[1] - 1] = LCRENT[LCRWC[1] - 1] + LCNI[0];
  94. END
  95. WRITEW(LRFET,LIN$CON$REC,LCWC[0]+1); # WRITE ENTRY TO RECORD #
  96. END
  97. ELSE # LAST ENTRY WAS FOUND #
  98. BEGIN
  99. WRITER(LRFET,0); # FLUSH CIO BUFFER AND WRITE EOR TO FILE #
  100. RECALL(LRFET);
  101. END
  102. END
  103. RETURN; # **** RETURN **** #
  104. END # NDLWLCR #
  105. TERM
cdc/nos2.source/nam5871/ndlwlcr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator