User Tools

Site Tools


cdc:nos2.source:nam5871:hpkdisp

HPKDISP

Table Of Contents

  • [00013] PRGM HPKDISP
  • [00073] PROC CONSOL
  • [00074] PROC XTRACE
  • [00075] PROC OMSG
  • [00076] PROC MGETS
  • [00077] PROC BLINK
  • [00078] PROC OSCHAPP
  • [00079] PROC OVLCALL

Source Code

HPKDISP.txt
  1. *DECK HPKDISP
  2. USETEXT ACB
  3. USETEXT NIPDEF
  4. USETEXT AT
  5. USETEXT PT
  6. USETEXT KDIS
  7. USETEXT DISTAIL
  8. USETEXT SUPMSG
  9. USETEXT AHEADER
  10. USETEXT OVERLAY
  11. USETEXT PARAMS
  12. USETEXT APPSTAT
  13. PRGM HPKDISP;
  14. STARTIMS;
  15. #
  16. *1DC HPKDISP
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * HPKDISP A. BEN-ARTZI 81/12/08
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION
  22. * PROCESS THE HOP SUPERVISORY MESSAGES COMING FROM APPLICATIONS.
  23. *
  24. * 3. METHOD USED
  25. * DECODE THE SFC FROM THE NWLENTRY.
  26. * SET UP CORRECT COMMON FIELDS IF ALERT.
  27. * CALL OMSG IF "LG"
  28. * CALL OVERLAY KHOPDIS FOR HOP/DIS.
  29. *
  30. * 4. ENTRY PARAMETERS
  31. * WLADDR - NWL ENTRY ADDRESS
  32. * ACBADDR - ADDRESS OF APPLICATION ACB
  33. *
  34. * 5. EXIT PARAMETERS
  35. * OVLNAME - KHOPDIS OVL NAME IF APPROPRIATE
  36. *
  37. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  38. * NIPDEF KDIS DISTAIL SUPMSG
  39. * AHEADER ACB OVERLAY APPSTAT
  40. * AT PT PARAMS
  41. *
  42. * 7. ROUTINES AND OVERLAYS CALLED
  43. * CONSOL - EXECUTE NOS CONSOLE MACRO
  44. * MGETS - ALLOCATE BUFFER
  45. * XTRACE - TRACE PROCEDURE CALL
  46. * OMSG - ISSUE DAYFILE MESSAGE
  47. * KHOPDIS OVL PROCESS HOP/DIS
  48. * BLINK - LINK MESSAGE ON DATA RING
  49. * OSCHAPP - SCHEDULE APPLICATION
  50. * HLGLERR OVL ISSUE ERR/LGL
  51. *
  52. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  53. * MESSAGES SENT BY APPLICATION WITH HOP/LG
  54. *
  55. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  56. * WHEN EXECUTION HAS COMPLETED A JUMP IS MADE TO LOCATION RJMAIN
  57. * TO RETURN TO THE CALLING PROGRAM.
  58. *
  59. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  60. *CALL OPSIZE
  61. *
  62. * THIS OVERLAY IS CALLED BY HPPUT.
  63. *
  64. *
  65.  #
  66. STOPIMS;
  67. #
  68.   EXTERNAL VARIABLES
  69. #
  70. XREF
  71. BEGIN
  72. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  73. PROC CONSOL; # EXECUTE CONSOLE MACRO #
  74. PROC XTRACE;
  75. PROC OMSG; # PUT A MESSAGE IN NIP-S DAYFILE #
  76. PROC MGETS;
  77. PROC BLINK;
  78. PROC OSCHAPP;
  79. PROC OVLCALL;
  80. END
  81. ARRAY KREQU S(3);
  82. BEGIN
  83. ITEM KREQ C(0,0,20) = ["$REQUEST *K* DISPLAY"] ;
  84. ITEM KREQEND U(2,0,60) = [0] ;
  85. END
  86. BASED ARRAY LGMSG S(1) ;
  87. BEGIN
  88. ITEM LGMSGWD U(0,0,60) ;
  89. END
  90. ITEM BUFADDR U ; # ADDR OF MGET BUFFER #
  91. SWITCH KLAB K1,K2,K3,K4,K5 ;
  92. BEGIN
  93. CONTROL IFEQ DEBUG,1;
  94. XTRACE("HPKDS");
  95. CONTROL FI;
  96. #**********************************************************************#
  97. #
  98.   LET-S PUT OURSELVES ON RELEVANT DATA
  99. #
  100. P<SUPMSG> = WLADDR + AIPHSIZE + ABHSIZE ;
  101. P<ACB> = ACBADDR;
  102. # #
  103. IF SFC[0] EQ ALT
  104. THEN
  105. BEGIN # WE HAVE A HOP/ALERT SM IN HAND #
  106. # #
  107. IF KDNAL EQ 5 # NO ROOM FOR MORE ALERTS #
  108. OR
  109. ACBAN[0] EQ KDAN[0] # THIS APP IS PROCESSED RIGHT NOW #
  110. OR
  111. ACBAN[0] EQ KDALAN1[0] OR#APPLICATION IS ALREADY IN ALERT Q #
  112. ACBAN[0] EQ KDALAN2[0] OR
  113. ACBAN[0] EQ KDALAN3[0] OR
  114. ACBAN[0] EQ KDALAN4[0] OR
  115. ACBAN[0] EQ KDALAN5[0]
  116. # #
  117. THEN # JUST IGNORE IT #
  118. GOTO EXIT ;
  119. ELSE
  120. BEGIN
  121. P<AT> = PTAT[0]; # ADDRESS OF AT #
  122. IF ATI[ACBAN[0]]
  123. THEN
  124. BEGIN # THIS APP IS NOT ALLOWED FOR ALERTS NOW #
  125. #
  126.   WE SEND THE APPLICATION ONE MORE HOP/IGNORE
  127. #
  128. MGETS(LHOPIG+BLKHSIZE+ABHSIZE); # GET A BLOCK #
  129. #
  130.   FILL IMPORTANT FIELDS
  131. #
  132. P<AHEADER> = BUFADDR+BLKHSIZE;
  133. ABHABT[0]=APPCMD;
  134. ABHACT[0]=CT60TRANS;
  135. ABHABN[0]=0;
  136. ABHADR[0]=0;
  137. ABHTLC[0]=LHOPIG;
  138. P<SUPMSG> = BUFADDR+BLKHSIZE+ABHSIZE;
  139. PFCSFC[0] = HOPIG;
  140. #
  141.   AND SEND IT TO APPLICATION
  142. #
  143. BLINK(BUFADDR,ACBADDR) ;
  144. OSCHAPP(ACBADDR) ;
  145. GOTO EXIT;
  146. END
  147. ELSE
  148. #
  149.   OK. NOW WE ARE READY TO ACCEPT THE ALERT
  150. #
  151. BEGIN
  152. KDNAL[0] = KDNAL[0]+1;
  153. IF NOT KDVW[0]
  154. THEN
  155. OMSG(KREQU,2); # PUT A MESSAGE ON THE B-DISPLAY #
  156. # #
  157. GOTO KLAB[KDNAL[0]-1] ; # TO PUT INFO ABOUT THE ALERT #
  158. END
  159. # #
  160. K1: KDALAN1[0]=ACBAN[0]; # APP. NUMBER IN ALERT LIST #
  161. KAPALT1[0]=ACBANAME[0];# APPL NAME IN DISTAIL BUFFER #
  162. GOTO EXIT ;
  163. # #
  164. K2: KDALAN2[0]=ACBAN[0];
  165. KAPALT2[0]=ACBANAME[0];
  166. GOTO EXIT ;
  167. # #
  168. K3: KDALAN3[0]=ACBAN[0];
  169. KAPALT3[0]=ACBANAME[0];
  170. GOTO EXIT ;
  171. # #
  172. K4: KDALAN4[0]=ACBAN[0];
  173. KAPALT4[0]=ACBANAME[0];
  174. GOTO EXIT ;
  175. # #
  176. K5: KDALAN5[0]=ACBAN[0];
  177. KAPALT5[0]=ACBANAME[0];
  178. GOTO EXIT ;
  179. # #
  180. END
  181. END # END HOP/ALERT PROCESSING #
  182. ELSE
  183. BEGIN
  184. IF SFC[0] EQ LG
  185. THEN
  186. BEGIN # THIS IS A HOP/LG FOR NAM DAYFILE #
  187. P<LGMSG> = WLADDR+AIPHSIZE+ABHSIZE + 1 ;
  188. OMSG(LGMSG,0) ;
  189. GOTO EXIT ;
  190. END
  191. # #
  192. ELSE # NOT HOP/LOG EITHER #
  193. BEGIN
  194. IF KDAN[0] NQ ACBAN[0]
  195. THEN # K-DISPLAY IS NOT ASSIGNED TO THIS APP #
  196. BEGIN
  197. GOTO EXIT; # IGNORE SUPERVISORY MESSAGE #
  198. END
  199. ELSE # K-DISPLAY IS ASSIGNED TO THIS APP #
  200. BEGIN
  201. IF SFC[0] EQ DIS
  202. THEN # THIS IS A HOP/DIS SUPERVISORY MESSAGE #
  203. BEGIN
  204. #
  205.   PROCESS HOP/DIS SUPERVISORY MESSAGE
  206. #
  207. OVLNAME = KHOPDISP; # NAME OF OVERLAY TO LOAD #
  208. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  209. IF PARAMS1 NQ 0
  210. THEN # BAD HOP/DIS SUPERVISORY MESSAGE #
  211. BEGIN
  212. OVLNAME = HLGLERRP; # NAME OF OVERLAY TO LOAD #
  213. OVLCALL; # LOAD AND EXECUTE OVERLAY #
  214. END
  215. END # END HOP/DIS PROCESSING #
  216. ELSE # NOT HOP/DIS SUPERVISORY MESSAGE #
  217. BEGIN
  218. #
  219.   PROCESS HOP/DAY SUPERVISORY MESSAGE
  220. #
  221. KDDAYF[0] = NOT HOPDAYF[0]; # UPDATE DAYFILING TYPIN FLG#
  222. CONSOL(KDWDCON); # EXECUTE CONSOLE MACRO #
  223. END
  224. END
  225. END
  226. END
  227. EXIT: GOTO RJMAIN ;
  228. END # HPKDISP OVERLAY #
  229. TERM
cdc/nos2.source/nam5871/hpkdisp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator