User Tools

Site Tools


cdc:nos2.source:nam5871:knammod

KNAMMOD

Table Of Contents

  • [00011] PRGM KNAMMOD
  • [00055] PROC XTRACE
  • [00056] PROC BLINK
  • [00057] PROC OSCHAPP
  • [00058] PROC OVLCALL
  • [00059] PROC MGETS
  • [00127] PROC KSEND(KCODE,KL,BUF)
  • [00170] PROC KGET(KCODE,KL,BUF)
  • [00190] PROC KFACB

Source Code

KNAMMOD.txt
  1. *DECK KNAMMOD
  2. USETEXT NIPDEF
  3. USETEXT OVERLAY
  4. USETEXT PARAMS
  5. USETEXT PT
  6. USETEXT AT
  7. USETEXT ACB
  8. USETEXT AHEADER
  9. USETEXT SUPMSG
  10. USETEXT KDIS
  11. PRGM KNAMMOD ; # EXECUTE K-DISPLAY NAM-MOD COMMANDS #
  12. STARTIMS;
  13. #
  14. *1DC KNAMMOD
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * KNAMMOD A. BEN-ARTZI 82/03/01
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION
  20. * EXECUTE K-DISPLAY NAM-MODE COMMANDS.
  21. *
  22. * 3. METHOD USED
  23. * SWITCH ON COMMAND TYPE
  24. * FIND APPLICATION NUMBER IF COMMAND IS FOR A SPECIFIC
  25. * APPLICATION.
  26. * FORMAT HOP COMMAND
  27. *
  28. * 4. ENTRY PARAMETERS
  29. * PARAMS6 - APPLICATION NAME
  30. *
  31. * 5. EXIT PARAMETERS
  32. * PARAMS7 - ERROR FLAG
  33. *
  34. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  35. * NIPDEF PARAMS PT AT
  36. * ACB AHEADER SUPMSG
  37. *
  38. * 7. ROUTINES AND OVERLAYS CALLED
  39. * BLINK - LINK MESSAGE ON DATA RING
  40. * MGETS - ALLOCATE BUFFER
  41. * OSCHAPP - SCHEDULE APPLICATION
  42. * XTRACE - TRACE PROCEDURE CALL
  43. *
  44. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  45. * THIS SECONDARY OVERLAY IS CALLED BY KPTYPIN.
  46. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  47. *CALL OSSIZE
  48.  #
  49. STOPIMS ;
  50. #
  51.   EXTERNAL REFS
  52. #
  53. XREF
  54. BEGIN
  55. PROC XTRACE ;
  56. PROC BLINK ;
  57. PROC OSCHAPP;
  58. PROC OVLCALL ;
  59. PROC MGETS ;
  60. LABEL RJMAIN ;
  61. END
  62. #
  63.   INTERNAL VARIABLES
  64. #
  65. SWITCH KLAB:NCT # STATUS SWITCH FOR K DISPLAY COMMAND #
  66. KDB:CMD$DB,
  67. KDE:CMD$DE,
  68. KDU:CMD$DU,
  69. KLE:CMD$LE,
  70. KRS:CMD$RS,
  71. KLB:CMD$LB,
  72. KLR:CMD$LR;
  73.  
  74. ITEM KAPNO ;
  75. ITEM BUFADDR ;
  76. ITEM ACBADDR ;
  77. ITEM KINDEX ;
  78.  
  79. BEGIN
  80. CONTROL IFEQ DEBUG,1 ;
  81. XTRACE("KNAMD") ;
  82. CONTROL FI ;
  83.  
  84. PARAMS7 = 0 ; # INITIAL NO-ERROR STATE #
  85. GOTO KLAB[PARAMS3] ;
  86. # #
  87. KDU: BEGIN
  88. KSEND(HOPDU,LHOPDU,BUFADDR);
  89. GOTO KEXIT ;
  90. END
  91. # #
  92. KDB: BEGIN
  93. KSEND(HOPDB,LHOPDB,BUFADDR);
  94. GOTO KEXIT ;
  95. END
  96. # #
  97. KDE: BEGIN
  98. KSEND(HOPDE,LHOPDE,BUFADDR);
  99. GOTO KEXIT ;
  100. END
  101. # #
  102. KLE: BEGIN
  103. KSEND(HOPNOTR,LHOPNTR,BUFADDR);
  104. GOTO KEXIT ;
  105. END
  106. # #
  107. KRS: BEGIN
  108. KSEND(HOPRS,LHOPRS,BUFADDR);
  109. GOTO KEXIT ;
  110. END
  111. # #
  112. KLB: BEGIN
  113. KSEND(HOPTRCE,LHOPTRA,BUFADDR);
  114. GOTO KEXIT ;
  115. END
  116. # #
  117. KLR: BEGIN
  118. KSEND(HOPREL,LHOPREL,BUFADDR);
  119. GOTO KEXIT ;
  120. END
  121.  
  122. KEXIT: GOTO RJMAIN ;
  123.  
  124. #
  125.   ----------------------
  126. #
  127. PROC KSEND(KCODE,KL,BUF);
  128. ITEM KL U;
  129. ITEM KCODE U;
  130. ITEM BUF U;
  131. BEGIN
  132. IF PARAMS6 EQ " "
  133. THEN
  134. PARAMS7 = 5 ;
  135. ELSE
  136. BEGIN
  137. IF PARAMS6 NQ "ALL"
  138. THEN # IT IS A SPECIFIC APPLICATION #
  139. BEGIN
  140. KFACB; # TRY TO GET ITS APP NUMBER #
  141. IF KAPNO NQ 0
  142. THEN # OK WE FOUND IT #
  143. BEGIN
  144. KGET (KCODE,KL,BUF);
  145. BLINK(BUF,ATACBA[KAPNO]);
  146. OSCHAPP(ATACBA[KAPNO]);
  147. END
  148. ELSE # NO SUCH APPLICATION ON NETWORK#
  149. PARAMS7 = 3 ;
  150. END
  151. ELSE # WE SEND TO ALL APPS ON NETWORK#
  152. BEGIN
  153. FOR KINDEX = 1 STEP 1 UNTIL ATHAN[0] DO
  154. BEGIN
  155. IF ATACBA[KINDEX] NQ 0
  156. THEN
  157. BEGIN
  158. KGET(KCODE,KL,BUF);
  159. BLINK(BUF,ATACBA[KINDEX]);
  160. OSCHAPP(ATACBA[KINDEX]);
  161. END
  162. END
  163. END
  164. END
  165. RETURN;
  166. END
  167. #
  168.   --------------------
  169. #
  170. PROC KGET(KCODE,KL,BUF);
  171. ITEM KCODE U;
  172. ITEM KL U;
  173. ITEM BUF U;
  174. BEGIN
  175. MGETS(KL+BLKHSIZE+ABHSIZE,BUF,TRUE);
  176. P<SUPMSG>=BUF+BLKHSIZE+ABHSIZE;
  177. P<AHEADER> = BUF+BLKHSIZE;# BASE APPLICATION HEADER #
  178. PFCSFC[0] = KCODE ; # SET FUNCTION CODE #
  179. # #
  180. ABHTLC[0]=KL; # LENGTH OF MESSAGE #
  181. ABHABT[0]=APPCMD; # THIS IS A COMMAND BLOCK #
  182. ABHACT[0]=CT60TRANS; #CHARACTER TYPE #
  183. ABHABN[0]=0;
  184. ABHADR[0]=0;
  185. RETURN;
  186. END
  187. #
  188.   -----------------------
  189. #
  190. PROC KFACB;
  191. BEGIN
  192. #
  193.   LET-S GET ACB AND APPLICATION NUMBER
  194. #
  195. BEGIN
  196. KAPNO=0;
  197. IF PARAMS6 EQ "CS"
  198. THEN
  199. BEGIN
  200. KAPNO = PROCAN[CSORD]; # SET AN FROM PT COMMON #
  201. END
  202. ELSE
  203. BEGIN
  204. IF PARAMS6 EQ "NVF"
  205. THEN
  206. BEGIN
  207. KAPNO=NVFAN ;
  208. END
  209. ELSE
  210. BEGIN
  211. IF PARAMS6 EQ "NS"
  212. THEN
  213. BEGIN
  214. KAPNO = PROCAN[NSORD]; # SET AN FROM PT COMMON #
  215. END
  216. ELSE
  217. BEGIN # NOT CS NS OR NVF. TRY LOOK AT ALL ACB-S #
  218. FOR KINDEX = NVFAN+1 STEP 1 WHILE (KINDEX LQ ATHAN[0] AND
  219. KAPNO EQ 0) DO
  220. BEGIN
  221. ACBADDR = ATACBA[KINDEX];
  222. IF ( ACBADDR NQ 0 )
  223. THEN
  224. BEGIN
  225. P<ACB> = ACBADDR;
  226. IF PARAMS6 EQ ACBANAME[0]
  227. THEN
  228. KAPNO = ACBAN[0];
  229. END
  230. END
  231. END
  232. END
  233. END
  234. END
  235. RETURN;
  236. END
  237. END # MAIN #
  238. TERM
cdc/nos2.source/nam5871/knammod.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator