User Tools

Site Tools


cdc:nos2.source:nam5871:ndlmain

NDLMAIN

Table Of Contents

  • [00003] PROC NDLMAIN
  • [00007] NDLP MAIN PROCEDURE.
  • [00050] PROC ABORT
  • [00051] PROC NDLOVLD
  • [00052] PROC RECALL
  • [00053] PROC RETERN
  • [00054] PROC MESSAGE
  • [00055] FUNC XCDD C(10)
  • [00056] FUNC XSFW C(10)

Source Code

NDLMAIN.txt
  1. *DECK NDLMAIN
  2. USETEXT NDLTBLT
  3. PROC NDLMAIN;
  4. BEGIN
  5. *IF,DEF,IMS
  6. #
  7. ** NDLMAIN - NDLP MAIN PROCEDURE.
  8. *
  9. * D.K. ENDO 81/10/12
  10. *
  11. * THIS IS THE MAIN PROCEDURE FOR NDLP.
  12. *
  13. * PROC NDLMAIN
  14. *
  15. * ENTRY NONE.
  16. *
  17. * EXIT NONE.
  18. *
  19. * MESSAGES LFN - NO ERRORS ENCOUNTERED.
  20. * LFN - XXX ERRORS AND YY WARNINGS.
  21. * NDLP COMPLETE.
  22. *
  23. * METHOD
  24. *
  25. * LOAD INITIALIZATION OVERLAY.
  26. * IF THIS IS A CREATION RUN,
  27. * THEN,
  28. * FOR EACH DIVISION UNTIL EOI,
  29. * LOAD PASS 1 OVERLAY.
  30. * IF THIS IS NCF DIVISION,
  31. * THEN
  32. * LOAD NCF OVERLAY.
  33. * OTHERWISE,
  34. * IF THIS IS LCF DIVISION,
  35. * LOAD LCF OVERLAY.
  36. * LOAD LIST OVERLAY.
  37. * SEND ERROR MESSAGE TO DAYFILE
  38. * RETURN ALL THE SCRATCH FILES
  39. * OTHERWISE
  40. * LOAD LIST OVERLAY.
  41. * SEND NDLP COMPLETE MESSAGE TO DAYFILE.
  42. *
  43. #
  44. *ENDIF
  45. #
  46. **** PROC NDLMAIN - XREF LIST BEGINS.
  47. #
  48. XREF
  49. BEGIN
  50. PROC ABORT; # ABORTS JOB ON REQUEST #
  51. PROC NDLOVLD; # LOADS OVERLAY #
  52. PROC RECALL; # RETURNS CONTROL WHEN RECALL BIT IS SET #
  53. PROC RETERN; # RETURNS FILE ON REQUEST #
  54. PROC MESSAGE; # PUTS MESSAGE INTO DAYFILE #
  55. FUNC XCDD C(10); # CONVERT INTEGER TO DECIMAL DISPLAY CODE #
  56. FUNC XSFW C(10); # BLANK FILL A ZERO FILLED NAME #
  57. END
  58. #
  59. ****
  60. #
  61. CONTROL PRESET;
  62. CONTROL NOLIST; # DATANDL, ER1CNDL, FETSNDL, OVLCNDL #
  63. *CALL DATANDL
  64. *CALL ER1CNDL
  65. *CALL FETSNDL
  66. *CALL OVLCNDL
  67. CONTROL LIST;
  68. ITEM CRNT$LFN C(10); # TEMPORARY FOR CURRENT FILE NAME #
  69. ITEM CTEMP C(10); # CHARACTER TEMPORARY #
  70. ITEM I; # USED IN MAIN FOR LOOP #
  71.  
  72. DEF MXERR # 999 #; # MAXIMUM NUMBER OF ERRORS #
  73.  
  74. ARRAY E$MSG1 [00:00] S(4); # LFN - NO ERRORS ENCOUNTERED. #
  75. BEGIN
  76. ITEM E$MSG1$TEXT C(00,00,33) =
  77. [" - NO ERRORS ENCOUNTERED."];
  78. ITEM E$MSG1$LFN C(00,06,07); # FILE NAME #
  79. ITEM E$MSG1$ZBYT C(03,18,12) = [0]; # ZERO BYTE TERMINATOR #
  80. END
  81. ARRAY E$MSG2 [00:00] S(4); # LFN - X ERRORS AND Y WARNINGS.#
  82. BEGIN
  83. ITEM E$MSG2$TEXT C(00,00,39) =
  84. [" - ERRORS AND WARNINGS."];
  85. ITEM E$MSG2$LFN C(00,06,07); # FILE NAME #
  86. ITEM E$MSG2$ECNT C(01,06,03); # ERROR COUNT FIELD #
  87. ITEM E$MSG2$WCNT C(02,36,03); # WARNING COUNT FIELD #
  88. ITEM E$MSG2$ZBYT C(03,48,12) = [0]; # ZERO BYTE TERMINATOR #
  89. END
  90. ARRAY NDLCOMP S(2);
  91. ITEM
  92. COMTEXT C(0,0,15) = [" NDLP COMPLETE."],
  93. COMZERO U(1,30,30) = [0];
  94.  
  95. # NDLMAIN CODE BEGINS HERE #
  96. # #
  97. NTAB = MXTBLS; # SET NTAB TO FORCE LOADING OF TABLES CMN #
  98. NDLOVLD(OVL$ENT[OVLY"INIT"]);# LOAD AND EXECUTE INIT OVERLAY #
  99. IF CRERUN
  100. THEN # THIS IS A CREATION RUN #
  101. BEGIN
  102. FOR I=0 STEP 1 WHILE NOT EOINP DO
  103. BEGIN # EXECUTE UNTIL END OF INPUT IS FOUND #
  104. NDLOVLD(OVL$ENT[OVLY"PSS1"]);# LOAD AND EXECUTE PASS 1 #
  105. CRNT$LFN = " "; # CLEAR CURRENT FILE NAME #
  106. IF NCFDIV # PROCESS NCF STATEMENTS #
  107. THEN
  108. BEGIN
  109. NDLOVLD(OVL$ENT[OVLY"NCF"]);# LOAD NCF PROCESSOR #
  110. CRNT$LFN = XSFW(NCFLFN[0]); # SAVE NCF FILE NAME #
  111. END
  112. ELSE # NOT AN NCF DIVISION #
  113. BEGIN
  114. IF LCFDIV # PROCESS LCF STATEMENTS #
  115. THEN
  116. BEGIN
  117. NDLOVLD(OVL$ENT[OVLY"LCF"]); # LOAD LCF PROCESSOR #
  118. CRNT$LFN = XSFW(LCFLFN[0]); # SAVE LCF FILE NAME #
  119. END
  120. END
  121. NDLOVLD(OVL$ENT[OVLY"LIST"]);# LOAD AND EXECUTE LIST ROUTINE #
  122. IF ERRCNT EQ 0 AND
  123. WARNCNT EQ 0
  124. THEN # IF THERE ARE NO ERRORS OR WARNINGS #
  125. BEGIN
  126. E$MSG1$LFN[0] = CRNT$LFN; # PUT FILE NAME IN MESSAGE #
  127. MESSAGE(E$MSG1,0); # SENT MSG TO DAYFILE #
  128. END
  129. ELSE # ERRORS AND/OR WARNINGS ENCOUNTERED #
  130. BEGIN
  131. E$MSG2$LFN[0] = CRNT$LFN; # PUT FILE NAME IN MSG #
  132. IF ERRCNT GR MXERR
  133. THEN # ERROR COUNT EXCEEDS MAX #
  134. BEGIN
  135. ERRCNT = MXERR; # SET ERROR COUNT TO MAX #
  136. END
  137. CTEMP = XCDD(ERRCNT); # CONVERT TO DISPLAY CODE #
  138. E$MSG2$ECNT[0] = C<7,3>CTEMP; # PUT ERROR COUNT IN MSG #
  139. CTEMP = XCDD(WARNCNT); # CONVERT TO DISPLAY CODE #
  140. E$MSG2$WCNT[0] = C<7,3>CTEMP; # PUT WARNING COUNT IN MSG#
  141. MESSAGE(E$MSG2,0); # SEND MESSAGE TO DAYFILE #
  142. IF ERRCNT GR 0 # IF FATAL ERROR EXIST #
  143. THEN
  144. BEGIN
  145. ABRTFLG = TRUE; # SET ABORT FLAG #
  146. END
  147. END
  148. END
  149. RETERN(ERR1FET); # RETURN SCRATCH FILES #
  150. RETERN(ERR2FET);
  151. RETERN(ESIFET);
  152. RETERN(LRFET);
  153. RETERN(SECFET);
  154. RETERN(STFET);
  155. RECALL(STFET);
  156. END #CREATION RUN#
  157. ELSE #THIS IS A FILE SUMMARY RUN #
  158. BEGIN
  159. NDLOVLD(OVL$ENT[OVLY"LIST"]); # LOAD AND EXECUTE LIST ROUTINE #
  160. END
  161. MESSAGE(NDLCOMP,0); # SEND -NDLP COMPLETE- DAYFILE MESSAGE #
  162. IF ABRTFLG # IF ABORT FLAG IS SET #
  163. THEN
  164. BEGIN
  165. ABORT; # ABORT JOB #
  166. END
  167. RETURN;
  168. END # NDLMAIN #
  169. TERM
cdc/nos2.source/nam5871/ndlmain.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator