User Tools

Site Tools


cdc:nos2.source:nam5871:hupddaw

HUPDDAW

Table Of Contents

  • [00005] PROC HUPDDAW(PACB,PACNB,BLKSQ,BLKDSQ)

Source Code

HUPDDAW.txt
  1. *DECK HUPDDAW
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNB
  5. PROC HUPDDAW(PACB,PACNB,BLKSQ,BLKDSQ); # UPDATE DATA AVAILABLE WORD #
  6. STARTIMS;
  7. #
  8. *1DC HUPDDAW
  9. * 1. PROC NAME AUTHOR DATE
  10. * HUPDDAW E. GEE 07/22/85
  11. *
  12. * 2. FUNCTIONAL DESCRIPTION:
  13. * UPDATING INPUT AVAILABLE OR DELIVERABLE DATA FIELDS IN DATA
  14. * AVAILABLE WORD.
  15. *
  16. * 3. METHOD USED:
  17. * UPDATE NO OF DATA BLOCKS QUEUED IN ACB AND ACNB.
  18. * IF CONNECTION IS NOT LIST OFF OR TEMPORARY LIST OFF,
  19. * UPDATE NUMBER OF DELIVERABLE BLOCKS.
  20. * IF NUMBER OF DELIVERABLES BLOCKS WENT FROM ZERO TO NONZERO,
  21. * SET D BIT FLAG IN ACB.
  22. * SET FLAG TO UPDATE AIP-S DATA AVAILABLE WORD.
  23. * IF NUMBER OF DELIVERABLE BLOCKS WENT FROM NONZERO TO ZERO,
  24. * CLEAR D BIT FLAG IN ACB.
  25. * SET FLAG TO UPDATE AIP-S DATA AVAILABLE WORD.
  26. * IF NO NEED TO UPDATE AIP-S DATA AVAILABLE WORD YET,
  27. * IF NUMBER OF DATA BLOCKS QUEUED WENT FROM ZERO TO NONZERO OR
  28. * NUMBER OF DATA BLOCKS QUEUED WENT FROM NONZERO TO ZERO,
  29. * SET FLAG TO UPDATE AIP-S DATA AVAILABLE WORD.
  30. * IF AIP-S DATA AVAILABLE WORD NEEDS TO BE UPDATED,
  31. * CALL HWRAVAL TO UPDATE AIP-S DATA AVAILABLE WORD.
  32. *
  33. * 4. ENTRY PARAMETERS
  34. * PACB ADDRESS OF ACB.
  35. * PACNB ADDRESS OF ACNB.
  36. * BLKSQ VALUE FOR ADJUSTING NO OF DATA BLKS
  37. * BLKDSQ VALUE FOR ADJUSTING NO OF DELIVERABLE DATA
  38. *
  39. * 5. EXIT PARAMETERS.
  40. * NONE
  41. *
  42. * 6. COMDECKS CALLED AND SYMPL TEXT USED.
  43. * NIPDEF NIP CONSTANT DEFINITIONS
  44. * ACB APPLICATION CONTROL BLOCK TEMPLATE
  45. * ACNB APPLICATION CONNECTION BLOCK TEMPLATE
  46. *
  47. * 7. ROUTINES AND OVERLAYS CALLED.
  48. * HWRAVAL UPDATE AIP-S DATA AVAILABLE WORD
  49. * XTRACE TRACE PROCEDURE CALL.
  50. *
  51. * 8. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION.
  52. * NONE.
  53.  #
  54. STOPIMS;
  55. #
  56.   INPUT VARIABLES
  57. #
  58. ITEM PACB U ; # ADDRESS OF ACB #
  59. ITEM PACNB U ; # ADDRESS OF ACNB #
  60. ITEM BLKSQ I; # VALUE FOR UPDATING NO OF DATA BLKS#
  61. ITEM BLKDSQ I; # VALUE FOR UPDATING NO OF DELIV BLK#
  62. #
  63.   EXTERNAL REFERENCES
  64. #
  65. XREF PROC HWRAVAL ; # UPDATE DATA AVAILABILITY WORD #
  66. XREF PROC XTRACE ; # TRACE PROCEDURE CALL #
  67. #
  68.   LOCAL VARIABLES
  69. #
  70. ITEM OLDBLKSQ U; # OLD VALUE OF ACBBLKSQ #
  71. ITEM OLDLSTBLKS U ; # OLD VALUE OF ACBLSTBLKS #
  72. ITEM UPDATEAIP B; # FLAG FOR CALLING HWRAVAL #
  73.  
  74. #**********************************************************************#
  75. CONTROL EJECT;
  76.  
  77. BEGIN
  78.  
  79. CONTROL IFEQ DEBUG,1;
  80. XTRACE("UPDTD"); # RECORD PROCEDURE CALL #
  81. CONTROL FI;
  82.  
  83. UPDATEAIP = FALSE; # INIT FLAG FOR CALLING HWRAVAL #
  84. P<ACB> = PACB ; # ADDRESS OF ACB #
  85. P<ACNB> = PACNB ; # ADDRESS OF ACNB #
  86.  
  87. OLDBLKSQ = ACBBLKSQ[0]; # CURRENT NO OF BLKS QUEUED #
  88. OLDLSTBLKS = ACBLSTBLKS[0] ; # CURRENT NO OF DELIVERABLE BLKS#
  89.  
  90. ACBBLKSQ[0] = ACBBLKSQ[0] + BLKSQ; # UPDATE NO OF DATA BLKS #
  91. ACNBBLKSQ[0] = ACNBBLKSQ[0] + BLKSQ; # UPDATE NO OF BLKS QUEUED #
  92. IF (NOT ACNBLO[0] ) AND # CONNECTION NOT LIST OFF #
  93. (NOT ACNBTLO[0]) # CONNECTION NOT TEMP LIST OFF #
  94. THEN # UPDATE NO OF DELIVERABLE BLKS #
  95. BEGIN
  96. ACBLSTBLKS[0] = ACBLSTBLKS[0] + BLKDSQ; # UPDATE NO OF DELIV #
  97. IF BLKDSQ GR 0
  98. THEN # INCREMENTED NO OF DELIVERABLES#
  99. BEGIN
  100. IF OLDLSTBLKS EQ 0 # PREVIOUS VALUE WAS ZERO #
  101. THEN # NEED TO INFORM AIP #
  102. BEGIN
  103. ACBPDATA[0] = TRUE ; # SET D BIT IN DATA AVAIL WORD #
  104. UPDATEAIP = TRUE; # SET FLAG FOR CALLING HWRAVAL #
  105. END
  106. END
  107. ELSE # DID NOT ADD DELIVERABLE DATA #
  108. BEGIN
  109. IF BLKDSQ LS 0
  110. THEN # DECREMENTED NO OF DELIVERABLES#
  111. BEGIN
  112. IF (OLDLSTBLKS NQ 0 ) AND # PREVIOUS VALUE WAS NONZERO #
  113. (ACBLSTBLKS[0] EQ 0) # CURRENT VALUE IS NO ZERO #
  114. THEN # NEED TO INFORM AIP #
  115. BEGIN
  116. ACBPDATA[0] = FALSE; # CLEAR D BIT IN DATA AVAIL WORD#
  117. UPDATEAIP = TRUE; # SET FLAG FOR CALLING HWRAVAL #
  118. END
  119. END
  120. END
  121. END
  122. IF NOT UPDATEAIP
  123. THEN # DO NOT UPDATE D BIT IN AIP #
  124. BEGIN
  125. IF ( (OLDBLKSQ EQ 0) AND # NO DATA BLOCKS QUEUED BEFORE#
  126. (BLKSQ GR 0 ) ) OR # DATA BLOCKS QUEUED #
  127. ( (OLDBLKSQ NQ 0 ) AND # DATA BLOCKS QUEUED BEFORE #
  128. (ACBBLKSQ[0] EQ 0) ) # NO DATA BLOCKS QUEUED NOW #
  129. THEN # NEED TO INFORM AIP #
  130. BEGIN
  131. UPDATEAIP = TRUE; # SET FLAG FOR CALLING HWRAVAL #
  132. END
  133. END
  134. IF UPDATEAIP
  135. THEN # NEED TO WRITE DATA AVAIL WORD TO AIP #
  136. BEGIN
  137. HWRAVAL(P<ACB>,TRUE); # WRITE DATA AVAIL WORD TO AIP #
  138. END
  139. RETURN;
  140. END
  141.  
  142. TERM
cdc/nos2.source/nam5871/hupddaw.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator