User Tools

Site Tools


cdc:nos2.source:nam5871:knamdfl

KNAMDFL

Table Of Contents

  • [00007] PRGM KNAMDFL
  • [00054] PROC KPUT
  • [00055] PROC XTRACE

Source Code

KNAMDFL.txt
  1. *DECK KNAMDFL
  2. USETEXT NIPDEF
  3. USETEXT FREETAB
  4. USETEXT PARAMS
  5. USETEXT KDIS
  6. USETEXT KHDRX
  7. PRGM KNAMDFL; # PROCESS NAM K DISPLAY FL COMMAND #
  8. STARTIMS ;
  9. #
  10. *1DC KNAMDFL
  11. * 1. PROC NAME AUTHOR DATE
  12. * KNAMDFL A.BEN-ARTZI 82/08/25
  13. *
  14. * 2. FUNCTIONAL DESCRIPTION
  15. *
  16. * PROCESS FL= TYPE-IN WHILE K-DISPLAY IN NAM-MODE
  17. * ( AND MAXFL HAS NOT BEEN REACHED )
  18. *
  19. * 3. METHOD USED
  20. *
  21. * CHECK DATA FOR VALIDITY.
  22. * UPDATE MAXFL AND STATUS DISPLAY TO NEW VALUE
  23. *
  24. * 4. ENTRY PARAMETERS
  25. *
  26. * PARAMS1 - NUMBER OF DIGITS IN NUMBER
  27. * PARAMS6 - VALUE RECEIVED ( IN CHARACTER FORMAT )
  28. *
  29. * 5. EXIT PARAMETERS
  30. *
  31. * PARAMS7 - ERROR CODE ( OR 0 )
  32. *
  33. * 6. COMMDECKS AND TEXTS USED
  34. *
  35. * NIPDEF FREETAB KDIS KHDRX PARAMS
  36. * OSSIZE
  37. *
  38. * 7. ROUTINES CALLED
  39. *
  40. * KPUT - K-DISPLAY DINAMIC UPDATE INTERFACE
  41. * XTRACE DEBUG TRACE MARK
  42. *
  43. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  44. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  45. *CALL OSSIZE
  46. *
  47.  #
  48. STOPIMS ;
  49. #
  50.   EXTERNAL VARIABLES
  51. #
  52. XREF
  53. BEGIN
  54. PROC KPUT; # UPDATE STATUS DISPLAY #
  55. PROC XTRACE; # TRACE CALL #
  56. LABEL RJMAIN;
  57. END
  58. #
  59.   INTERNAL VARIABLES
  60. #
  61. ITEM I; # INDUCTION VARIABLE #
  62. ITEM KRC; # COMMAND ERROR CODE #
  63. ITEM FLVALUE C(10); # FL VALUE #
  64. ITEM MFL; # MAXIMUM FL VALUE #
  65. ITEM TEMP; # TEMPORARY #
  66.  
  67. CONTROL EJECT;
  68.  
  69. BEGIN # KNAMDFL #
  70.  
  71. CONTROL IFEQ DEBUG,1;
  72. XTRACE("KNMFL"); # TRACE CALL #
  73. CONTROL FI;
  74.  
  75. KRC = 0;
  76. MFL = 0;
  77. FLVALUE = PARAMS6;
  78.  
  79. FOR I=0 STEP 1 WHILE I LS WC
  80. AND KRC EQ 0
  81. AND C<I>FLVALUE NQ " "
  82. DO # COMPUTE FL ENTERED #
  83. BEGIN
  84. TEMP = C<I>FLVALUE; # ONE DIGIT #
  85. IF TEMP GQ "0"
  86. OR TEMP LQ "7"
  87. THEN # ALLOW OCTAL VALUE ONLY #
  88. MFL = MFL*O"10" + (TEMP-O"33");
  89. ELSE # ERROR, FL MUST BE OCTAL NUMERIC #
  90. KRC = 7;
  91. END
  92.  
  93. IF KRC EQ 0
  94. THEN # NO ERROR OCCURRED SO FAR #
  95. BEGIN
  96. IF HRL LS HRLV3
  97. THEN # ALLOW INCREASE IN FL ONLY #
  98. BEGIN
  99. IF MFL LQ MAXFL
  100. OR (MFL-O"1000") LS MAXFL
  101. OR MFL GR MAXXFL
  102. THEN # ILLEGAL FL VALUE ENTERED #
  103. KRC = 7;
  104. END
  105. ELSE # HOST NOT IN BUFFER REGULATION #
  106. BEGIN
  107. IF MFL LS (CTLSLWA+O"2000")
  108. OR MFL GR MAXXFL
  109. THEN
  110. KRC = 7;
  111. END
  112. END
  113.  
  114. IF KRC EQ 0
  115. THEN # FL COMMAND OK #
  116. BEGIN
  117. MAXFL = MFL; # RESET MAXIMUM FL ALLOWED TO NEW VALUE #
  118. FREMFL[0] = FALSE; # CLEAR MAX FL REACHED INDICATOR #
  119. HRL = HRLV3; # SET BUFFER LEVEL TO ALL TRAFFIC #
  120. IF KDST[0]
  121. THEN # NAM STATUS DISPLAY IS ON #
  122. KPUT(LOC(KHDRXNM),0,KPHXMFL,MAXFL); # UPDATE HRL #
  123. END
  124.  
  125. PARAMS7 = KRC;
  126. GOTO RJMAIN;
  127.  
  128. END # KNAMDFL #
  129.  
  130. TERM
cdc/nos2.source/nam5871/knamdfl.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator