User Tools

Site Tools


cdc:nos2.source:nam5871:nvfticr

NVFTICR

Table Of Contents

  • [00006] PROC NVFTICR(SWTESS)
  • [00007] NVFTICR - ISSUE CPM REQUEST
  • [00011] ISSUE CPM REQUEST.
  • [00056] PROC DFC
  • [00057] FUNC GETFIL I
  • [00058] PROC GLIDC
  • [00059] PROC GPIDA
  • [00060] PROC SPIDA
  • [00061] PROC JROUTE
  • [00062] PROC NVFUMQE
  • [00063] PROC SSTRQE
  • [00064] PROC VALIDU
  • [00065] PROC SSTATS
  • [00066] PROC SSTRTS
  • [00120] GETPARM - ARRAY FOR THE LOCAL AND PERMANENT FILE NAMES.
  • [00372] PROC REQCOMP
  • [00373] REQCOMP - REQUEST COMPLETED PROCESSOR.
  • [00376] REQCOMP - REQUEST COMPLETED PROCESSOR.

Source Code

NVFTICR.txt
  1. *DECK NVFTICR
  2. USETEXT TEXTNVF
  3. USETEXT TXTANVF
  4. USETEXT TEXTSS
  5.  
  6. PROC NVFTICR(SWTESS);
  7. # TITLE NVFTICR - ISSUE CPM REQUEST #
  8.  
  9. BEGIN # NVFTICR #
  10. #
  11. ** NVFTICR - ISSUE CPM REQUEST.
  12. *
  13. * E. THAVIKULWAT 81/10/13
  14. * C. BRION 83/02/15,83/05/05,83/09/08,83/12/08.
  15. *
  16. * THIS PROCEDURE ISSUES CPM 56B, CPM73B, DSP ROUTE FUNCTION
  17. * REQUESTS, GET FILE REQUESTS AND GETLIDC/GETPIDA/SETPIDA
  18. * FUNCTION CALLS AND IS CALLED INTO EXECUTION BY THE STATUS
  19. * WORKLIST PROCESSOR.
  20. *
  21. * PROC NVFTICR(SWTESS)
  22. *
  23. * ENTRY:
  24. * SWTESS = STATUS WORKLIST MONITOR ARRAY.
  25. * CPMRQ = CPM REQUEST QUEUE.
  26. *
  27. * EXIT:
  28. * APPROPRIATE FUNCTION REQUEST ISSUED AND PARAMETERS
  29. * SET DEPENDING ON WHAT EVENT IS TO RESTART THIS PROCEDURE.
  30. *
  31. * NOTES:
  32. * ONLY ONE REQUEST CAN BE OUTSTANDING AT ANY ONE TIME, THUS
  33. * IF THE REQUEST IS NOT COMPLETED IMMEDIATELY, RETURN PARAMETERS
  34. * ARE SET UP TO WATCH FOR COMPLETE BIT AND ROUTINE EXITS. IF THE
  35. * REQUEST IS COMPLETED IMMEDIATELY, THE NEXT ENTRY IN THE *CPMRQ*
  36. * QUEUE IS PROCESSED. IF *CPMRQ* QUEUE HAS BEEN EXHAUSTED,
  37. * RETURN PARAMETERS ARE SET UP TO WATCH THE INTERRUPT WORD
  38. * *INVTICR* ASSOCIATED WITH *CPMRQ* QUEUE.
  39. *
  40. * METHOD:
  41. * IF COMPLETE BIT SET AND REQUEST IS A CPM 56B (VALID) REQUEST,
  42. * ENTER THE RETURNED PARAMETER BLOCK INTO THE REQUESTED DESTINA-
  43. * TION QUEUE (EITHER THE T-A VDATAQ OR THE A-A AAVDATAQ). COMP-
  44. * PLETED DFC, DSP ROUTE REQUESTS, AND GET REQUESTS ARE IGNORED.
  45. *
  46. * CALL *SSTRQE* TO COPY ENTRY FROM *CPMRQ* QUEUE TO WORKING
  47. * BUFFER AND ISSUE APPROPRIATE CPM REQUEST.
  48. #
  49.  
  50. #
  51. **** PROC NVFTICR - XREF LIST.
  52. #
  53.  
  54. XREF
  55. BEGIN
  56. PROC DFC; # DECREMENT FAMILY COUNT #
  57. FUNC GETFIL I; # GET FILE MACREL FUNCTION #
  58. PROC GLIDC; # MACREL GET LID CONFIGURATION #
  59. PROC GPIDA; # MACREL GET PID ATTRIBUTES #
  60. PROC SPIDA; # MACREL SET PID ATTRIBUTES #
  61. PROC JROUTE; # ROUTE MACREL ROUTINE #
  62. PROC NVFUMQE; # TRANSFER TEXT TO QUEUE #
  63. PROC SSTRQE; # TRANSFER QUEUE ENTRY TO FIXED BUFFER #
  64. PROC VALIDU; # VALIDATE TERMINAL USER #
  65. PROC SSTATS; # SS - ALLOCATE TABLE SPACE #
  66. PROC SSTRTS; # SS - RELEASE TABLE SPACE #
  67. END
  68.  
  69. #
  70. ****
  71. #
  72.  
  73. DEF LENGTH$ #(CPMSIZ$+1)*10#; # NUMBER OF CHARACTERS #
  74. DEF SETNWST$ # 1 #; # SET NW STATUS FUNCTION CODE #
  75.  
  76. *CALL SWTESS
  77.  
  78.  
  79. ITEM I I; # LOOP VARIABLE #
  80. ITEM J I; # LOOP VARIABLE #
  81. ITEM ADDR I; # ADDRESSING INFORMATION FOR ABH #
  82. ITEM NUMWRDS I; # NUMBER OF WORDS TO COPY #
  83. ITEM GETSTAT I; # RETURN STATUS FROM GETFIL CALL #
  84. ITEM AX I; # ACPID TABLE INDEX WORD ORDINAL #
  85. ITEM BUFSIZ I; # SIZE OF ACPID TABLE REQUIRED #
  86. ITEM FXADDR I; # ADDR OF PARAMETER RECORD #
  87. ITEM PTR I; # POINTER OF IFMC TABLE #
  88. ITEM FFN B; # FOUND FAMILY NAME #
  89.  
  90. #
  91. * THE FOLLOWING ARRAY IS USED FOR SAVING THE INCOMING FUNCTION RE-
  92. * QUEST AND ASSOCIATED PARAMETERS.
  93. #
  94. ARRAY FUNCTYP[00:00] S(3);
  95. BEGIN
  96. ITEM FCT$WORD U(00,00,60); # FULL WORD REFERENCE #
  97. ITEM FCT$WORD1 U(01,00,60); # FULL WORD 1 REFERENCE #
  98. ITEM FCT$FC U(00,00,06); # CPM REQUEST FUNCTION CODE #
  99. ITEM FCT$SFC U(00,06,06); # GET FILE SUB FX CODE #
  100. ITEM FCT$VCB U(00,24,12); # ACN FOR CPM REQUEST #
  101. ITEM FCT$QNUM U(00,42,18); # Q NUMBER FOR CPMDATA Q #
  102. ITEM FCT$LID C(01,00,03); # 3 CHAR LID VALUE #
  103. ITEM FCT$PID C(01,18,03); # 3 CHAR PID VALUE #
  104. ITEM FCT$BSIZ U(01,36,13); # DICTATED BUFFER SIZE-LPID FX #
  105. ITEM FCT$NWST U(01,56,04); # NETWORK STATUS #
  106. ITEM FCT$WORD2 U(02,00,60); # FULL WORD 2 REFERENCE #
  107. ITEM FCT$IFCTF B(02,58,01); # INCREMENT FAMILY COUNT FALG #
  108. END
  109.  
  110. #
  111. * TEMPSTOR - WORKING STORAGE BASED ARRAY.
  112. #
  113.  
  114. BASED ARRAY TEMPSTOR [00:00] S(1);
  115. BEGIN
  116. ITEM DUMY U(00,00,60); # WORD REFERENCE #
  117. END
  118.  
  119. #
  120. ** GETPARM - ARRAY FOR THE LOCAL AND PERMANENT FILE NAMES.
  121. #
  122. ARRAY GETPARM [00:00] S(2);
  123. BEGIN
  124. ITEM GET$WORD0 U(00,00,60);
  125. ITEM GET$WORD1 U(01,00,60);
  126. ITEM GET$LFN C(00,00,07); # LOCAL FILE NAME #
  127. ITEM GET$PFIX C(01,00,02)=["ZZ"]; # ZZ PREFIX FOR FILE NAME #
  128. ITEM GET$RPFN C(01,12,05); # 5 CHAR APPL NAME SFIX #
  129. ITEM GET$PFN C(01,00,07); # FULL PERM FILE NAME #
  130. END
  131.  
  132. #
  133. ** THE FOLLOWING BASED ARRAY POINTER POINTS TO THE NEW IFMC ENTRY
  134. #
  135. BASED ARRAY BIFMC[00:00] S(1);
  136. BEGIN
  137. ITEM BFMC$WORD U(00,00,60); # FULL WORD REFERENCE #
  138. END
  139. CONTROL EJECT;
  140.  
  141.  
  142.  
  143. #
  144. * IF THE WAITCPM FLAG IS TRUE UPON ENTRY, THEN A FUNCTION
  145. * REQUEST HAS COMPLETED. CALL INTERNAL PROCEDURE REQCOMP TO
  146. * COMPLETE THE POST REQUEST RESPONSIBILITIES.
  147. * IF FXACTIVE FLAG (FUNCTION ACTIVE) IS TRUE, COMPLETION
  148. * STATUS MUST BE CHECKED PRIOR TO ANOTHER FUNCTION REQUEST
  149. * BEING REMOVED FROM THE CPMRQ FOR PROCESSING.
  150. #
  151.  
  152. IF WAITCPM
  153. THEN
  154. BEGIN
  155. WAITCPM = FALSE;
  156. FXACTIVE = FALSE;
  157. REQCOMP;
  158. END
  159.  
  160. IF NOT FXACTIVE
  161. THEN
  162. BEGIN
  163. #
  164. * PROCESS ENTRY FROM *CPMRQ* QUEUE IF ANY.
  165. #
  166. FOR I = 0 WHILE CPMLNGTH NQ 0
  167. DO
  168. BEGIN
  169. #
  170. * CLEAR CPM PARAMETER BLOCK.
  171. #
  172. FOR J = 0 STEP 1 UNTIL CPMSIZ$
  173. DO
  174. BEGIN
  175. CPB$WORD[J] = 0;
  176. END
  177. #
  178. * TRANSFER REQUEST TO WORKING BUFFER. SET UP FUNCTION REQUEST
  179. * PARAMETER BLOCK AND GENERATE REQUEST.
  180. #
  181.  
  182. SSTRQE(P<CPMRQ>,WCBUF,ABHBUF,MSGBUF);
  183. FCT$WORD[0] = MSG$WORD[0]; # SAVE FC AND ACN #
  184. FCT$WORD1[0] = MSG$WORD[1]; # SAVE LID/PID INFO IF PRESENT#
  185. FCT$WORD2[0] = MSG$WORD[2]; # SAVE INCREMENT FAM COUNT INF#
  186. NUMWRDS = WCB$WC[0] - 3; # LESS WC,ABH, AND FC WORD #
  187. FOR J = 0 STEP 1 UNTIL (NUMWRDS - 1)
  188. DO
  189. BEGIN
  190. CPB$WORD[J] = MSG$WORD[J+1];
  191. END
  192.  
  193. IF FCT$FC[0] EQ CPM56B$
  194. THEN # VALIDATE REQUEST #
  195. BEGIN
  196. VALIDU(CPMBUF);
  197. END
  198. ELSE IF FCT$FC[0] EQ CPM73B$ # DECREMENT FAMILY COUNT REQ #
  199. THEN
  200. BEGIN
  201. #
  202. * BEFORE CALLING DFC TO DECREMENT FAMILY COUNT, SEARCH IFMC TABLE,
  203. * FIND THE RIGHT ENTRY AND DECREMENT THE COUNT FIELD BY 1.
  204. #
  205. FOR J=0 STEP 1 UNTIL (IFCLNGTH-1)
  206. DO
  207. BEGIN
  208. IF IFMC$FNAM[J] EQ CPB$FNAM[0]
  209. THEN
  210. BEGIN
  211. IFMC$COUNT[J]=IFMC$COUNT[J]-1;
  212. IF IFMC$COUNT[J] EQ 0
  213. THEN
  214. SSTRTS(P<IFMC>,J,1);
  215. END
  216. END
  217. DFC(CPMBUF);
  218. END
  219. ELSE IF FCT$FC[0] EQ DSPROUTE$ # DSP ROUTE FUNCTION #
  220. THEN
  221. BEGIN
  222. #
  223. * ROUTE OF FILE TO AUTO START AN APPLICATION REQUEST.
  224. * MUST PERFORM GET ON ZZ FILE TO GET THE FILE FOR ROUTING.
  225. #
  226. FCT$SFC[0] = GETFC$;
  227. GET$WORD0[0] = 0;
  228. GET$WORD1[0] = 0;
  229. GET$PFIX[0] = "ZZ";
  230. GET$LFN[0] = C<0,7>CPB$WORD[0];
  231. GET$RPFN[0] = C<0,5>GET$LFN[0];
  232. GETSTAT = 0;
  233.  
  234. #
  235. * LFN AND PFN SET. MAKE GETFIL FUNCTION CALL THAT RESULTS IN A GET
  236. * OF THE PERMANENT FILE WITH RECALL.
  237. * ON RETURN, FILE EITHER LOCAL OR FUNCTION STATUS INDICATES ERROR.
  238. * SIMULATE THE COMPLETE BIT BEING SET TO CONTINUE.
  239. #
  240. GETSTAT = GETFIL(GET$LFN[0],GET$PFN[0]);
  241. CPB$CBIT[0] = TRUE;
  242. END
  243. ELSE
  244. BEGIN
  245.  
  246. #
  247. * MUST BE A LID/PID FUNCTION REQUEST.
  248. * SET ACPID TABLE INDEX,
  249. * ALLOCATE DICTATED SIZE FOR TABLE,
  250. * INITIALIZE THE TABLE ENTRY WHICH ACTS AS THE PARAMETER BLOCK
  251. * FOR THE FUNCTION REQUEST CALL.
  252. #
  253. AX = ACPIDL;
  254. BUFSIZ = FCT$BSIZ[0];
  255. SSTATS(P<ACPID>,BUFSIZ);
  256. ACP$WORD0[AX] = 0;
  257. ACP$WORD1[AX] = 0;
  258. ACP$WORD2[AX] = 0;
  259. ACP$WORD3[AX] = 0;
  260. ACP$SMID[AX] = FCT$FC[0];
  261. ACP$ESIZ[AX] = BUFSIZ;
  262. ACP$VCB[AX] = FCT$VCB[0];
  263. ACP$CBIT[AX] = TRUE;
  264. FXADDR = LOC(ACPID[AX]) + 2;
  265. #
  266. * FUNCTION INDEPENDENT INITIALIZATION DONE.
  267. * PERFORM FUCTION DEPENDENT SETUP OF PARAMETER BLOCK.
  268. #
  269.  
  270. #
  271. * IF GETLIDC REQUEST.
  272. * ISSUE CALL TO MACREL ROUTINE GLIDC TO PERFORM THE GETLIDC CALL.
  273. #
  274. IF FCT$FC[0] EQ GLIDCFC$
  275. THEN
  276. BEGIN
  277. ACP$GLCWC[AX] = BUFSIZ - 2;
  278. ACP$GLCLID[AX] = FCT$LID[0];
  279. GLIDC(FXADDR);
  280. END
  281. #
  282. * IF GETPIDA REQUEST.
  283. * ISSUE CALL TO MACREL ROUTINE GPIDA TO PERFORM THE GETPIDA CALL.
  284. #
  285. ELSE IF FCT$FC[0] EQ GPIDAFC$
  286. THEN
  287. BEGIN
  288. ACP$GPAPID[AX] = FCT$PID[0];
  289. GPIDA(FXADDR);
  290. END
  291. #
  292. * IF SETPIDA REQUEST.
  293. * ISSUE CALL TO MACREL ROUTINE SPIDA TO MAKE SETPIDA CALL.
  294. #
  295. ELSE IF FCT$FC[0] EQ SPIDAFC$
  296. THEN
  297. BEGIN
  298. ACP$FC[AX] = SETNWST$;
  299. ACP$SPANP[AX] = 1;
  300. ACP$SPANWID[AX] = TRUE;
  301. ACP$SPAPID[AX] = FCT$PID[0];
  302. ACP$SPAST[AX] = FCT$NWST[0];
  303. SPIDA(FXADDR);
  304. END
  305. #
  306. * SET THE COMPLETE BIT TRUE SINCE THESE FUNCTION REQUESTS ARE
  307. * ISSUED WITH AUTO RECALL (CONTROL LOST UNTIL COMPLETE).
  308. #
  309. CPB$CBIT[0] = TRUE;
  310. END
  311.  
  312. #
  313. * IF FUNCTION REQUEST COMPLETED, ISSUE CALL TO INTERNAL PRO-
  314. * CEDURE REQCOMP TO PERFORM THE POST REQUEST PROCESSING.
  315. #
  316.  
  317. COMPCHECK:
  318.  
  319. IF CPB$CBIT[0]
  320. THEN
  321. BEGIN
  322. CPB$CBIT[0] = FALSE;
  323. FXACTIVE = FALSE;
  324. REQCOMP;
  325. END
  326. ELSE
  327. BEGIN # CPM REQUEST NOT YET DONE #
  328. WAITCPM = TRUE;
  329. STE$ADDR1[0] = LOC(CPMBUF);
  330. STE$ADDR2[0] = 0;
  331. STE$RTN[0] = LOC(NVFTICR);
  332. STE$INIT1[0] = CPB$WORD[0];
  333. STE$CBIT1[0] = FALSE; # INSURE COMPLETE BIT IS CLEAR #
  334. RETURN; # EXIT #
  335. END
  336. #
  337. * CHECK IF FUNCTION PIGGYBACKED AND ACTIVE.
  338. * IF SO, RETURN TO CHECK IMMEDIATE COMPLETION.
  339. #
  340. IF FXACTIVE
  341. THEN
  342. GOTO COMPCHECK;
  343.  
  344. END # END FOR I LOOP #
  345.  
  346. #
  347. * NO MORE ENTRIES IN *CPMRQ* QUEUE. SET RESTART CONDITION TO WATCH
  348. * INTERRUPT WORD *INVTICR* ASSOCIATED WITH *CPMRQ* QUEUE.
  349. #
  350. INVTICR = 0;
  351. STE$ADDR1[0] = LOC(INVTICR);
  352. STE$ADDR2[0] = 0;
  353. STE$RTN[0] = LOC(NVFTICR);
  354. STE$INIT1[0] = 0;
  355. CPB$CBIT[0] = TRUE;
  356. RETURN;
  357.  
  358. #
  359. * END OF NO ACTIVE FUNCTION PROCESSING.
  360. #
  361.  
  362. END # IF NOT FCACTIVE #
  363. ELSE
  364. BEGIN
  365. GOTO COMPCHECK;
  366. END
  367.  
  368.  
  369. CONTROL EJECT;
  370.  
  371.  
  372. PROC REQCOMP;
  373. # TITLE - REQCOMP - REQUEST COMPLETED PROCESSOR. #
  374. BEGIN # REQCOMP #
  375. #
  376. ** REQCOMP - REQUEST COMPLETED PROCESSOR.
  377. *
  378. * C. BRION 83/10/19.
  379. *
  380. * THIS INTERNAL TO NVFTICR PROCEDURE IS RESPONSIBLE FOR THE POST
  381. * FUNCTION PROCESSING OF REQUESTS.
  382. *
  383. * PROC REQCOMP
  384. *
  385. * ENTRY:
  386. * THE GLOBALS AS DEFINED IN NVFTICR ARE IN EFFECT.
  387. *
  388. * EXIT:
  389. * IF A VALIDATE REQUEST
  390. * MAKE QUEUE ENTRY CONTAINING RETURN CPM PARAMETERS TO SPECIFIED
  391. * / QUEUE.
  392. *
  393. * IF ROUTE REQUEST AND GET FILE FUNCTION COMPLETE
  394. * ISSUE ANOTHER REQUEST FOR THE ROUTE OF FILE.
  395. * SET FUNCTION ACTIVE FLAG (FXACTIVE) TRUE
  396. *
  397. * IF A LID/PID FUNCTION
  398. * IF NOT A SETPIDA FUNCTION
  399. * MAKE QUEUE ENTRY CONTAINING COMPLETED FUNCTION REQUEST
  400. * / TO THE SPECIFIED QUEUE.
  401. * OTHERWISE
  402. * RELEASE ACPID TABLE SPACE FOR REQUEST.
  403.  
  404. #
  405.  
  406. CONTROL EJECT;
  407.  
  408. #
  409. * IF VALIDATE FUNCTION COMPLETED
  410. * ISSUE COMPLETED PARAMETER BLOCK TO INDICATED QUEUE.
  411. #
  412. IF FCT$FC[0] EQ CPM56B$
  413. THEN
  414. BEGIN
  415. IF FCT$IFCTF[0]
  416. THEN
  417. BEGIN
  418. #
  419. * SEARCH IFMC TABLE, IF FAMILY NAME ALREADY DEFINED IN THE TABLE,
  420. * INCREMENT COUNT FIELD OF THAT ENTRY BY 1. IF NOT, PUT A NEW
  421. * ENTRY INTO THE TABLE AND SET THE COUNT FIELD TO 1.
  422. #
  423. FFN=FALSE;
  424. FOR J=0 STEP 1 WHILE ((J LS IFCLNGTH) AND (NOT FFN))
  425. DO
  426. BEGIN
  427. IF IFMC$FNAM[J] EQ CPB$FNAM[0]
  428. THEN
  429. BEGIN
  430. IFMC$COUNT[J]=IFMC$COUNT[J]+1;
  431. FFN=TRUE;
  432. END
  433. END
  434. IF NOT FFN
  435. THEN
  436. BEGIN
  437. PTR=IFCLNGTH;
  438. SSTATS(P<IFMC>,1); # ALLOC SPACE FOR NEW ENTRY#
  439. P<BIFMC>=LOC(IFMC[PTR]); # POINT TO NEW IFMC ENTRY #
  440. BFMC$WORD[0]=0;
  441. IFMC$FNAM[PTR]=CPB$FNAM[0];
  442. IFMC$COUNT[PTR]=1;
  443. END
  444. END
  445. ADDR = FCT$VCB[0];
  446. P<TEMPSTOR> = FCT$QNUM[0];
  447. NVFUMQE(TEMPSTOR,CPMBUF[0],APPTTX$,ADDR,LENGTH$);
  448. END
  449. #
  450. * CHECK IF GET FILE FUNCTION. IF SO, CHECK TERMINATION CODE.
  451. #
  452. IF FCT$FC[0] EQ DSPROUTE$ AND FCT$SFC[0] EQ GETFC$
  453. THEN
  454. BEGIN
  455. FCT$SFC[0] = 0;
  456. IF GETSTAT EQ 0
  457. THEN
  458. BEGIN
  459.  
  460. #
  461. * TERMINATION CODE INDICATES NO ERRORS. ISSUE ROUTE FUNCTION.
  462. #
  463. JROUTE(CPMBUF);
  464.  
  465. FXACTIVE = TRUE;
  466. END
  467. END
  468. #
  469. * CHECK IF COMPLETED GETLIDC OR GETPIDA REQUEST.
  470. * IF SO, SEND COMPLETED FUNCTION REQUEST TO AALPID QUEUE.
  471. #
  472. IF FCT$FC[0] EQ GLIDCFC$ OR
  473. FCT$FC[0] EQ GPIDAFC$
  474. THEN
  475. BEGIN
  476. ADDR = FCT$VCB[0];
  477. P<TEMPSTOR> = FCT$QNUM[0];
  478. NVFUMQE(TEMPSTOR,FUNCTYP[0],APPTTX$,ADDR,LPIDLEN$);
  479. END
  480. #
  481. * CHECK IF COMPLETED SETPIDA REQUEST.
  482. * IF SO, RELEASE ACPID TABLE SPACE.
  483. * NO NEED TO INFORM OF COMPLETION THRU RETURN QUEUE.
  484. #
  485. IF FCT$FC[0] EQ SPIDAFC$
  486. THEN
  487. BEGIN
  488. SSTRTS(P<ACPID>,AX,FCT$BSIZ[0]);
  489. END
  490.  
  491. END # REQCOMP #
  492.  
  493.  
  494. END # END NVFTICR #
  495.  
  496. TERM
cdc/nos2.source/nam5871/nvfticr.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator