User Tools

Site Tools


cdc:nos2.source:nam5871:ncregcp

NCREGCP

Table Of Contents

  • [00009] PRGM NCREGCP
  • [00072] PROC MGETS
  • [00073] PROC NLOBCH
  • [00074] PROC MRELS
  • [00075] PROC XTRACE

Source Code

NCREGCP.txt
  1. *DECK NCREGCP
  2. USETEXT AHEADER
  3. USETEXT NBT
  4. USETEXT FREETAB
  5. USETEXT NIPDEF
  6. USETEXT PARAMS
  7. USETEXT SUPMSG
  8. USETEXT PT
  9. PRGM NCREGCP;
  10. # CREATE AND SEND SUPERVISORY MESSAGE REG/CP TO PIP #
  11.  
  12. STARTIMS;
  13. #
  14. *1DC NCREGCP
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * NCREGCP E.T. WAN 81/05/26
  18. * L.T.NGUYEN 81/09/30
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION
  21. * CREATE AND SEND SUPEVISORY MESSAGE REG/CP TO PIP
  22. *
  23. * 3. METHOD USED
  24. * CALL MGETS TO GET BUFFER FOR REG/CP
  25. * CREATE REG/CP SUPERVISORY MESSAGE, THE DATA BLOCK
  26. * HEADER, AND THE APPLICATION HEADER.
  27. * SEND REG/CP SM TO THE SPECIFIC COUPLER IF PARAMS1 IS NON-ZERO,
  28. * OTHERWISE, TO ALL ACTIVE COUPLERS.
  29. *
  30. * 4. ENTRY PARAMETERS
  31. * PARAMS1 COUPLER NODE
  32. * FOR ALL ACTIVE COUPLERS, PARAMS1 IS ZERO.
  33. * PARAMS2 NETWORK BLOCK HEADER ADDRESS
  34. *
  35. * 5. EXIT PARAMETERS
  36. * PARAMS1 SET TO 1 IF NETWORK HEADER IS GARBLED.
  37. *
  38. * 6. COMDECKS CALLED
  39. * AHEADER
  40. * NBT
  41. * NIPDEF
  42. * PARAMS
  43. * SUPMSG
  44. *
  45. * 7. ROUTINES AND OVERLAYS CALLED
  46. * MGETS GET BUFFER SPACE
  47. * NLOBCH LINK MESSAGE TO PIP OUTBOUND CHAIN
  48. * MRELS RELEASE BUFFER
  49. * XTRACE TRACE CALLS
  50. *
  51. * 8. DAYFILE MESSAGES
  52. * NONE
  53. *
  54. * THIS PROGRAM IS A SECONDARY OVERLAY LOADED BY SUBROUTINE
  55. * OVLCALL. WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO
  56. * LOCATION RJMAIN TO RETURN TO THE CALLING PROGRAM.
  57. *
  58. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  59. *CALL OSSIZE
  60. *
  61. * THIS OVERLAY IS CALLED BY HPNONSA,NPREGCP,NPREGST.
  62. *
  63.  #
  64. STOPIMS;
  65.  
  66. #
  67. **** EXTERNAL ENTRY POINTS
  68. #
  69.  
  70. XREF
  71. BEGIN
  72. PROC MGETS; # GET BUFFER SPACE #
  73. PROC NLOBCH; # LINK MESSAGE TO PIP OUTBOUND CHAIN #
  74. PROC MRELS ;
  75. PROC XTRACE; # TRACE CALLS #
  76. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  77. END
  78.  
  79. #
  80. * LOCAL VARIABLES
  81. #
  82.  
  83. ITEM BUFADR; # BUFFER ADDRESS #
  84. ITEM RESPONSE; # RESPONSE INDICATOR #
  85. ITEM ERROR; # ERROR INDICATOR #
  86. ITEM HNODE; # COUPLER NODE NUMBER #
  87. ITEM CNODE; # COUPLER NODE #
  88. ITEM I; # LOOP CONTROL VARIABLE #
  89. LABEL EXIT; # EXIT FROM PROGRAM #
  90.  
  91. #*********************************************************************#
  92.  
  93.  
  94.  
  95.  
  96.  
  97. BEGIN # NCREGCP #
  98. CONTROL IFEQ DEBUG,1;
  99. XTRACE("NCRCP") ;
  100. CONTROL FI;
  101.  
  102. CNODE = PARAMS1; # COUPLER NODE #
  103. RESPONSE = PARAMS2; # REG/CP RESPONSE INDICATOR #
  104. FOR I = 0 STEP NBTFETNO UNTIL NBTMAXID
  105. DO # SEND REG/CP(S) TO COUPLER(S) #
  106. BEGIN
  107. IF CNODE NQ 0
  108. THEN # SEND REG/CP TO SPECIFIC COUPLER #
  109. BEGIN
  110. HNODE = CNODE; # NODE NUMBER OF COUPLER #
  111. I = NBTMAXID; # SEND ONLY ONE REG/CP #
  112. END
  113.  
  114. ELSE # SEND REG/CP TO ALL ACTIVE COUPLERS #
  115. BEGIN
  116. IF NBTIUF[I]
  117. THEN # NBT IN USE, COUPLER IS ACTIVE #
  118. HNODE = NBTHN[I];
  119. ELSE # NBT NOT IN USE, CONTINUE SCAN #
  120. TEST I; # SKIP FOLLOWING EXECUTABLE CODE #
  121. END
  122.  
  123. # GET BUFFER FOR REG/CP #
  124.  
  125. MGETS(DBHSIZE+ABHSIZE+LREG,BUFADR,TRUE);
  126.  
  127. # FORMAT ABH FOR REG/CP #
  128.  
  129. P<AHEADER> = BUFADR+DBHSIZE;
  130. ABHABT[0] = APPSUP;
  131. ABHDN[0] = HNODE;
  132. ABHSN[0] = HNODE;
  133. ABHBT[0] = NETCMD;
  134. ABHACT[0] = CT8ASCII;
  135. ABHTLC[0] = NREGCP;
  136.  
  137. # FORMAT REG/CP SM TEXT #
  138.  
  139. P<SUPMSG> = BUFADR+DBHSIZE+ABHSIZE;
  140. PFCSFC[0] = REGCP;
  141. P<SMNIP> = P<SUPMSG>;
  142. IF RESPONSE NQ 0
  143. THEN # SEND REG/CP RESPONSE TO PIP #
  144. REGR[0] = TRUE;
  145. ELSE # SEND UNSOLICITED REG/CP TO INFORM NS/CS/BUFL #
  146. BEGIN
  147. IF PROCAN[NSORD] NQ 0
  148. THEN # NS IS AVAILABLE IN THIS HOST #
  149. REGN[0] = TRUE;
  150. IF PROCAN[CSORD] NQ 0
  151. THEN # CS IS AVAILABLE IN THIS HOST #
  152. REGC[0] = TRUE;
  153. REGB[0] = HRL; # RETURN HOST REGULATION LEVEL #
  154. END
  155.  
  156. NLOBCH(BUFADR,ERROR); # SEND REG/CP TO PIP #
  157.  
  158. IF ERROR NQ 0
  159. THEN # REG/CP CANNOT BE SENT #
  160. MRELS(BUFADR); # RELEASE REG/CP BUFFER #
  161.  
  162. END # END I FOR LOOP #
  163. EXIT:
  164. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  165.  
  166. END # NCREGCP #
  167.  
  168. TERM
cdc/nos2.source/nam5871/ncregcp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator