User Tools

Site Tools


cdc:nos2.source:nam5871:kapigp

KAPIGP

Table Of Contents

  • [00012] PRGM KAPIGP
  • [00058] PROC MGETS
  • [00059] PROC BLINK
  • [00060] PROC KPUT
  • [00061] PROC OSCHAPP
  • [00062] PROC XTRACE
  • [00221] PROC KGET(KCODE,KL,BUF)
  • [00241] PROC KFACB

Source Code

KAPIGP.txt
  1. *DECK KAPIGP
  2. USETEXT NIPDEF
  3. USETEXT PARAMS
  4. USETEXT AHEADER
  5. USETEXT PT
  6. USETEXT AT
  7. USETEXT ACB
  8. USETEXT KDIS
  9. USETEXT KHDRX
  10. USETEXT DISTAIL
  11. USETEXT SUPMSG
  12. PRGM KAPIGP ;
  13. STARTIMS;
  14. #
  15. *1DC KAPIGP
  16. *
  17. * 1. PROC NAME AUTHOR DATE
  18. * KAPIGP A. BEN-ARTZI 82/03/01
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION
  21. * PROCESS K-DISPLAY "AP" AND "IG" COMMAND.
  22. *
  23. * 3. METHOD USED
  24. * FOR "AP" COMMAND - FORMAT A HOP/START
  25. * FOR "IG" COMMAND - FORMAT A HOP/IG
  26. *
  27. * 4. ENTRY PARAMETERS
  28. * PARAMS2 - INDICATE TYPE OF COMMAND
  29. * PARAMS6 - APPLICATION NAME FROM COMMAND IF SPECIFIED
  30. *
  31. * 5. EXIT PARAMETERS
  32. * PARAMS7 - ERROR CODE
  33. *
  34. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  35. * NIPDEF PARAMS AHEADER
  36. * PT AT ACB
  37. * KDIS DISTAIL SUPMSG
  38. * OSSIZE
  39. *
  40. * 7. ROUTINES AND OVERLAYS CALLED
  41. * BLINK - LINK MESSAGE ON DATA RING
  42. * KPUT - K-DISPLAY DYNAMIC UPDATE INTERFACE
  43. * MGETS - ALLOCATE BUFFER
  44. * OSCHAPP - SCHEDULE APPLICATION
  45. * XTRACE - TRACE PROCEDURE CALL
  46. *
  47. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  48. * THIS IS A SECONDARY OVERLAY CALLED BY KPTYPIN.
  49. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  50. *CALL OSSIZE
  51.  #
  52. STOPIMS;
  53. #
  54.   EXTERNAL REFERENCES
  55. #
  56. XREF
  57. BEGIN
  58. PROC MGETS ;
  59. PROC BLINK ;
  60. PROC KPUT ;
  61. PROC OSCHAPP;
  62. PROC XTRACE ;
  63. LABEL RJMAIN;
  64. END
  65. #
  66.   INTERNAL VARIABLES
  67. #
  68. ITEM ACBADDR ;
  69. ITEM BUFADDR ;
  70. ITEM KAPNO ;
  71. ITEM KWHERE ;
  72. ITEM KINDEX ;
  73.  
  74. SWITCH KN DM,KA,KB,KC,KD,KE ;
  75.  
  76. BASED ARRAY KALTNR [1:1] S(1) ;
  77. BEGIN
  78. ITEM KALTN C(0,0,7) ;
  79. END
  80.  
  81. BASED ARRAY HOPBASE S(1);
  82. BEGIN
  83. ITEM HOPLEFT U(0,36,12); # LEFT PAGE SIZE FIELD OF HOP/START #
  84. ITEM HOPRIGHT U(0,48,12); # RIGHT PAGE SIZE FIELD OF HOP/START#
  85. END
  86.  
  87. BEGIN
  88. CONTROL IFEQ DEBUG,1 ;
  89. XTRACE("KAPIG") ;
  90. CONTROL FI ;
  91.  
  92. BEGIN
  93. PARAMS7 = 0 ; # INITIAL NO ERROR STATE #
  94. IF PARAMS6 EQ " "
  95. THEN
  96. BEGIN
  97. IF KDNAL[0] EQ 0
  98. THEN
  99. BEGIN
  100. PARAMS7 = 1 ;
  101. GOTO KEXIT ;
  102. END
  103. ELSE
  104. BEGIN
  105. PARAMS6 = KAPALT1[0];
  106. KDALAN1[0]=KDALAN2[0];
  107. KDALAN2[0]=KDALAN3[0];
  108. KDALAN3[0]=KDALAN4[0];
  109. KDALAN4[0]=KDALAN5[0];
  110. KDALAN5[0]=0;
  111. KDNAL[0] = KDNAL[0] - 1;
  112. KAPALT1[0]=KAPALT2[0];
  113. KAPALT2[0]=KAPALT3[0];
  114. KAPALT3[0]=KAPALT4[0];
  115. KAPALT4[0]=KAPALT5[0];
  116. KAPALT5[0]=" ";
  117. END
  118. END
  119. ELSE
  120. BEGIN
  121. # NOW CHECK FOR THIS NAME IN ALERT Q LISTING #
  122. KWHERE = 0;
  123. P<KALTNR> = LOC(KAPALT1[0]);
  124. FOR KINDEX=1 STEP 1 WHILE KWHERE EQ 0 AND KINDEX LQ KMAXALT DO
  125. BEGIN
  126. IF KALTN[KINDEX] EQ PARAMS6
  127. THEN
  128. KWHERE = KINDEX ;
  129. END
  130. #
  131.   WE HAVE NOW IN KWHERE THE SEQ NO OF ALERT (OR 0)
  132. #
  133. IF KWHERE NQ 0 # START SHIFTING THEM ALL #
  134. THEN
  135. BEGIN
  136. FOR KINDEX = KWHERE STEP 1 UNTIL KMAXALT-1 DO
  137. BEGIN
  138. KALTN[KINDEX] = KALTN[KINDEX+1];
  139. END
  140. KAPALT5[0] = " " ;
  141. GOTO KN[KWHERE];
  142. DM: ; # DUMMY ENTRY #
  143. KA: KDALAN1[0] = KDALAN2[0];
  144. KB: KDALAN2[0] = KDALAN3[0];
  145. KC: KDALAN3[0] = KDALAN4[0];
  146. KD: KDALAN4[0] = KDALAN5[0];
  147. KE: KDALAN5[0] = 0 ;
  148. KDNAL[0] = KDNAL[0] -1;
  149. END
  150. END
  151. #
  152.   NOW LET S GET APPLICATION NUMBER IF ANY
  153. #
  154. KFACB;
  155. IF KAPNO NQ 0
  156. THEN
  157. BEGIN
  158. IF NOT ATK[KAPNO] # APPLICATION NOT ALLOWED FOR K-DISPLAY#
  159. THEN
  160. BEGIN
  161. PARAMS7 = 2 ;
  162. GOTO KEXIT ;
  163. END
  164. ELSE
  165. BEGIN
  166. IF PARAMS2 EQ 0 # THIS IS A -AP- TYPE-IN #
  167. THEN # WE HAVE THE APPLICATION WE WANT START WORKING #
  168. # WITH #
  169. BEGIN
  170. PARAMS4 = KAPNO ;
  171. ATI[KAPNO]=FALSE ;# IN CASE OF A FORMER IGNORE #
  172. #
  173.   BUILD THE HOP/START BLOCK
  174. #
  175. KGET(HOPSTRT,LHOPSTR,BUFADDR) ;
  176. P<HOPBASE>=P<SUPMSG>;
  177. HOPLEFT=KLSIZE-KERRL;
  178. HOPRIGHT=KRSIZE;
  179. GOTO SEND ;
  180. END
  181. ELSE # WE SEND AN IGNORE TO APPL #
  182. BEGIN
  183. #
  184.   BUILD THE HOP/IG BLOCK
  185. #
  186. KGET(HOPIG,LHOPIG,BUFADDR) ;
  187. #
  188.   SET THE IGNORE FLAG IN AT ENTRY
  189. #
  190. ATI[KAPNO] = TRUE ;
  191. P<ACB> = ATACBA[KAPNO];
  192. IF KDST[0]
  193. AND ACBKNDX[0] NQ 0
  194. AND ACBKNDX[0] GQ KDAPPST[0]
  195. AND ACBKNDX[0] LQ KDAPPND[0]
  196. THEN
  197. BEGIN
  198. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],KPAPI,"Y") ;
  199. END
  200. GOTO SEND;
  201. END
  202. END
  203. END
  204. ELSE # NO AP OR IG COMMAND WHEN APPLICATION IS NOT ON #
  205. BEGIN
  206. PARAMS7 = 3 ;
  207. GOTO KEXIT ;
  208. END
  209. END
  210. SEND: BEGIN
  211. BLINK(BUFADDR,ATACBA[KAPNO]) ;
  212. OSCHAPP(ATACBA[KAPNO]);
  213. END
  214. KEXIT: BEGIN
  215. KBUF1[0] = 0 ;
  216. GOTO RJMAIN ;
  217. END
  218. #
  219.   --------------------
  220. #
  221. PROC KGET(KCODE,KL,BUF);
  222. ITEM KCODE U;
  223. ITEM KL U;
  224. ITEM BUF U;
  225. BEGIN
  226. MGETS(KL+BLKHSIZE+ABHSIZE,BUF,TRUE);
  227. P<SUPMSG>=BUF+BLKHSIZE+ABHSIZE;
  228. P<AHEADER> = BUF+BLKHSIZE;# BASE APPLICATION HEADER #
  229. PFCSFC[0] = KCODE ; # SET FUNCTION CODE #
  230. # #
  231. ABHTLC[0]=KL; # LENGTH OF MESSAGE #
  232. ABHABT[0]=APPCMD; # THIS IS A COMMAND BLOCK #
  233. ABHACT[0]=CT60TRANS; #CHARACTER TYPE #
  234. ABHABN[0]=0;
  235. ABHADR[0]=0;
  236. RETURN;
  237. END
  238. #
  239.   -----------------------
  240. #
  241. PROC KFACB;
  242. BEGIN
  243. #
  244.   LET-S GET ACB AND APPLICATION NUMBER
  245. #
  246. BEGIN
  247. KAPNO=0;
  248. IF PARAMS6 EQ "CS"
  249. THEN
  250. BEGIN
  251. KAPNO = PROCAN[CSORD];
  252. END
  253. ELSE
  254. BEGIN
  255. IF PARAMS6 EQ "NVF"
  256. THEN
  257. BEGIN
  258. KAPNO=NVFAN ;
  259. END
  260. ELSE
  261. BEGIN
  262. IF PARAMS6 EQ "NS"
  263. THEN
  264. BEGIN
  265. KAPNO = PROCAN[NSORD];
  266. END
  267. ELSE
  268. BEGIN # NOT CS NS OR NVF. TRY LOOK AT ALL ACB-S #
  269. FOR KINDEX = NVFAN+1 STEP 1 WHILE (KINDEX LQ ATHAN[0] AND
  270. KAPNO EQ 0) DO
  271. BEGIN
  272. ACBADDR = ATACBA[KINDEX];
  273. IF ( ACBADDR NQ 0 )
  274. THEN
  275. BEGIN
  276. P<ACB> = ACBADDR;
  277. IF PARAMS6 EQ ACBANAME[0]
  278. THEN
  279. KAPNO = ACBAN[0];
  280. END
  281. END
  282. END
  283. END
  284. END
  285. END
  286. RETURN;
  287. END
  288. END # MAIN #
  289. TERM
cdc/nos2.source/nam5871/kapigp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator