User Tools

Site Tools


cdc:nos2.source:nam5871:hscand

HSCAND

Table Of Contents

  • [00011] PROC HSCAND(ACNALN,LIST,FOUND,ACNBADR)
  • [00073] PROC OVLCALL
  • [00074] PROC XTRACE

Source Code

HSCAND.txt
  1. *DECK HSCAND
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNB
  5. USETEXT ACNT
  6. USETEXT APPSTAT
  7. USETEXT DUMPFLG
  8. USETEXT MSGIDX
  9. USETEXT OVERLAY
  10. USETEXT PARAMS
  11. PROC HSCAND(ACNALN,LIST,FOUND,ACNBADR); # SCAN FOR DATA #
  12. STARTIMS;
  13. #
  14. *1DC HSCAND
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * HSCAND E. GEE 85/04/10
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION.
  20. * SCAN FOR UPLINE DATA QUEUED FOR APPLICATION.
  21. *
  22. * 3. METHOD USED.
  23. * IF GETTING DATA FROM LIST,
  24. * SCAN CONNECTION DATA RING FOR ACNB WITH MATCHING LIST
  25. * NUMBER.
  26. * ELSE (GETTING DATA FOR A SPECIFIC CONNECTION),
  27. * CHECK FOR DATA RING IN CORRESPONDING ACNB.
  28. *
  29. * 4. ENTRY PARAMETERS.
  30. * ACBADDR ADDRESS OF APPLICATION CONTROL BLOCK
  31. * ACNALN APPLICATION LIST OR CONNECTION NUMBER
  32. * LIST TYPE OF CALL
  33. * TRUE = SCAN FOR DATA ON LIST ACNALN
  34. * FALSE = SCAN FOR DATA ON CONNECTION ACNALN
  35. *
  36. * 5. EXIT PARAMETERS.
  37. * FOUND RESULT OF SEARCH
  38. * TRUE = FOUND MSG TO DELIVER
  39. * FALSE = NO MSG FOUND TO DELIVER
  40. * ACNBADR ADDRESS OF ACNB CONTAINING DATA TO DELIVER
  41. *
  42. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  43. * ACB APPLICATION CONTROL BLOCK
  44. * ACNB APPLICATION CONNECTION BLOCK
  45. * ACNT APPLICATION CONNECTION TABLE
  46. * APPSTAT NETWORK WORKLIST PROCESSING TABLE
  47. * DUMPFLG REASON CODES FOR DUMPING NIP-S FIELD LENGTH
  48. * MSGIDX DAYFILE MESSAGE CODES
  49. * NIPDEF CONSTANT DEFINITIONS
  50. * OVERLAY OVERLAY PROCESSING COMMON BLOCK
  51. * PARAMS OVERLAY PARAMETER PASSING COMMON BLOCK
  52. *
  53. * 7. ROUTINES CALLED.
  54. * NONE
  55. *
  56. * 8. DAYFILE MESSAGES.
  57. * NONE
  58.  #
  59. STOPIMS;
  60. #
  61.   INPUT VARIABLES
  62. #
  63. ITEM ACNALN; # APPLICATION LIST/CONNECTION NO#
  64. ITEM LIST B; # LIST OR CONNECTION TYPE CALL #
  65. #
  66.   OUTPUT VARIABLES
  67. #
  68. ITEM FOUND B; # RESULT OF SEARCH #
  69. ITEM ACNBADR; # ADDRESS OF ACNB IF FOUND MSG #
  70.  
  71. XREF
  72. BEGIN
  73. PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
  74. PROC XTRACE; # TRACE PROCEDURE CALL #
  75. END
  76.  
  77. #
  78.   LOCAL VARIABLES
  79. #
  80. ITEM ENDSEARCH B; # SEARCH ACNB LOOP TERMINATOR #
  81. ITEM I; # LOOP INDUCTION VARIABLE #
  82.  
  83. CONTROL IFEQ DEBUG,1 ;
  84. ITEM PNAME C(10) = "HSCA";
  85. CONTROL FI;
  86.  
  87. #**********************************************************************#
  88. CONTROL EJECT;
  89.  
  90. BEGIN
  91.  
  92. CONTROL IFEQ DEBUG,1 ;
  93. XTRACE("HSCND") ;
  94. CONTROL FI;
  95.  
  96. P<ACB> = ACBADDR; # ADDRESS OF ACB #
  97. FOUND = FALSE; # ASSUME NO MSG WILL BE FOUND #
  98. IF LIST
  99. THEN # GET FROM LIST TYPE CALL #
  100. BEGIN
  101. IF ACBLSTBLKS[0] NQ 0
  102. THEN # MAY BE DELIVERABLE DATA #
  103. BEGIN
  104. P<ACNB> = ACBCDRP[0]; # ACNB IN CONNECTION DATA RING #
  105. ENDSEARCH = FALSE; # INITIALIZE LOOP TERMINATOR #
  106. FOR I = I WHILE NOT ENDSEARCH
  107. DO # SCAN FOR DATA ON LIST #
  108. BEGIN
  109. IF (ACNALN EQ ACNBALN[0]) AND # LIST NUMBERS MATCH #
  110. (NOT ACNBLO[0]) AND # NOT LIST OFF #
  111. (NOT ACNBTLO[0]) # NOT TEMPORARY LIST OFF #
  112. THEN # FOUND ACNB WITH DATA #
  113. BEGIN
  114.  
  115. CONTROL IFEQ DEBUG,1;
  116. IF ACNBDRFP[0] EQ 0
  117. THEN # NO DATA QUEUED TO THIS ACNB #
  118. BEGIN
  119. DMPFLG = DHSCAN1; # REASON CODE FOR DUMPING FL #
  120. PARAMS1 = DFMSG01; # NIP FATAL ERROR PROC=XXXX. #
  121. PARAMS6 = PNAME; # PROC NAME = HSCA #
  122. OVLNAME = XERRMSGP;
  123. OVLCALL;
  124. END
  125. CONTROL FI;
  126.  
  127. FOUND = TRUE; # HAVE DATA TO DELIVER TO APP #
  128. ENDSEARCH = TRUE; # TERMINATE FOR LOOP #
  129. END
  130. ELSE # ACNB IS ON DIFFERENT LIST #
  131. BEGIN
  132. P<ACNB> = ACNBCDRFP[0]; # NEXT ACNB IN CON DATA RING #
  133. IF P<ACNB> EQ ACBCDRP[0]
  134. THEN # CHECKED EVERY ACNB IN CDR #
  135. BEGIN
  136. ENDSEARCH = TRUE; # TERMINATE FOR LOOP #
  137. END
  138. END
  139. END
  140. END
  141. END
  142. ELSE # SEARCH FOR DATA ON CONNECTION #
  143. BEGIN
  144. P<ACNT> = ACBACNT[0]; # ADDR OF APP CONNECTION TABLE #
  145. P<ACNB> = ACNTACNB[ACNALN+ACNTHSIZE-ACNTMINACN[0]];
  146. IF ACNBDRFP[0] NQ 0
  147. THEN # DATA AVAIL ON THIS CONNECTION #
  148. BEGIN
  149. FOUND = TRUE;
  150. END
  151. END
  152. ACNBADR = P<ACNB>;
  153. RETURN;
  154. END
  155. TERM
cdc/nos2.source/nam5871/hscand.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator