User Tools

Site Tools


cdc:nos2.source:nam5871:hpshisd

HPSHISD

Table Of Contents

  • [00011] PRGM HPSHISD
  • [00058] PROC ABORT
  • [00059] PROC BLINK
  • [00060] PROC MGETS
  • [00061] PROC OSCHAPP

Source Code

HPSHISD.txt
  1. *DECK HPSHISD
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT AT
  5. USETEXT AHEADER
  6. USETEXT APPSTAT
  7. USETEXT MSGIDX
  8. USETEXT PARAMS
  9. USETEXT PT
  10. USETEXT SUPMSG
  11. PRGM HPSHISD ;
  12. STARTIMS ;
  13. #
  14. *1DC HPSHISD
  15. * 1. PROC NAME AUTHOR DATE
  16. * HPSHISD L.T.NGUYEN 82/03/02
  17. *
  18. * 2. FUNCTIONAL DESCRIPTION :
  19. * SEND THE SHUT/INS SM TO ALL APPLICATIONS OR TO A SPECIFIED
  20. * APPLICATION.
  21. *
  22. * 3. METHOD:
  23. * - TO ALL APPLICATIONS ( SHISAN IS ZERO )
  24. * LOOP THROUGH THE AT AND FORM SHUT/INS SM FOR APPL.
  25. * EXCEPT NVF APPLICATION.
  26. * - TO A SPECIFIED APPLICATION ( SHISAN IS THE APPL. NUMBER)
  27. * USING SHISAN AS INDEX INTO AT. FORM AND SEND SHUT/INS SM.
  28. *
  29. * 4. INPUT PARAMS :
  30. * PARAMS1 - ADDRESS OF SHUTDOWN MESSAGE FROM NVF
  31. *
  32. * 5. OUTPUT PARAMS :
  33. * NONE.
  34. *
  35. * 6. COMDECKS CALLED
  36. * NIPDEF ACB AT
  37. * AHEADER APPSTAT MSGIDX
  38. * PARAMS PT SUPMSG
  39. * OSSIZE
  40. *
  41. * 7. ROUTINES CALLED
  42. * ABORT - ABORT NIP
  43. * MGETS - TO GET BUFFER FOR SM.
  44. * BLINK - LINK SM TO ACB
  45. * OSCHAPP - SCHEDULE THE APPLICATION
  46. *
  47. * 8.DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  48. * "SH/ISD ON NON-EXISTENT AN "
  49. * THIS IS A SECONDARY OVERLAY CALLED BY HPPUT.
  50. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  51. *CALL OSSIZE
  52. *
  53. *
  54.  #
  55. STOPIMS ;
  56. XREF
  57. BEGIN
  58. PROC ABORT ;
  59. PROC BLINK ; # LINK SM TO ACB #
  60. PROC MGETS ; # GET BUFFER FOR SM #
  61. PROC OSCHAPP ; # SCHEDULE THE APPLICATION #
  62. LABEL RJMAIN ;
  63. END
  64.  
  65.  
  66. ITEM I ;
  67. ITEM IMSHUTD B ; # IMMEDIATE SHUT DOWN FLAG #
  68. ITEM SMADDR ; # ADDRESS OF SM #
  69.  
  70. BEGIN # HPSHISD #
  71. P<SUPMSG> = PARAMS1 + BLKHSIZE + ABHSIZE ; # SH/ISD SM #
  72. P<SMNVF> = P<SUPMSG> ;
  73. IF SHISF[0]
  74. THEN
  75. IMSHUTD = TRUE ; # IMMEDIATE SHUT DOWN #
  76. ELSE
  77. IMSHUTD = FALSE ; # GRADUATE SHUT DOWN #
  78.  
  79. IF SHISAN[0] EQ 0
  80. THEN
  81. BEGIN # SEND SHUT/INSD SM TO ALL #
  82. FOR I = ATHSIZE + 1 STEP 1 UNTIL ATHAN[0]
  83. DO
  84. BEGIN # LOOP THROUGH AT TO ALL ACB #
  85. P<ACB> = ATACBA[I] ; # ACB ADDRESS #
  86. IF P<ACB> NQ 0 AND NOT ATNVFN[I] AND NOT ATNVFF[I]
  87. THEN
  88. BEGIN # NONE ZERO ACB ADDRESS #
  89. MGETS(LSHUT + BLKHSIZE + ABHSIZE, SMADDR,TRUE) ;
  90. #
  91.   SET UP APPLICATION BLOCK HEADER
  92. #
  93. P<AHEADER> = SMADDR + BLKHSIZE ;
  94. ABHABT[0] = APPCMD ;
  95. ABHACT[0] = CT60TRANS ;
  96. ABHTLC[0] = LSHUT ;
  97. #
  98.   SET UP THE SUPERVISORY MESSAGE
  99. #
  100. P<SUPMSG> = SMADDR + BLKHSIZE + ABHSIZE ;
  101. PFCSFC[0] = SHUINS ;
  102. SHUTF[0] = IMSHUTD ;
  103.  
  104. BLINK(SMADDR,P<ACB>) ;
  105. OSCHAPP(P<ACB>) ;
  106.  
  107. END # NONE ZERO ACB ADDRESS #
  108. END # LOOP THROUGH AT TO ALL ACB #
  109. SHUTDOWN = TRUE ; # SHUTTING DOWN NETWORK #
  110. END # SEND SHUT/INSD TO ALL APPLS #
  111. ELSE
  112. BEGIN # SEND TO SPECIFIED APPLICATION #
  113.  
  114. P<ACB> = ATACBA[SHISAN[0]] ; # APPL. CONTROL BLOCK #
  115. IF P<ACB> NQ 0
  116. THEN
  117. BEGIN
  118. IF NOT ATNVFN[SHISAN[0]] AND NOT ATNVFF[SHISAN[0]]
  119. THEN
  120. BEGIN
  121. IF (ACBORD0[0]) # THIS APPLICATION ALREADY SENT #
  122. # SAC/NCL TO SET ERROR CONDITION#
  123. THEN # FOR SHI/SD/SM #
  124. BEGIN
  125. ACBABTSH[0] = TRUE ; # READY TO ABORT THIS APPL #
  126. # AND DONT QUEUE ANY SM #
  127. GOTO RJMAIN ;
  128. END
  129. MGETS(LSHUT + BLKHSIZE + ABHSIZE,SMADDR,TRUE) ;
  130. P<AHEADER> = SMADDR + BLKHSIZE ;
  131. ABHABT[0] = APPCMD ;
  132. ABHACT[0] = CT60TRANS ;
  133. ABHTLC[0] = LSHUT ;
  134.  
  135. P<SUPMSG> = SMADDR + BLKHSIZE + ABHSIZE ;
  136. PFCSFC[0] = SHUINS ;
  137. SHUTF[0] = IMSHUTD ;
  138.  
  139. BLINK(SMADDR,P<ACB>) ;
  140. OSCHAPP(P<ACB>) ;
  141. END
  142. END
  143. ELSE
  144. BEGIN # SHUT DOWN RECEIVED ON NON-EX #
  145. D16AN = SHISAN ; # NON-EXISTENCE AN #
  146. ABORT(DFMSG16,0) ; # ABORT WITH DAYFILE MESSGAE #
  147. END # SHUT DOWN ON NON-EXISTENCE AN #
  148.  
  149. END # SEND TO SPECIFIED APPLICATION #
  150.  
  151. GOTO RJMAIN ;
  152.  
  153. END
  154. TERM
cdc/nos2.source/nam5871/hpshisd.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator