User Tools

Site Tools


cdc:nos2.source:nam5871:nvfucrs

NVFUCRS

Table Of Contents

  • [00008] PROC NVFUCRS (PORD,RORD,RSTAT,CTYP)
  • [00009] NVFUCRS - CHECK REQUEST STARTABLE STATUS
  • [00012] CHECK REQUEST STARTABLE STATUS.
  • [00040] PROC SSTETS
  • [00041] PROC NVFUZFW
  • [00042] PROC MESSAGE
  • [00043] PROC NVFUMQE
  • [00044] PROC SSCATR
  • [00066] DSPBUF - DSP ROUTE FUNCTION PARAMETER BLOCK.
  • [00113] TMBBUF - TIMER REQUEST BUFFER.

Source Code

NVFUCRS.txt
  1. *DECK NVFUCRS
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXTANVF
  5. USETEXT TXTAPSS
  6. USETEXT TXTSUSS
  7. USETEXT TXSANVF
  8. PROC NVFUCRS (PORD,RORD,RSTAT,CTYP);
  9. # TITLE - NVFUCRS - CHECK REQUEST STARTABLE STATUS #
  10. BEGIN # NVFUCRS #
  11. #
  12. ** NVFUCRS - CHECK REQUEST STARTABLE STATUS.
  13. *
  14. * C. BRION 83/04/13, 83/06/27, 83/08/30, 83/09/08.
  15. * 83/11/09.
  16. *
  17. * THIS PROCEDURE IS RESPONSIBLE FOR CHECKING IF AN APPLICATION
  18. * IS REQUEST STARTABLE OR IF AN APPLICATION HAS ALREADY BEEN
  19. * STARTED UP AND WE ARE AWAITING THE NETON FOR THE CONNECTION.
  20. * THIS PROCEDURE ALSO LOCATES THE SECONDARY APPL ENTRY FOR AN
  21. * APPLICATION THAT CAN HAVE MORE THAN ONE COPY RUNNING, BUT IS
  22. * NOT REQUEST STARTABLE.
  23. *
  24. * PROC NVFUCRS(PORD,RORD,RSTAT,CTYP)
  25. *
  26. * ENTRY
  27. * PORD = ORDINAL OF PRIMARY AST ENTRY.
  28. * CTYP = CONNECTION TYPE OF CALLER (AA OR TA).
  29. * EXIT
  30. * RORD = RETURN ORDINAL OF SECONDARY (OR PRIMARY) AST ENTRY.
  31. * RSTAT = RETURN STATUS.
  32. #
  33.  
  34. #
  35. **** PROC NVFUCRS XREF LIST
  36. #
  37.  
  38. XREF
  39. BEGIN
  40. PROC SSTETS; # SS - ENLARGE TABLE SPACE #
  41. PROC NVFUZFW; # ZERO FILL WORD #
  42. PROC MESSAGE; # ISSUE DAYFILE MESSAGE #
  43. PROC NVFUMQE; # MAKE QUEUE ENTRY #
  44. PROC SSCATR; # START TIMER #
  45. END
  46. #
  47. ****
  48. #
  49.  
  50. #
  51. * DEFS, ITEMS, ARRAYS
  52. #
  53.  
  54. ITEM RSTAT I; # RETURN STATUS #
  55. ITEM PORD I; # PRIMARY AST ENTRY ORDINAL #
  56. ITEM MATCH B; # LOOP EXIT INDICATOR #
  57. ITEM RORD I; # RETURN AST ORDINAL #
  58. ITEM CTYP I; # CONNECTION TYPE OF CALLER #
  59. ITEM NENTRY I; # NUMBER AST ENTRIES #
  60. ITEM LEN I; # LENGTH OF ENTRY #
  61. ITEM LORD I; # LOOP AST ORDINAL #
  62. ITEM POSAST I; # AST WORD POSITION #
  63. ITEM TOTALCN I; # TOTAL NO OF CONN. APP HAS #
  64.  
  65. #
  66. ** DSPBUF - DSP ROUTE FUNCTION PARAMETER BLOCK.
  67. *
  68. * PARAMETER BLOCK FOR TRIGGERING THE ROUTE FUNCTION DSP CALL IN
  69. * NVFTICR.
  70. #
  71.  
  72. ARRAY DSPBUF [00:00] S(DSPVSIZ$);
  73. BEGIN
  74. ITEM DSP$WORD U(00,00,60);
  75. ITEM DSP$FC U(00,00,06) = [DSPROUTE$]; # INTERNAL FXTION #
  76. ITEM DSP$RES0 U(00,06,54) = [0];
  77. ITEM DSP$FNAME C(01,00,07); # FILE NAME #
  78. ITEM DSP$ERR U(01,42,05) = [0];
  79. ITEM DSP$NERR B(01,47,01) = [TRUE]; # NO ABORT IF ERROR #
  80. ITEM DSP$FSOT B(01,48,01) = [TRUE]; # FORCE ORIGIN FLAG #
  81. ITEM DSP$RES1 U(01,49,04) = [0];
  82. ITEM DSP$FSOC U(01,53,06) = [0]; # SYOT ORIG CODE = 0 #
  83. ITEM DSP$CBIT B(01,59,01) = [0];
  84. ITEM DSP$RES2 U(02,00,12) = [0];
  85. ITEM DSP$FORMS U(02,12,12) = [O"0200"]; # FORCE IF JOB ERROR #
  86. ITEM DSP$DISP C(02,24,02) = ["IN"]; # DISP CODE = INPUT #
  87. ITEM DSP$RES4 U(02,36,03) = [0];
  88. ITEM DSP$SCF B(02,39,01) = [0]; # FORCE SERV CLASS #
  89. ITEM DSP$RES5 U(02,40,02) = [0];
  90. ITEM DSP$FLAGS U(02,42,18) = [O"400020"]; # FLAG SETTING #
  91. ITEM DSP$WORD3 U(03,00,60) = [0];
  92. ITEM DSP$WORD4 U(04,00,60) = [0];
  93. ITEM DSP$SPACE U(05,00,12) = [0];
  94. ITEM DSP$SERCL C(05,12,02) = ["NS"]; # NS SERVICE CLASS #
  95. ITEM DSP$RES3 U(05,24,36) = [0];
  96. ITEM DSP$WORD5 U(06,00,60) = [0];
  97. ITEM DSP$WORD6 U(07,00,60) = [0];
  98. ITEM DSP$WORD7 U(08,00,60) = [0];
  99. END
  100.  
  101.  
  102. #
  103. * XTEMP - TEMP APPLICATION NAME CELL.
  104. #
  105. ARRAY XTEMP [00:00] S(1);
  106. BEGIN
  107. ITEM XTEMP$NAME C(00,00,07);
  108. ITEM XTEMP2 U(00,42,18) = [0];
  109. ITEM XTEMP10 U(00,00,60);
  110. END
  111.  
  112. #
  113. ** TMBBUF - TIMER REQUEST BUFFER.
  114. *
  115. * BUFFER CONTAINING THE TIMER INFO. SET UP TO CONTAIN
  116. * THE FC/INACT SM WHICH IS RETURNED TO THE ASQ WHEN THE
  117. * TIMER EXPIRES
  118. #
  119. DEF ASTIME$ #1#;
  120.  
  121. ARRAY TMBBUF[00:00] S(TMBSIZ$);
  122. BEGIN
  123. ITEM TMB$SMID S:ASQSTAT(00,00,12) = [S"TIMEOUT"];
  124. ITEM TMB$WC U(00,48,12) = [TMBSIZ$];
  125. ITEM TMB$ABT U(01,00,06) = [APPCMD];
  126. ITEM TMB$CNUM U(01,18,18);
  127. ITEM TMB$PFCSFC U(02,00,16) = [FCINA];
  128. ITEM TMB$ACN U(02,24,12) = [0];
  129. ITEM TMB$DELAY U(03,24,18);
  130. ITEM TMB$QNUM U(03,42,18);
  131. END
  132.  
  133.  
  134. CONTROL EJECT;
  135.  
  136. #
  137. * CHECK IF REQUESTED APPLICATION IS DISABLED, DOWN. IF SO, RETURN
  138. * WITH CONNECTION NOT POSSIBLE STATUS.
  139. #
  140. RSTAT = CONNOK$;
  141. IF AST$DIF[PORD] OR AST$DNF[PORD]
  142. THEN
  143. BEGIN
  144. RSTAT = NOCONN$;
  145. RORD = PORD;
  146. GOTO ENDEXIT;
  147. END
  148.  
  149. #
  150. * CHECK IF COPY OF APPLICATION ALREADY PENDING NETON. IF SO, CHECK
  151. * THE ORIGIN TYPE OF CALLER THEN INCREMENT THE NUMBER PENDING CON-
  152. * NECTIONS FOR THE AST ENTRY.
  153. #
  154.  
  155. IF AST$SNPF[PORD]
  156. THEN
  157. BEGIN
  158. RSTAT = NETP$;
  159. RORD = PORD;
  160. GOTO ENDEXIT;
  161. END
  162.  
  163. #
  164. * CHECK IF COPY OF APPLICATION ALREADY NETTED ON AND ABLE TO SUP-
  165. * PORT ANOTHER CONNECTION. IF SO, THEN SIMPLY EXIT SINCE RETURN
  166. * STATUS ALREADY SET TO CONNECTION OK.
  167. #
  168.  
  169. MATCH = FALSE;
  170. NENTRY = (ASTLNGTH/ASTSIZ$);
  171. FOR LORD = 0 STEP 1 WHILE
  172. (LORD LS NENTRY AND NOT MATCH)
  173. DO
  174. BEGIN
  175. IF (AST$PANAM[PORD] EQ AST$SANAM[LORD]) AND #SEC APPL FOUND#
  176. (AST$JSN[LORD] NQ " ") AND
  177. (NOT AST$DIF[LORD]) AND # NOT DISABLE #
  178. (NOT AST$DNF[LORD]) # NOT DOWN #
  179. THEN
  180. BEGIN
  181.  
  182. #
  183. * CHECK AST ENTRY TO SEE IF THIS SEC APPL CAN ACCEPT ANY MORE
  184. * CONNECTIONS. IT CAN ACCEPT MORE CONNECTIONS IF THE FOLLOWING
  185. * CODITIONS ARE MET:
  186. * 1. THE CURRENT NUMBER OF CONNECTION IS LESS THAN THE TOTAL CONN
  187. * ALLOWED.
  188. * 2. EITHER THE APPLICATION DOES NOT RESTRICT THE NUMBER OF
  189. * CONNECTIONS, OR THE CURRENT NO OF CONNECTIONS HAS NOT
  190. * REACHED THE LIMIT ALLOWED.
  191. #
  192. TOTALCN = AST$TACN[LORD] + AST$AACN[LORD] + AST$RACN[LORD];
  193. MATCH = (TOTALCN LS AST$MCN[LORD]) AND
  194. ( (NOT AST$RICN[LORD]) OR
  195. (AST$ICCN[LORD] LS AST$MXICN[LORD]));
  196. IF MATCH
  197. THEN
  198. BEGIN
  199. RORD = LORD;
  200. GOTO ENDEXIT;
  201. END
  202. END
  203. END
  204. #
  205. * AT THIS POINT, THERE EXISTS NO SECONDARY APPLICATION COPY THAT
  206. * CAN SUPPORT THE CONNECTION. THEREFORE, CHECK IF THE PRIMARY
  207. * APPLICATION IS REQUEST STARTABLE AND IF NOT AT MAXIMUM NUMBER OF
  208. * COPIES. IF BOTH OF THESE CHECKS ARE TRUE, A NEW COPY OF THE
  209. * APPLICATION MUST BE CAUSED TO NETON. IF THE NUMBER OF MAXIMUM
  210. * COPIES IS GREATER THAN ONE, A NEW AST ENTRY IS ALLOCATED AND
  211. * INITIALIZED. THE RETURN STATUS IS SET TO NETON PENDING.
  212. * THE DSP PARAMETER BLOCK IS THEN SET AND THE DSP ROUTE REQUEST
  213. * IS SET UP AND THE DSP REQUEST ENTRY MADE TO THE CPM/DSP/PFM RE-
  214. * QUEST QUEUE.
  215. #
  216.  
  217. IF NOT AST$RS[PORD]
  218. THEN # NOT A REQUEST STARTABLE APPLICATION #
  219. BEGIN
  220. RSTAT = NOCONN$;
  221. RORD = PORD;
  222. END
  223. ELSE IF AST$MXCOP[PORD] GR AST$CUCOP[PORD]
  224. THEN
  225. BEGIN
  226. IF AST$MXCOP[PORD] GR 1
  227. THEN
  228. BEGIN
  229. POSAST = (PORD + 1) * ASTSIZ$;
  230. SSTETS(P<AST>,POSAST,ASTSIZ$);
  231. RORD = PORD + 1;
  232. NENTRY = (ASTLNGTH/ASTSIZ$);
  233. AST$WORD0[RORD] = 0;
  234. AST$WORD1[RORD] = AST$WORD1[PORD];
  235. AST$WORD2[RORD] = AST$WORD2[PORD];
  236. AST$TACN[RORD] = 0;
  237. AST$AACN[RORD] = 0;
  238. AST$RACN[RORD] = 0;
  239. AST$RS[RORD] = FALSE;
  240. AST$CUCOP[RORD] = 0;
  241. AST$MXCOP[RORD] = 1;
  242. AST$SNPF[RORD] = FALSE;
  243. AST$SANAM[RORD] = AST$PANAM[PORD];
  244. END
  245. ELSE
  246. RORD = PORD;
  247.  
  248. AST$SNPF[PORD] = TRUE;
  249. RSTAT = NETP$;
  250. XTEMP$NAME[0] = AST$PANAM[PORD];
  251. NVFUZFW(XTEMP);
  252. DSP$FNAME[0] = XTEMP$NAME[0];
  253. P<CRQBUF> = LOC(DSPBUF);
  254. LEN = DSPVSIZ$ * 10;
  255. NVFUMQE(P<CPMRQ>,CRQBUF[0],APPTTX$,0,LEN);
  256.  
  257. # SET AUTOSTART TIMER #
  258.  
  259. TMB$QNUM[0] = LOC(P<ASQ>);
  260. TMB$DELAY[0] = NETPTIME$ + ASTIME$;
  261. SSCATR(TMBBUF[0]);
  262. AST$TCAN[RORD] = TMB$CNUM[0];
  263.  
  264. END
  265. ELSE # AT MAX COPY LIMIT #
  266. BEGIN
  267. RSTAT = MCLIMIT$;
  268. RORD = PORD;
  269. END
  270.  
  271. ENDEXIT:
  272.  
  273. END # NVFUCRS #
  274. TERM
cdc/nos2.source/nam5871/nvfucrs.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator