SXUCP

Table Of Contents

  • [00001] PROC ALT$RP
  • [00002] ALT$RP - SSALTER REQUEST PROCESSOR.
  • [00007] ALT$RP - SSALTER REQUEST PROCESSOR.
  • [00025] PROC ABORT
  • [00026] PROC MESSAGE
  • [00027] PROC KILL$UC
  • [00028] PROC LLRQENQ
  • [00029] PROC UCP$RES
  • [00030] PROC UCP$WRI
  • [00187] PROC CONNECT
  • [00188] CONNECT - ESTABLISH LONG TERM CONNECTION.
  • [00193] CONNECT - ESTABLISH LONG TERM CONNECTION.
  • [00215] PROC ABORT
  • [00216] PROC KILL$UC
  • [00217] PROC MESSAGE
  • [00218] PROC SFCALL
  • [00219] PROC UCP$RES
  • [00421] PROC KILL$UC1)
  • [00422] KILL$UC - ABORT A *UCP*.
  • [00426] KILL$UC - ABORT A *UCP*.
  • [00464] PROC ABORT
  • [00465] PROC MESSAGE
  • [00466] PROC SFCALL
  • [00578] PROC LINK$RP
  • [00579] LINK$RP - PRELIMINARY LINKAGE PROCESSING.
  • [00584] LINK$RP - PRELIMINARY LINKAGE PROCESSING.
  • [00606] PROC CONNECT
  • [00607] PROC KILL$UC
  • [00608] PROC SFCALL
  • [00609] PROC UCP$DON
  • [00670] PROC QUE$RP
  • [00671] QUE$RP - QUEUABLE REQUEST PROCESSOR.
  • [00676] QUE$RP - QUEUABLE REQUEST PROCESSOR.
  • [00701] PROC ADD$LNK
  • [00702] PROC KILL$UC
  • [00703] PROC LLRQENQ
  • [00813] PROC TYP2$RP
  • [00814] TYP2$RP - TYPE 2 REQUEST PROCESSOR.
  • [00819] TYP2$RP - TYPE 2 REQUEST PROCESSOR.
  • [00840] PROC DSSETUP
  • [00841] PROC KILL$UC
  • [00842] PROC SFCALL
  • [00843] PROC UCP$RES
  • [00905] PROC UCP$DON
  • [00906] UCP$DON - TERMINATE *UCP* REQUEST PROPERLY.
  • [00911] UCP$DON - TERMINATE *UCP* REQUEST PROPERLY.
  • [00942] PROC ABORT
  • [00943] PROC ADD$LNK
  • [00944] PROC LLRQENQ
  • [00946] PROC MESSAGE
  • [00947] PROC SFCALL
  • [00948] PROC UCP$RES
  • [01163] PROC UCP$RES
  • [01164] UCP$RES - NOTIFY *UCP* OF REQUEST COMPLETE.
  • [01169] UCP$RES - NOTIFY *UCP* OF REQUEST COMPLETE.
  • [01197] PROC ABORT
  • [01198] PROC MESSAGE
  • [01199] PROC RTIME
  • [01200] PROC SFCALL
  • [01315] PROC UCP$RP
  • [01316] UCP$RP - PRELIMINARY PROCESSING OF *UCP* REQUESTS.
  • [01321] UCP$RP - PRELIMINARY PROCESSING OF *UCP* REQUESTS.
  • [01347] PROC ALT$RP
  • [01349] PROC KILL$UC
  • [01350] PROC LINK$RP
  • [01351] PROC NONQ$RP
  • [01353] PROC QUE$RP
  • [01354] PROC SFCALL
  • [01355] PROC TYP2$RP
  • [01356] PROC UCP$DON
  • [01567] PROC UCP$WRI2)
1)
MCODE
2)
LLRQADDR2),(WORDCOUNT),(SCPADDR),RSTATUS)
  • [01568] UCP$WRI - PASS DATA TO *UCP*.
  • [01573] UCP$WRI - PASS DATA TO *UCP*.
  • [01605] PROC SFCALL
</WRAP> === Source Code ===
SXUCP.txt
  1. PROC ALT$RP;
  2. # TITLE ALT$RP - SSALTER REQUEST PROCESSOR. #
  3.  
  4. BEGIN # ALT$RP #
  5.  
  6. #
  7. ** ALT$RP - SSALTER REQUEST PROCESSOR.
  8. *
  9. * *ALT$RP* PROCESSES THE *SSALTER* TYPE 5 REQUESTS.
  10. *
  11. * PROC ALT$RP
  12. *
  13. * ENTRY P<CPR> = ADDRESS OF TYPE 5 *UCP* REQUEST BLOCK.
  14. *
  15. * EXIT THE *UNIT DEVICE TABLE* TRANSMITTED, OR THE *UNIT
  16. * DEVICE TABLE* FIELD CHANGED.
  17. #
  18.  
  19. #
  20. **** PROC ALT$RP - XREF LIST BEGIN.
  21. #
  22.  
  23. XREF
  24. BEGIN
  25. PROC ABORT; # INTERFACE TO *ABORT* #
  26. PROC MESSAGE; # ABORT A *UCP* #
  27. PROC KILL$UC; # ABORT A UCP #
  28. PROC LLRQENQ; # *LLRQ* ENGUEUER #
  29. PROC UCP$RES; # ISSUE RESPONSE TO *UCP* #
  30. PROC UCP$WRI; # PASS DATA TO *UCP* #
  31. END
  32.  
  33. #
  34. **** PROC ALT$RP - XREF LIST END.
  35. #
  36.  
  37. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  38. *CALL COMBFAS
  39. *CALL COMBCPR
  40. *CALL COMBLRQ
  41. *CALL COMBUCR
  42. *CALL COMBUDT
  43. *CALL COMXCTF
  44. *CALL COMXLTC
  45. *CALL COMXMSC
  46.  
  47. ITEM BYNR U; # OFF/SET BIT ADDRESS #
  48. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  49. ITEM PMMR U; # STATUS BIT #
  50. ITEM RETCODE U; # RETURN CODE #
  51. ITEM STAT U; # STATUS OF *UDT* BIT #
  52. ITEM UDTQ U; # UDT ADDRESS #
  53.  
  54. BASED
  55. ARRAY UDTBIT [0:0] P(1); # ALTER *UDT* AREA #
  56. BEGIN
  57. ITEM UDT$BIT U(00,00,60);
  58. END
  59.  
  60.  
  61. IF CPR$RQC[0] LQ REQTYP5"RES5" ##
  62. OR CPR$RQC[0] GQ REQTYP5"LSTREQTYP5"
  63. THEN
  64. BEGIN # IF REQUEST CODE IS INCORRECT #
  65. KILL$UC(KILLCODE"INVRQC"); # ABORT THE UCP #
  66. RETURN;
  67. END
  68.  
  69. #
  70. * RETURN THE UNIT DEVICE TABLE TO THE UCP.
  71. #
  72.  
  73. IF CPR$RQC[0] EQ REQTYP5"SSA$PUDT" ##
  74. THEN
  75. BEGIN # TRANFERS THE UDT TO THE UCP #
  76. UDTQ = UDTCADR + CPR$ADDR3[0];
  77. UCP$WRI(CPR$ADDR2[0],CPR$ADDR4[0],UDTQ,RETCODE);
  78. IF RETCODE EQ SFRCUCPGON
  79. THEN
  80. BEGIN
  81. RETURN;
  82. END
  83.  
  84. IF RETCODE EQ SFRCBDUCPA
  85. THEN
  86. BEGIN
  87. KILL$UC(KILLCODE"INVADDR");
  88. RETURN;
  89. END
  90.  
  91. IF RETCODE NQ 0
  92. THEN
  93. BEGIN
  94. FE$RTN[0] = "ALT$RP.";
  95. MESSAGE(FEMSG[0],UDFL1);
  96. ABORT;
  97. END
  98.  
  99. ELSE
  100. BEGIN
  101.  
  102. IF INITIALIZE
  103. THEN
  104. BEGIN # BEFORE INITIALIZATION #
  105. LTC$RQR[LTCENTRY] = RESPTYP5"SSA$OK";
  106. END
  107. ELSE
  108. BEGIN # AFTER INITIALIZATION #
  109. LTC$RQR[LTCENTRY] = RESPTYP5"OK5";
  110. END
  111.  
  112. UCP$RES;
  113. RETURN;
  114. END
  115.  
  116. END # RETURN OF UDT #
  117.  
  118. #
  119. * CHANGE A PATH NOD.
  120. #
  121.  
  122. UDTQ = CPR$UDTQ[0]+UDTCADR; # UDT RELATIVE ADDRESS #
  123. BYNR = CPR$BYNR[0]; # OFF SET BIT ADDRESS #
  124.  
  125. P<UDTBIT> = UDTQ;
  126. IF CPR$PMMR[0]
  127. THEN
  128. BEGIN
  129. PMMR = 1;
  130. END
  131.  
  132. ELSE
  133. BEGIN
  134. PMMR = 0;
  135. END
  136.  
  137. STAT = B<BYNR,1> UDT$BIT[0]; # CHECK FOR BIT ALREADY SET #
  138. IF STAT EQ PMMR
  139. THEN
  140. BEGIN
  141. LTC$RQR[LTCENTRY] = RESPTYP5"SSA$UIRC";
  142. UCP$RES;
  143. RETURN;
  144. END
  145.  
  146. ELSE
  147. BEGIN
  148. B<BYNR,1> UDT$BIT[0] = PMMR; # SET OPTION BIT #
  149. B<BYNR+1,1> UDT$BIT[0] = 1; # SET *ACK* FLAG #
  150. END
  151.  
  152. #
  153. * CHECK FOR INITIALIZATION.
  154. #
  155.  
  156. IF INITIALIZE
  157. THEN
  158. BEGIN
  159. LTC$RQR[LTCENTRY] = RESPTYP5"SSA$OK";
  160. UCP$RES;
  161. RETURN;
  162. END
  163.  
  164. #
  165. * SET UP A *LLRQ* ENTRY.
  166. #
  167.  
  168.  
  169. LLRQENQ(LLRADR);
  170. P<LLRQ> = LLRADR;
  171. LLR$LTCT[0] = LTCENTRY;
  172. LLR$UCPRA[0] = UCP$ADDR[0];
  173. LLR$WORD4[0] = CPR3[0];
  174. LLR$WORD5[0] = CPR2[0];
  175. LLR$PRCNME[0] = REQTYP4"INITHW";
  176. LLR$CU[0] = CPR$CUORD[0];
  177. LLR$UDTQ[0] = UDTQ;
  178. LLR$BYNR[0] = BYNR;
  179. LLR$PMMR[0] = PMMR;
  180.  
  181. LTC$LLRQA[LTCENTRY] = LLRADR;
  182. RETURN;
  183.  
  184. END # ALT$PR #
  185.  
  186. TERM
  187. PROC CONNECT;
  188. # TITLE CONNECT - ESTABLISH LONG TERM CONNECTION. #
  189.  
  190. BEGIN # CONNECT #
  191.  
  192. #
  193. ** CONNECT - ESTABLISH LONG TERM CONNECTION.
  194. *
  195. * *CONNECT* PROCESSES *UCP* CONNECT REQUESTS.
  196. *
  197. * PROC CONNECT
  198. *
  199. * ENTRY THE CONNECT REQUEST TO BE PROCESSED IS IN ARRAY
  200. * *CPR*. THE BASE POINTER FOR *CPR* IS ALREADY SET.
  201. *
  202. * EXIT THE LONG TERM CONNECTION HAS BEEN ESTABLISHED, THE
  203. * *LTCT* ENTRY FOR THE CONNECTING *UCP* HAS BEEN BUILT,
  204. * AND A RESPONSE HAS BEEN SENT BACK TO THE *UCP*.
  205. *
  206. * MESSAGES * EXEC ABNORMAL, CONNECT.*
  207. #
  208.  
  209. #
  210. **** PROC CONNECT - XREF LIST BEGIN.
  211. #
  212.  
  213. XREF
  214. BEGIN
  215. PROC ABORT; # INTERFACE TO *ABORT* MACRO #
  216. PROC KILL$UC; # ABORT A *UCP* #
  217. PROC MESSAGE; # CALLS *MESSAGE* MACRO #
  218. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  219. PROC UCP$RES; # NOTIFY *UCP* OF REQUEST COMPLETE
  220.   #
  221. END
  222.  
  223. #
  224. **** PROC CONNECT - XREF LIST END.
  225. #
  226.  
  227. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  228.  
  229. *CALL COMBFAS
  230. *CALL COMBCPR
  231. *CALL COMBMAP
  232. *CALL COMBUCR
  233. *CALL COMXCTF
  234. *CALL COMXLTC
  235. *CALL COMXMSC
  236.  
  237.  
  238. ITEM J U; # COUNTER #
  239. ITEM ORD$MRFT U; # *MRFT* ORDINAL #
  240. ITEM UCPSWAPPED B; # UCP WAS SWAPPED OUT #
  241.  
  242.  
  243.  
  244.  
  245. #
  246. * ABORT *UCP* IF *DRYUP* FLAG IS SET.
  247. #
  248.  
  249. IF DRYUP
  250. THEN
  251. BEGIN
  252. KILL$UC(KILLCODE"CLOSED");
  253. RETURN;
  254. END
  255.  
  256. #
  257. * REQUESTOR ID HAS TO BE IN RANGE.
  258. #
  259.  
  260. IF CPR$RQI[0] EQ REQNAME"RQIFIRST" OR ##
  261. CPR$RQI[0] GQ REQNAME"RQILAST"
  262. THEN
  263. BEGIN
  264. KILL$UC(KILLCODE"NOTAUTH");
  265. RETURN;
  266. END
  267.  
  268. #
  269. * SYSTEM LONG TERM CONNECTION HAS TO BE CLEARED.
  270. #
  271.  
  272. IF LTCENTRY NQ 0
  273. THEN
  274. BEGIN
  275. KILL$UC(KILLCODE"MULCON");
  276. RETURN;
  277. END
  278.  
  279. #
  280. * 1. MULTIPLE COPIES OF *SSMOVE* CAN BE RUN AT A TIME, HOWEVER,
  281. * ONLY ONE COPY OF *SSMOVE* THAT IS IN THE PROCESS OF
  282. * DESTAGING FILES CAN BE CONNECTED AT A TIME. *MULTIPLE RUN*
  283. *
  284. * 2. MULTIPLE COPIES OF *SSLABEL*, *SSDEBUG* OR *SSVAL* CAN NOT
  285. * BE CONNECTED. *MULTIPLE RUN*
  286. *
  287. * 3. *SSLABEL*, *SSDEBUG* OR *SSVAL* CAN NOT BE CONNECTED WHILE
  288. * ANOTHER COPY OF THESE UTILITIES ARE CONNECTED.
  289. * *UTILITY CONFLICT*
  290. *
  291. * 4. *SSVAL* CAN NOT BE CONNECTED WHILE *SSMOVE* IS IN THE
  292. * PROCESS OF DESTAGING FILES. *SSMOVE* CAN NOT BE CONNECTED
  293. * WHEN *SSVAL* IS CONNECTED. *UTILITY CONFLICT*
  294. #
  295.  
  296. IF CPR$RQI[0] EQ REQNAME"RQIMOVE"
  297. THEN
  298. BEGIN # *SSMOVE* REQUEST #
  299. IF DSC$FAM NQ 0
  300. THEN
  301. BEGIN # MULTIPLE RUN #
  302. KILL$UC(KILLCODE"MULRUN");
  303. RETURN;
  304. END # MULTIPLE RUN #
  305.  
  306. IF CONIND[REQNAME"RQIVALD"]
  307. THEN
  308. BEGIN # UTILITY CONFLICT #
  309. KILL$UC(KILLCODE"UTLCONF");
  310. RETURN;
  311. END # UTILITY CONFLICT #
  312.  
  313. END # *SSMOVE* REQUEST #
  314.  
  315. ELSE
  316. BEGIN # NOT *SSMOVE* REQUEST #
  317. IF CONIND[CPR$RQI[0]]
  318. THEN
  319. BEGIN # MULTIPLE RUN #
  320. KILL$UC(KILLCODE"MULRUN");
  321. RETURN;
  322. END # MULTIPLE RUN #
  323.  
  324. ELSE
  325. BEGIN # NOT MULTIPLE RUN #
  326. IF (CPR$RQI[0] EQ REQNAME"RQILABL") ##
  327. OR (CPR$RQI[0] EQ REQNAME"RQIDBUG") ##
  328. OR (CPR$RQI[0] EQ REQNAME"RQIVALD")
  329. THEN
  330. BEGIN # *SSLABEL*, *SSDEBUG* OR *SSVAL* REQUEST #
  331. IF ((CONIND[REQNAME"RQILABL"]) ##
  332. OR (CONIND[REQNAME"RQIDBUG"]) ##
  333. OR (CONIND[REQNAME"RQIVALD"])) ##
  334. OR ((CPR$RQI[0] EQ REQNAME"RQIVALD") AND (DSC$FAM NQ 0))
  335. THEN
  336. BEGIN # UTILITY CONFLICT #
  337. KILL$UC(KILLCODE"UTLCONF");
  338. RETURN;
  339. END # UTILITY CONFLICT #
  340.  
  341. END # *SSLABEL*, *SSDEBUG* OR *SSVAL* REQUEST #
  342.  
  343. END # NOT MULTIPLE RUN #
  344.  
  345. END # NOT *SSMOVE* REQUEST #
  346.  
  347. #
  348. * FIND AN EMPTY LONG TERM CONNECT TABLE ENTRY AND
  349. * ASSIGN THE *UCP* TO THE ENTRY. SET THE SYSTEM LONG
  350. * TERM CONNECT BIT.
  351. #
  352.  
  353. FASTFOR LTCENTRY = 1 STEP 1 UNTIL LTCTCNT
  354. DO
  355. BEGIN # SEARCH *LTCT* FOR AN EMPTY SLOT #
  356. IF LTC$SFJBSN[LTCENTRY] EQ 0
  357. THEN
  358. BEGIN # SET UP LONG TERM CONNECTION #
  359. UCPSWAPPED = TRUE;
  360. REPEAT WHILE UCPSWAPPED
  361. DO
  362. BEGIN # REPEAT WHILE SWAPPED #
  363. SFFC[0] = SFSLTC;
  364. SFCALL(SFBLKPTR,RCL);
  365. IF SFRC[0] EQ SFRCSWPOUT
  366. THEN
  367. BEGIN
  368. SFFC[0] = SFSWPI;
  369. SFCALL(SFBLKPTR,RCL);
  370. END
  371.  
  372. ELSE
  373. BEGIN
  374. UCPSWAPPED = FALSE;
  375. END
  376.  
  377. END # REPEAT WHILE SWAPPED #
  378.  
  379. IF SFRC[0] NQ 0
  380. THEN
  381. BEGIN # PROCESS UNEXPECTED RESPONSE #
  382. IF SFRC[0] EQ SFRCUCPGON
  383. THEN
  384. BEGIN
  385. RETURN;
  386. END
  387.  
  388. ELSE
  389. BEGIN
  390. FE$RTN[0] = "CONNECT.";
  391. MESSAGE(FEMSG[0],UDFL1);
  392. ABORT;
  393. END
  394.  
  395. END # PROCESS UNEXPECTED RESPONSE #
  396.  
  397. LTC$WORD1[LTCENTRY] = UCP$WORD1[0];
  398. LTC$WORD2[LTCENTRY] = 0;
  399. LTC$RQI[LTCENTRY] = CPR$RQI[0];
  400. LTC$UCPA[LTCENTRY] = UCP$ADDR[0];
  401. LTC$WORD3[LTCENTRY] = CPR3[0];
  402. CONIND[CPR$RQI[0]] = TRUE;
  403. LTC$RQR[LTCENTRY] = RESPTYP1"OK1";
  404. UCP$RES;
  405. RETURN;
  406. END # SET UP LONG TERM CONNECTION #
  407.  
  408. END # SEARCH *LTCT* FOR AN EMPTY SLOT #
  409.  
  410. #
  411. * ABORT IF THERE ARE NO LONG TERM CONNECT TABLE ENTRIES
  412. * AVAILABLE.
  413. #
  414.  
  415. FE$RTN[0] = "CONNECT.";
  416. MESSAGE(FEMSG[0],UDFL1);
  417. ABORT;
  418. END # CONNECT #
  419.  
  420. TERM
  421. PROC KILL$UC((MCODE));
  422. # TITLE KILL$UC - ABORT A *UCP*. #
  423. BEGIN # KILL$UC #
  424.  
  425. #
  426. ** KILL$UC - ABORT A *UCP*.
  427. *
  428. * *KILL$UC* ABORTS A *UCP*.
  429. *
  430. * PROC KILL$UC((MCODE))
  431. *
  432. * ENTRY MCODE = MESSAGE CODE ORDINAL.
  433. * THE JOB SEQUEUNCE NUMBER FROM THE OFFENDING *UCP* IS
  434. * IN ARRAY *UCPR*. THE BASE POINTER FOR *UCPR* IS
  435. * ALREADY SET.
  436. *
  437. * EXIT A DAYFILE MESSAGE HAS BEEN ISSUED TO EXPLAIN WHY THE
  438. * *UCP* IS BEING ABORTED, AND AN *SF.REGR* HAS BEEN
  439. * ISSUED TO ABORT THE OFFENDING *UCP*.
  440. *
  441. * MESSAGES * EXEC ABNORMAL, KILL$UC.*
  442. * * XXXX ABORTED - NOT CONNECTED.*
  443. * * XXXX ABORTED - ALREADY CONNECTED.*
  444. * * XXXX ABORTED - MULTIPLE REQUESTS.*
  445. * * XXXX ABORTED - MULTIPLE RUN.*
  446. * * XXXX ABORTED - INCORRECT REQUEST TYPE.*
  447. * * XXXX ABORTED - INCORRECT REQUEST CODE.*
  448. * * XXXX ABORTED - UTILITY CONFLICT.*
  449. * * XXXX ABORTED - CARTRIDGE ACTIVE.*
  450. * * XXXX ABORTED - SSEXEC IS CLOSED.*
  451. * * XXXX ABORTED - INCORRECT ADDRESS.*
  452. * XXXX = JOB SEQUENCE NUMBER.
  453. *
  454. #
  455.  
  456. ITEM MCODE U; # MESSAGE-CODE ORDINAL #
  457.  
  458. #
  459. **** PROC KILL$UC - XREF LIST BEGIN.
  460. #
  461.  
  462. XREF
  463. BEGIN
  464. PROC ABORT; # INTERFACE TO *ABORT* MACRO #
  465. PROC MESSAGE; # INTERFACE TO *MESSAGE* MACRO #
  466. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  467. END
  468.  
  469. #
  470. **** PROC KILL$UC - XREF LIST END.
  471. #
  472.  
  473. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  474. *CALL COMBFAS
  475. *CALL COMBUCR
  476. *CALL COMXLTC
  477. *CALL COMXMSC
  478.  
  479. #
  480. * ABORT MESSAGE DEFINITION.
  481. #
  482.  
  483. ARRAY DISPMESS [0:0] S(5);
  484. BEGIN
  485. ITEM MESSJBSN C(00,00,04); # JOB NAME #
  486. ITEM MESSFLR C(00,24,03) = [" "];
  487. ITEM MESSABT C(00,42,10) = ["ABORTED - "];
  488. ITEM MESSREASON C(01,42,21);
  489. ITEM MESSTERMTR C(03,48,12) = [0];
  490. END
  491.  
  492. #
  493. * REASON WHY *UCP* IS BEING ABORTED.
  494. #
  495.  
  496. ARRAY ABTREASON [KILLCODE"NOTAUTH":KILLCODE"LASTCODE"] S(3);
  497. BEGIN
  498. ITEM REASONMESS C(00,00,21) = ["NOT AUTHORIZED.",
  499. "NOT CONNECTED.",
  500. "ALREADY CONNECTED.",
  501. "MULTIPLE REQUESTS.",
  502. "MULTIPLE RUN.",
  503. "INVALID REQUEST TYPE.",
  504. "INVALID REQUEST CODE.",
  505. "UTILITY CONFLICT.",
  506. "CARTRIDGE ACTIVE.",
  507. "SSEXEC IS CLOSED.",
  508. "INVALID ADDRESS.",
  509. "LAST ENTRY."];
  510. END
  511.  
  512.  
  513.  
  514.  
  515.  
  516. #
  517. * REASON CODE HAS TO BE WITHIN RANGE.
  518. #
  519.  
  520. IF MCODE LS KILLCODE"NOTAUTH" OR MCODE GQ KILLCODE"LASTCODE"
  521. THEN
  522. BEGIN
  523. FE$RTN[0] = "KILLUCP.";
  524. MESSAGE(FEMSG[0],UDFL1);
  525. ABORT;
  526. END
  527.  
  528. MESSJBSN[0] = UCP$JBSN[0];
  529. MESSREASON[0] = REASONMESS[MCODE];
  530. MESSAGE(DISPMESS,3);
  531.  
  532. #
  533. * ABORT THE *UCP* VIA A *SFCALL* REQUEST.
  534. #
  535.  
  536. REPEATREGR:
  537. SFFP[0] = 0;
  538. SFUCPA[0] = 2;
  539. SFSCPA[0] = LOC(DISPMESS);
  540. SFFC[0] = SFREGR;
  541. SFJBSN[0] = UCP$JBSN[0];
  542. SFFSTA[0] = UCP$FSTA[0];
  543. SFCALL(SFBLKPTR,RCL);
  544.  
  545. #
  546. * SWAPIN *UCP* IF OUT.
  547. #
  548.  
  549. IF SFRC[0] EQ SFRCSWPOUT
  550. THEN
  551. BEGIN
  552. SFFC[0] = SFSWPI;
  553. SFCALL(SFBLKPTR,RCL);
  554. GOTO REPEATREGR;
  555. END
  556.  
  557. #
  558. * ABORT IF *SFERROR* NOT *UCP* ABORTED OR UNDEFINED.
  559. #
  560.  
  561. IF SFRC[0] NQ 0
  562. THEN
  563. BEGIN
  564. IF SFRC[0] NQ SFRCUCPGON
  565. THEN
  566. BEGIN
  567. FE$RTN[0] = "KILLUCP.";
  568. MESSAGE(FEMSG[0],UDFL1);
  569. ABORT;
  570. END
  571.  
  572. END
  573.  
  574. RETURN;
  575. END # KILL$UC #
  576.  
  577. TERM
  578. PROC LINK$RP;
  579. # TITLE LINK$RP - PRELIMINARY LINKAGE PROCESSING. #
  580. BEGIN # LINK$RP #
  581.  
  582.  
  583. #
  584. ** LINK$RP - PRELIMINARY LINKAGE PROCESSING.
  585. *
  586. * *LINK$RP* DOES PRELIMINARY PROCESSING OF *UCP* LINKAGE
  587. * REQUESTS AND THEN CALLS THE APPROPRIATE MODULE TO DO
  588. * THE DETAILED PROCESSING OF THE REQUEST.
  589. *
  590. * PROC LINK$RP
  591. *
  592. * ENTRY THE TYPE 1 UCP REQUEST TO BE PROCESSED IS IN ARRAY
  593. * *CPR*. THE BASE POINTER FOR *CPR* IS ALREADY SET.
  594. *
  595. * EXIT THE TYPE 1 REQUEST HAS BEEN PROCESSED AND A RESPONSE
  596. * HAS BEEN SENT BACK TO THE UCP INDICATING COMPLETION
  597. * OF THE REQUEST.
  598. #
  599.  
  600. #
  601. **** PROC LINK$RP - XREF LIST BEGIN.
  602. #
  603.  
  604. XREF
  605. BEGIN
  606. PROC CONNECT; # ESTABLISH LONG TERM CONNECTION #
  607. PROC KILL$UC; # ABORT A *UCP* #
  608. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  609. PROC UCP$DON; # TERMINATE *UCP* REQUEST PROPERLY
  610.   #
  611. END
  612.  
  613. #
  614. **** PROC LINK$RP - XREF LIST END.
  615. #
  616.  
  617.  
  618. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  619. *CALL COMBFAS
  620. *CALL COMBCPR
  621. *CALL COMBUCR
  622. *CALL COMXMSC
  623.  
  624. #
  625. * LIST FOR PROCESSING LINKAGE REQUESTS.
  626. #
  627.  
  628. SWITCH TYP1SW:REQTYP1
  629. PRCON:CONNECT,
  630. PRDISC:DISCONNECT;
  631.  
  632.  
  633.  
  634.  
  635.  
  636. #
  637. * REQUEST CODE HAS TO BE A VALID LINKAGE REQUEST CODE.
  638. #
  639.  
  640. IF CPR$RQC[0] EQ REQTYP1"RES1" ##
  641. OR CPR$RQC[0] GQ REQTYP1"LSTREQTYP1"
  642. THEN
  643. BEGIN
  644. KILL$UC(KILLCODE"INVRQC");
  645. RETURN;
  646. END
  647.  
  648.  
  649. #
  650. * PROCESS THE APPROPRIATE LINKAGE REQUEST AND THEN RETURN TO
  651. * THE CALLER.
  652. #
  653.  
  654. GOTO TYP1SW[CPR$RQC[0]];
  655.  
  656.  
  657. PRCON:
  658. CONNECT;
  659. RETURN;
  660.  
  661.  
  662. PRDISC:
  663. UCP$DON;
  664. RETURN;
  665.  
  666.  
  667. END # LINK$RP #
  668.  
  669. TERM
  670. PROC QUE$RP;
  671. # TITLE QUE$RP - QUEUABLE REQUEST PROCESSOR. #
  672.  
  673. BEGIN # QUE$RP #
  674.  
  675. #
  676. ** QUE$RP - QUEUABLE REQUEST PROCESSOR.
  677. *
  678. * *QUE$RP* DOES PRELIMINARY PROCESSING OF TYPE 4 *UCP* REQUESTS.
  679. * A LOW LEVEL REQUEST QUEUE ENTRY IS SET UP. FOR AN UNLOAD
  680. * CARTRIDGE REQUEST, THE UTILITY CARTRIDGE TABLE IS CLEARED.
  681. *
  682. * PROC QUE$RP
  683. *
  684. * ENTRY POINTERS TO THE UCP REQUEST BEING PROCESSED AND
  685. * THE *LTCT* ENTRY CORRESPONDING TO THE REQUEST HAVE
  686. * BEEN SET.
  687. *
  688. * EXIT IF AN INCORRECT REQUEST CODE OR A UTILITY CONFLICT IS
  689. * DISCOVERED, THE UCP WILL BE ABORTED AND CONTROL WILL
  690. * RETURN TO THE CALLER.
  691. *
  692. * NOTES *QUE$RP* MUST NOT BE CALLED IF THE *LLRQ* IS FULL.
  693. #
  694.  
  695. #
  696. **** PROC QUE$RP - XREF LIST BEGIN.
  697. #
  698.  
  699. XREF
  700. BEGIN
  701. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  702. PROC KILL$UC; # ABORT A UCP #
  703. PROC LLRQENQ; # *LLRQ* ENQUEUER #
  704. END
  705.  
  706. #
  707. **** PROC QUE$RP - XREF LIST END.
  708. #
  709.  
  710. DEF LISTCON #0#;
  711. *CALL COMBFAS
  712. *CALL COMBCHN
  713. *CALL COMBCPR
  714. *CALL COMBLRQ
  715. *CALL COMXLTC
  716. *CALL COMXMSC
  717. *CALL COMBUCR
  718.  
  719. ITEM LLRADR U; # *LLRQ* ENTRY ADDRESS #
  720.  
  721. SWITCH REQCODE:REQTYP4
  722. REQ1:LOAD$CART,
  723. REQ2:UNLD$CART,
  724. REQ3:CP$RAW$AU,
  725. REQ4:WRT$LAB,
  726. REQEND:LSTREQTYP4;
  727.  
  728. CONTROL EJECT;
  729.  
  730. IF CPR$RQC[0] LQ REQTYP4"RES4" ##
  731. OR CPR$RQC[0] GQ REQTYP4"LSTREQTYP4"
  732. THEN # IF REQUEST CODE IS INCORRECT #
  733. BEGIN
  734. KILL$UC(KILLCODE"INVRQC"); # ABORT THE UCP #
  735. RETURN;
  736. END
  737.  
  738. IF CPR$RQC[0] EQ REQTYP4"LOAD$CART"
  739. THEN # IF LOAD CARTRDIGE REQUEST #
  740. BEGIN # LOAD CARTRDIGE REQUEST #
  741. IF LTC$CART[LTCENTRY]
  742. THEN # IF *UTCT* NOT EMPTY #
  743. BEGIN
  744. KILL$UC(KILLCODE"MULCART"); # CARTRIDGE ALREADY ACTIVE #
  745. RETURN;
  746. END
  747. ELSE
  748. BEGIN # SET UP *LLRQ* ENTRY #
  749. LLRQENQ(LLRADR);
  750. P<LLRQ> = LLRADR;
  751. LLR$LTCT[0] = LTCENTRY;
  752. LLR$UCPRA[0] = UCP$ADDR[0];
  753. LLR$WORD4[0] = CPR3[0];
  754. LLR$WORD5[0] = CPR2[0];
  755. LTC$LLRQA[LTCENTRY] = LLRADR;
  756. END
  757.  
  758. END # LOAD CARTRIDGE REQUEST #
  759.  
  760. IF CPR$RQC[0] EQ REQTYP4"UNLD$CART"
  761. THEN # IF UNLOAD CARTRIDGE REQUEST #
  762. BEGIN
  763. LTC$CART[0] = FALSE;
  764. END
  765.  
  766. IF CPR$RQC[0] NQ REQTYP4"LOAD$CART"
  767. THEN
  768. BEGIN # NO BUILD OF *LLRQ* #
  769. P<LLRQ> = LTC$LLRQA[LTCENTRY];
  770. LLR$DR[0] = 0; # CLEAR OLD RESPONSE CODE #
  771. LLR$PRCST[0] = 0;
  772. LLR$RQC[0] = CPR$RQC[0]; # NEW REQUEST CODE #
  773. LLR$WORD4[0] = CPR3[0];
  774. LLR$YZ[0] = CPR$YZ[0];
  775. LLR$ADDR2[0] = CPR$ADDR2[0];
  776. END
  777.  
  778. #
  779. * SIMULATED CASE COMMAND FOR SETTING PROCESS NAME.
  780. #
  781.  
  782. CORCOD:
  783. GOTO REQCODE[CPR$RQC[0]];
  784.  
  785. REQ1: # LOAD CARTRIDGE #
  786. LLR$PRCNME[0] = REQTYP4"LOAD$CART";
  787. RETURN;
  788.  
  789. REQ2: # UNLOAD CARTRIDGE #
  790. LLR$PRCNME[0] = REQTYP4"UNLD$CART";
  791. GOTO REQEND;
  792.  
  793. REQ3: # COPY RAW STREAM #
  794. LLR$PRCNME[0] = REQTYP4"CP$RAW$AU";
  795. GOTO REQEND;
  796.  
  797. REQ4: # WRITE LABEL #
  798. LLR$PRCNME[0] = REQTYP4"WRT$LAB";
  799. GOTO REQEND;
  800.  
  801. REQEND:
  802.  
  803. #
  804. * END SIMULATED CASE COMMAND FOR SETTING PROCESS NAME.
  805. #
  806.  
  807. ADD$LNK(LTC$LLRQA[LTCENTRY],LCHN"LL$READY",0);
  808. RETURN;
  809.  
  810. END # QUE$RP #
  811.  
  812. TERM
  813. PROC TYP2$RP;
  814. # TITLE TYP2$RP - TYPE 2 REQUEST PROCESSOR. #
  815.  
  816. BEGIN # TYP2$RP #
  817.  
  818. #
  819. ** TYP2$RP - TYPE 2 REQUEST PROCESSOR.
  820. *
  821. * *TYP2$RP* DOES PRELIMINARY PROCESSING OF TYPE 2 *UCP* REQUESTS.
  822. * THE APPROPRIATE MODULE IS CALLED TO DO DETAILED PROCESSING OF
  823. * THE REQUEST.
  824. *
  825. * PROC TYP2$RP
  826. *
  827. * ENTRY THE POINTER TO THE *UCP* REQUEST BEING PROCESSED
  828. * HAS BEEN SET (BASED ARRAY *CPR*).
  829. *
  830. * EXIT IF AN INCORRECT REQUEST CODE WAS DETECTED, THE *UCP*
  831. * HAS BEEN ABORTED, ELSE *ACTVMF* HAS BEEN CALLED.
  832. #
  833.  
  834. #
  835. * PROC TYP2$RP - XREF LIST BEGIN.
  836. #
  837.  
  838. XREF
  839. BEGIN
  840. PROC DSSETUP; # SETUP DESTAGE PROCESSING #
  841. PROC KILL$UC; # ABORT A *UCP* #
  842. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  843. PROC UCP$RES; # ISSUE RESPONSE TO A *UCP* #
  844. END
  845.  
  846. #
  847. * PROC TYP2$RP - XREF LIST END.
  848. #
  849.  
  850. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  851. *CALL COMBFAS
  852. *CALL COMBCPR
  853. *CALL COMBUCR
  854. *CALL,COMXLTC
  855. *CALL,COMXMSC
  856.  
  857. ITEM STAT U; # STATUS #
  858. CONTROL EJECT;
  859. IF CPR$RQC[0] LQ REQTYP2"RES2" ##
  860. OR CPR$RQC[0] GQ REQTYP2"LSTREQTYP2"
  861. THEN # IF INCORRECT REQUEST CODE #
  862. BEGIN
  863. KILL$UC(KILLCODE"INVRQC"); # ABORT THE *UCP* #
  864. RETURN;
  865. END
  866.  
  867. #
  868. * CALL *DSSETUP* TO INITIATE DESTAGE PROCESSING.
  869. * IF PROBLEMS WITH THIS INITIATION OR IF THE NO-WAIT OPTION IS
  870. * SELECTED, ISSUE AN IMMEDIATE REPLY TO *SSMOVE*. OTHERWISE,
  871. * SAVE THE LONG-TERM CONNECT TABLE ORDINAL SO A REPLY CAN
  872. * BE RETURNED UPON COMPLETION OF DESTAGING.
  873. #
  874.  
  875. DSSETUP(CPR$FAM[0],STAT);
  876.  
  877. IF STAT NQ 0
  878. THEN
  879. BEGIN STAT = RESPTYP2"MRFERR"; END
  880. ELSE BEGIN STAT = RESPTYP2"OK2";
  881. IF NOT CPR$NW[0]
  882. THEN # CAUSE *SSMOVE* TO BE ROLLED UNTIL DESTAGING
  883.   IS COMPLETE #
  884. BEGIN
  885. LTC$SFUCPA[LTCENTRY] = 0;
  886. LTC$SFSCPA[LTCENTRY] = 0;
  887. LTC$SFFC[LTCENTRY] = SFSWPO;
  888. SFCALL(LOC(LTC$WORD0[LTCENTRY]),NRCL);
  889. DSC$LTCT = LTCENTRY;
  890. RETURN;
  891. END
  892.  
  893. END
  894.  
  895. #
  896. * REPLY IMMEDIATELY.
  897. #
  898.  
  899. LTC$RQR[LTCENTRY] = STAT;
  900. UCP$RES;
  901. RETURN;
  902. END # TYP2$RP #
  903.  
  904. TERM
  905. PROC UCP$DON;
  906. # TITLE UCP$DON - TERMINATE *UCP* REQUEST PROPERLY. #
  907.  
  908. BEGIN # UCP$DON #
  909.  
  910. #
  911. ** UCP$DON - TERMINATE *UCP* REQUEST PROPERLY.
  912. *
  913. * *UCP$DON* CLEANS UP THE LONG TERM CONNECT TABLE
  914. * ENTRY AND ANY OUTSTANDING REQUESTS WHEN A *UCP*
  915. * TERMINATES WHILE STILL HAVING A LONG TERM
  916. * CONNECTION WITH *SSEXEC*.
  917. *
  918. * PROC UCP$DON
  919. *
  920. * ENTRY THE DISCONNECT REQUEST OR TERMINATION NOTICE IS IN
  921. * ARRAY *CPR*. THE BASE POINTER FOR *CPR* IS ALREADY
  922. * SET. THE *LTCT* ENTRY FOR THE REQUESTING *UCP* IS
  923. * POINTED TO BY *LTCENTRY*.
  924. *
  925. * EXIT THE REQUEST/NOTICE HAS BEEN PROCESSED.
  926. *
  927. * MESSAGES * EXEC ABNORMAL, UCP$DON.*
  928. *
  929. * NOTE IT IS ASSUMED THAT THE *LTCENTRY* FOR THE *UCP*
  930. * IS SET ON ENTRY. THE REQUEST AREA FOR THE UCP,
  931. * AS DEFINED IN *COMBCPR*, IS USED AS A COUNTER
  932. * TO CLEAR THE TEST POINTS IF THE CONDITIONS ARE
  933. * PROPER.
  934. #
  935.  
  936. #
  937. **** PROC UCP$DON - XREF LIST BEGIN.
  938. #
  939.  
  940. XREF
  941. BEGIN
  942. PROC ABORT; # ABORTS PROCESSING #
  943. PROC ADD$LNK; # ADD ENTRY TO END OF CHAIN #
  944. PROC LLRQENQ; # LOW LEVEL REQUEST QUEUE ENQUEUER
  945.   #
  946. PROC MESSAGE; # ISSUES DAYFILE MESSAGE #
  947. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  948. PROC UCP$RES; # NOTIFY *UCP* OF REQUEST
  949.   COMPLETION #
  950. END
  951.  
  952. #
  953. **** PROC UCP$DON - XREF LIST END.
  954. #
  955.  
  956. DEF OVERRIDE #3#; # N.OVERRIDE ON UCP #
  957.  
  958. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  959. *CALL COMBFAS
  960. *CALL COMBCHN
  961. *CALL COMBCPR
  962. *CALL COMBLRQ
  963. *CALL COMBMAT
  964. *CALL COMBUCR
  965. *CALL COMXCTF
  966. *CALL COMXLTC
  967. *CALL COMXMSC
  968.  
  969. ITEM I U; # COUNTER #
  970. ITEM LLRQE U; # ADDRESS OF THE *LLRQ* FROM
  971.   *LLRQENQ* #
  972. ITEM MATCH B; # LOOP CONTROL FLAG #
  973. ITEM RESTRT B=FALSE; # RESTART ALL PROCESSES AT A STEP
  974.   POINT #
  975. ITEM UCPSWAPPED B; # UCP WAS SWAPPED OUT #
  976.  
  977.  
  978.  
  979.  
  980.  
  981. #
  982. * IF THE *UCP* HAS AN *LLRQ* ENTRY, FLAG THE *LLRQ* THAT
  983. *
  984. * THE *UCP* HAS ABORTED. IF AN CARTRIDGE IS LOADED, CLEAN-UP
  985. * WILL UNLOAD THE CARTRIDGE.
  986. #
  987.  
  988.  
  989. IF LTC$LLRQA[LTCENTRY] NQ 0
  990. THEN
  991. BEGIN # SET ABORT FLAG #
  992. P<LLRQ> = LTC$LLRQA[LTCENTRY];
  993. LLR$UCPABT[0] = TRUE;
  994. IF LTC$CART[LTCENTRY] ##
  995. AND LLR$RS[0] EQ PROCST"COMPLETE" ##
  996. AND LTC$RQI[LTCENTRY] NQ REQNAME"RQIDBUG"
  997. THEN
  998. BEGIN # SET UNLOAD OF CARTRIDGE #
  999. LLR$RQC[0] = REQTYP4"UNLD$CART";
  1000. LLR$DR[0] = 0; # CLEAR OLD FIELDS #
  1001. LLR$PRCST[0] = 0;
  1002. LLR$PRCNME[0] = REQTYP4"UNLD$CART";
  1003. ADD$LNK(LTC$LLRQA[LTCENTRY],LCHN"LL$READY",0);
  1004. END # END OF UNLOAD CARTRIDGE #
  1005. END # END OF *LLRQ* CLEAN UP #
  1006.  
  1007. #
  1008. * CLOSE OUT THE CONNECTION.
  1009. #
  1010.  
  1011. LTC$SFSCPA[LTCENTRY] = 0;
  1012.  
  1013. IF UCP$STAT[0] NQ 0
  1014. THEN
  1015. BEGIN # PROCESS THE *UCP* TERMINATION NOTICE #
  1016. LTC$SFUCPA[LTCENTRY] = -1;
  1017. UCPSWAPPED = TRUE;
  1018. REPEAT WHILE UCPSWAPPED
  1019. DO
  1020. BEGIN # PROCESS SWAPPED *UCP* #
  1021. LTC$SFFC[LTCENTRY] = SFENDT;
  1022. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1023. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1024. THEN
  1025. BEGIN
  1026. LTC$SFFC[LTCENTRY] = SFSWPI;
  1027. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1028. END
  1029.  
  1030. ELSE
  1031. BEGIN
  1032. UCPSWAPPED = FALSE;
  1033. END
  1034.  
  1035. END # PROCESS SWAPPED *UCP* #
  1036.  
  1037. END # PROCESS THE *UCP* TERMINATION NOTICE #
  1038.  
  1039. ELSE
  1040. BEGIN # PROCESS THE DISCONNECT REQUEST #
  1041.  
  1042. #
  1043. * CLEAR THE LONG TERM CONNECT.
  1044. #
  1045.  
  1046. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY];
  1047. UCPSWAPPED = TRUE;
  1048. REPEAT WHILE UCPSWAPPED
  1049. DO
  1050. BEGIN # WAIT FOR CONNECTION TO CLEAR #
  1051. LTC$SFFC[LTCENTRY] = SFCLTC;
  1052. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1053. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1054. THEN
  1055. BEGIN
  1056. LTC$SFFC[LTCENTRY] = SFSWPI;
  1057. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1058. END
  1059.  
  1060. ELSE
  1061. BEGIN
  1062. UCPSWAPPED = FALSE;
  1063. END
  1064.  
  1065. END # WAIT FOR CONNECTION TO CLEAR #
  1066.  
  1067. IF LTC$SFRC[LTCENTRY] NQ 0
  1068. THEN
  1069. BEGIN
  1070. GOTO SFERR;
  1071. END
  1072.  
  1073. #
  1074. * RETURN THE OK1 RESPONSE.
  1075. #
  1076.  
  1077. LTC$RQR[LTCENTRY] = RESPTYP1"OK1";
  1078. UCPSWAPPED = TRUE;
  1079. REPEAT WHILE UCPSWAPPED
  1080. DO
  1081. BEGIN # WAIT FOR RESPONSE TO BE PROCESSED #
  1082. LTC$SFFC[LTCENTRY] = SFWRIT;
  1083. LTC$SFSCPA[LTCENTRY] = LOC(LTC$RQR[LTCENTRY]);
  1084. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY] + 2;
  1085. LTC$SFFP[LTCENTRY] = 1;
  1086. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1087. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1088. THEN
  1089. BEGIN
  1090. LTC$SFFC[LTCENTRY] = SFSWPI;
  1091. LTC$SFSCPA[LTCENTRY] = 0;
  1092. LTC$SFFP[LTCENTRY] = 0;
  1093. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY];
  1094. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1095. END
  1096.  
  1097. ELSE
  1098. BEGIN
  1099. UCPSWAPPED = FALSE;
  1100. END
  1101.  
  1102. END # WAIT FOR RESPONSE TO BE PROCESSED #
  1103.  
  1104. IF LTC$SFRC[LTCENTRY] NQ 0
  1105. THEN
  1106. BEGIN
  1107. GOTO SFERR;
  1108. END
  1109.  
  1110. #
  1111. * ACKNOWLEDGE REQUEST COMPLETION.
  1112. #
  1113.  
  1114. UCPSWAPPED = TRUE;
  1115. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY];
  1116. LTC$SFSCPA[LTCENTRY] = 0;
  1117. LTC$SFFP[LTCENTRY] = 0;
  1118. REPEAT WHILE UCPSWAPPED
  1119. DO
  1120. BEGIN # WAIT UNTIL *ENDT* IS PROCESSED #
  1121. LTC$SFFC[LTCENTRY] = SFENDT;
  1122. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1123. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1124. THEN
  1125. BEGIN
  1126. LTC$SFFC[LTCENTRY] = SFSWPI;
  1127. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1128. END
  1129.  
  1130. ELSE
  1131. BEGIN
  1132. UCPSWAPPED = FALSE;
  1133. END
  1134.  
  1135. END # WAIT UNTIL *ENDT* IS PROCESSED #
  1136.  
  1137. END # PROCESS THE DISCONNECT REQUEST #
  1138.  
  1139. SFERR:
  1140. IF LTC$SFRC[LTCENTRY] EQ 0 OR LTC$SFRC[LTCENTRY] EQ SFRCUCPGON
  1141. OR (LTC$SFRC[LTCENTRY] EQ SFRCUCPNET AND UCP$STAT[0] EQ
  1142. OVERRIDE)
  1143. THEN
  1144. BEGIN # CLEAR THE *LTCT* ENTRY #
  1145. CONIND[LTC$RQI[LTCENTRY]] = FALSE;
  1146. LTC$WORD0[LTCENTRY] = 0;
  1147. LTC$WORD1[LTCENTRY] = 0;
  1148. LTC$WORD2[LTCENTRY] = 0;
  1149. LTC$WORD3[LTCENTRY] = 0;
  1150. RETURN;
  1151. END # CLEAR THE *LTCT* ENTRY #
  1152.  
  1153. ELSE
  1154. BEGIN # UNEXPECTED *SFCALL* RESPONSE #
  1155. FE$RTN[0] = "UCP$DON.";
  1156. MESSAGE(FEMSG[0],UDFL1);
  1157. ABORT;
  1158. END # UNEXPECTED *SFCALL* RESPONSE #
  1159.  
  1160. END # UCP$DON #
  1161.  
  1162. TERM
  1163. PROC UCP$RES;
  1164. # TITLE UCP$RES - NOTIFY *UCP* OF REQUEST COMPLETE. #
  1165.  
  1166. BEGIN # UCP$RES #
  1167.  
  1168. #
  1169. ** UCP$RES - NOTIFY *UCP* OF REQUEST COMPLETE.
  1170. *
  1171. * *UCP$RES* RETURNS THE REQUEST RESPONSE WORD TO THE *UCP*
  1172. * AND THEN NOTIFIES THE *UCP* (AND O/S) THAT THE PROCESSING
  1173. * OF THE REQUEST HAS BEEN COMPLETED.
  1174. *
  1175. * PROC UCP$RES
  1176. *
  1177. * ENTRY THE *LTCT* ENTRY POINTED TO BY *LTCENTRY* CONTAINS
  1178. * ALL THE INFORMATION NEEDED.
  1179. *
  1180. * EXIT IF THE *UCP* WAS SWAPPED OUT, AN *SF.SWPI* REQUEST
  1181. * HAS BEEN ISSUED AND THE SWAPPED-UCP FLAG IN THE *LTCT*
  1182. * ENTRY HAS BEEN SET. OTHERWISE, THE RESPONSE WORD HAS
  1183. * BEEN WRITTEN BACK TO THE *UCP* AND THE *UCP* HAS BEEN
  1184. * NOTIFIED THAT PROCESSING OF ITS LAST REQUEST HAS BEEN
  1185. * COMPLETED.
  1186. *
  1187. * MESSAGES * EXEC ABNORMAL, UCP$RES.*
  1188. *
  1189. #
  1190.  
  1191. #
  1192. **** PROC UCP$RES - XREF LIST BEGIN.
  1193. #
  1194.  
  1195. XREF
  1196. BEGIN
  1197. PROC ABORT; # ABORTS PROCESSING #
  1198. PROC MESSAGE; # ISSUES DAYFILE MESSAGE #
  1199. PROC RTIME; # GETS TIME SINCE DEADSTART #
  1200. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  1201. END
  1202.  
  1203. #
  1204. **** PROC UCP$RES - XREF LIST END.
  1205. #
  1206.  
  1207. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1208. *CALL COMBFAS
  1209. *CALL COMBUCR
  1210. *CALL COMXCTF
  1211. *CALL COMXIPR
  1212. *CALL COMXLTC
  1213. *CALL COMXMSC
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219. #
  1220. * RETURN REQUEST RESPONSE WORD TO THE *UCP*.
  1221. #
  1222.  
  1223. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY] + 2;
  1224. LTC$SFSCPA[LTCENTRY] = LOC(LTC$RQR[LTCENTRY]);
  1225. LTC$SFFP[LTCENTRY] = 1;
  1226. LTC$SFFC[LTCENTRY] = SFWRIT;
  1227. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1228. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1229. THEN
  1230. BEGIN # SWAPPED *UCP* #
  1231. LTC$UCPSW[LTCENTRY] = TRUE;
  1232. GLBUCPSW = TRUE;
  1233. LTC$SFUCPA[LTCENTRY] = 0;
  1234. LTC$SFSCPA[LTCENTRY] = 0;
  1235. LTC$SFFC[LTCENTRY] = SFSWPI;
  1236. SFCALL(LOC(LTC$WORD0[LTCENTRY]),NRCL);
  1237.  
  1238. IF UCP$EXPIR EQ 0
  1239. THEN
  1240. BEGIN
  1241. RTIME(RTIMESTAT[0]);
  1242. UCP$EXPIR = RTIMSECS[0] + UCP$INTV;
  1243. END
  1244.  
  1245. RETURN;
  1246. END # SWAPPED *UCP* #
  1247.  
  1248. ELSE
  1249. BEGIN
  1250. IF LTC$SFRC[LTCENTRY] NQ 0 AND LTC$SFRC[LTCENTRY] NQ
  1251. SFRCUCPGON
  1252. THEN # UNEXPECTED RESPONSE #
  1253. BEGIN
  1254. FE$RTN[0] = "UCP$RES.";
  1255. MESSAGE(FEMSG[0],UDFL1);
  1256. ABORT;
  1257. END
  1258.  
  1259. END
  1260.  
  1261. #
  1262. * NOTIFY THE *UCP* THAT THE REQUEST IS COMPLETE.
  1263. #
  1264.  
  1265. LTC$SFUCPA[LTCENTRY] = LTC$UCPA[LTCENTRY];
  1266. LTC$SFSCPA[LTCENTRY] = 0;
  1267. LTC$SFFP[LTCENTRY] = 0;
  1268. LTC$SFFC[LTCENTRY] = SFENDT;
  1269. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1270. IF LTC$SFRC[LTCENTRY] EQ SFRCSWPOUT
  1271. THEN
  1272. BEGIN # *UCP* SWAPPED #
  1273. LTC$UCPSW[LTCENTRY] = TRUE;
  1274. GLBUCPSW = TRUE;
  1275. LTC$SFUCPA[LTCENTRY] = 0;
  1276. LTC$SFSCPA[LTCENTRY] = 0;
  1277. LTC$SFFC[LTCENTRY] = SFSWPI;
  1278. SFCALL(LOC(LTC$WORD0[LTCENTRY]),NRCL);
  1279.  
  1280. IF UCP$EXPIR EQ 0
  1281. THEN
  1282. BEGIN
  1283. RTIME(RTIMESTAT[0]);
  1284. UCP$EXPIR = RTIMSECS[0] + UCP$INTV;
  1285. END
  1286.  
  1287. RETURN;
  1288. END # *UCP* SWAPPED #
  1289.  
  1290. ELSE
  1291. BEGIN
  1292. IF LTC$SFRC[LTCENTRY] NQ 0 AND LTC$SFRC[LTCENTRY] NQ
  1293. SFRCUCPGON
  1294. THEN # UNEXPECTED RESPONSE #
  1295. BEGIN
  1296. FE$RTN[0] = "UCP$RES.";
  1297. MESSAGE(FEMSG[0],UDFL1);
  1298. ABORT;
  1299. END
  1300.  
  1301. END
  1302.  
  1303. #
  1304. * CLEAR THE REQUEST FROM THE LONG TERM CONNECT TABLE.
  1305. #
  1306.  
  1307. LTC$UCPSW[LTCENTRY] = FALSE;
  1308. LTC$UCPA[LTCENTRY] = 0;
  1309. LTC$WORD3[LTCENTRY] = 0;
  1310. RETURN;
  1311.  
  1312. END # UCP$RES #
  1313.  
  1314. TERM
  1315. PROC UCP$RP;
  1316. # TITLE UCP$RP - PRELIMINARY PROCESSING OF *UCP* REQUESTS. #
  1317.  
  1318. BEGIN # UCP$RP #
  1319.  
  1320. #
  1321. ** UCP$RP - PRELIMINARY PROCESSING OF *UCP* REQUESTS.
  1322. *
  1323. * *UCP$RP* DOES PRELIMINARY PROCESSING OF *UCP* REQUESTS AND CALLS
  1324. * THE APPROPRIATE MODULES TO DO FURTHER PROCESSING OF THE REQUESTS.
  1325. *
  1326. * PROC UCP$RP
  1327. *
  1328. * ENTRY A NEW *UCP* REQUEST HAS BEEN RECEIVED AND IF
  1329. * IT IS A TYPE 4 OR 5 REQUEST, AT LEAST ONE *LLRQ*
  1330. * ENTRY IS AVAILABLE ON THE *LLRQ* FREE SPACE CHAIN.
  1331. *
  1332. * EXIT TYPE 4 OR 5 REQUESTS HAVE BEEN ENQUEUED IN THE
  1333. * *LLRQ* FOR FUTURE PROCESSING. ALL OTHER REQUESTS HAVE
  1334. * BEEN PROCESSED TO COMPLETION.
  1335. *
  1336. * NOTES BEFORE SUBORDINATE ROUTINES ARE CALLED, THE BASE
  1337. * POINTERS FOR *CPR* AND *UCPR* ARE SET AND *LTCENTRY*
  1338. * IS SET TO POINT TO THE *LTCT* ENTRY FOR THE *UCP*.
  1339. #
  1340.  
  1341. #
  1342. **** PROC UCP$RP - XREF LIST BEGIN.
  1343. #
  1344.  
  1345. XREF
  1346. BEGIN
  1347. PROC ALT$RP; # PRELIMINARY PROCESSING OF
  1348.   *SSALTER* REQUESTS #
  1349. PROC KILL$UC; # ABORT A *UCP* #
  1350. PROC LINK$RP; # PRELIMINARY LINKAGE PROCESSING #
  1351. PROC NONQ$RP; # PRELIMINARY PROCESSING OF TYPE 3
  1352.   REQUEST #
  1353. PROC QUE$RP; # QUEUABLE REQUEST PROCESSOR #
  1354. PROC SFCALL; # ISSUES *SFCALL* REQUEST #
  1355. PROC TYP2$RP; # TYPE 2 REQUEST PROCESSOR #
  1356. PROC UCP$DON; # TERMINATE *UCP* REQUEST PROPERLY
  1357.   #
  1358. END
  1359.  
  1360. #
  1361. **** PROC UCP$RP - XREF LIST END.
  1362. #
  1363.  
  1364. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1365. *CALL COMBFAS
  1366. *CALL COMBCHN
  1367. *CALL COMBCPR
  1368. *CALL COMBLRQ
  1369. *CALL COMBUCR
  1370. *CALL COMXCTF
  1371. *CALL,COMXJCA
  1372. *CALL COMXLTC
  1373. *CALL COMXMSC
  1374.  
  1375. ITEM I U; # LOOP COUNTER #
  1376. ITEM J U; # LOOP COUNTER #
  1377. ITEM TESTEXIT B; # *FOR* LOOP CONTROL SWITCH #
  1378. ITEM UCPSWAPPED B; # UCP WAS SWAPPED OUT #
  1379. #
  1380. * STATUS SWITCH LIST TO PROCESS TYPE OF REQUEST.
  1381. #
  1382.  
  1383. SWITCH TYPSW:TYP
  1384. TYPE1:TYP1,
  1385. TYPE2:TYP2,
  1386. TYPE3:TYP3,
  1387. TYPE4:TYP4,
  1388. TYPE5:TYP5;
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394. P<LTCT> = LTCTPTR;
  1395.  
  1396. #
  1397. * THE FOLLOWING *FOR* LOOP IS THE MAIN CONTROL LOOP OF *UCP$RP*.
  1398. * THIS LOOP MAINTAINS CONTROL IN THIS PROCEDURE UNTIL THERE ARE
  1399. * NO MORE *UCP* REQUESTS TO BE STARTED.
  1400. #
  1401.  
  1402. SLOWFOR I=0 WHILE RA$SSCINLK[0] ##
  1403. AND CHN$BOC[LCHN"LL$FRSPC"] NQ 0
  1404. DO
  1405. BEGIN # PROCESS *UCP* REQUEST #
  1406. P<UCPR> = RA$SSCAP[0];
  1407. P<CPR> = RA$SSCAP[0] + 2;
  1408.  
  1409. #
  1410. * SWITCH TO ALTERNATE *UCP* REQUEST RECEIVING AREA.
  1411. #
  1412.  
  1413. RA$SSCAP[0] = LOC(UCPPARM[UCPPARMSW]);
  1414. IF UCPPARMSW EQ 0
  1415. THEN
  1416. BEGIN
  1417. UCPPARMSW = 1;
  1418. END
  1419.  
  1420. ELSE
  1421. BEGIN
  1422. UCPPARMSW = 0;
  1423. END
  1424.  
  1425. RA$SSCINLK[0] = FALSE;
  1426. TESTEXIT = FALSE;
  1427. SFJBSN[0] = UCP$JBSN[0];
  1428. SFFSTA[0] = UCP$FSTA[0];
  1429.  
  1430. LTCENTRY = 0;
  1431. FASTFOR J = 1 STEP 1 WHILE J LQ LTCTCNT AND NOT TESTEXIT
  1432. DO
  1433. BEGIN # *LTCT* SEARCH #
  1434. IF UCP$JBSN[0] EQ LTC$SFJBSN[J] ##
  1435. AND UCP$FSTA[0] EQ LTC$SFFSTA[J]
  1436. THEN
  1437. BEGIN # *UCP* HAS AN ENTRY IN THE *LTCT* #
  1438. TESTEXIT = TRUE;
  1439. LTCENTRY = J;
  1440. END # *UCP* HAS AN ENTRY IN THE *LTCT* #
  1441.  
  1442. ELSE
  1443. BEGIN
  1444. TEST J;
  1445. END
  1446.  
  1447. END # *LTCT* SEARCH #
  1448.  
  1449. IF UCP$STAT NQ 0
  1450. THEN
  1451. BEGIN # PROCESS TERMINATION NOTICE FROM O/S #
  1452. IF TESTEXIT
  1453. THEN
  1454. BEGIN # TERMINATING *UCP* WAS CONNECTED #
  1455. UCP$DON;
  1456. END # TERMINATING *UCP* WAS CONNECTED #
  1457.  
  1458. ELSE
  1459. BEGIN # TERMINATING UCP NOT CONNECTED #
  1460. SFUCPA[0] = -1;
  1461. UCPSWAPPED = TRUE;
  1462. REPEAT WHILE UCPSWAPPED
  1463. DO
  1464. BEGIN # WAIT UNTIL *ENDT* IS PROCESSED #
  1465. SFFC[0] = SFENDT;
  1466. SFCALL(SFBLKPTR,RCL);
  1467. IF SFRC[0] EQ SFRCSWPOUT
  1468. THEN
  1469. BEGIN
  1470. SFFC[0] = SFSWPI;
  1471. SFCALL(SFBLKPTR,RCL);
  1472. END
  1473.  
  1474. ELSE
  1475. BEGIN
  1476. UCPSWAPPED = FALSE;
  1477. END
  1478.  
  1479. END # WAIT UNTIL *ENDT* IS PROCESSED #
  1480.  
  1481. END # TERMINATING *UCP* NOT CONNECTED #
  1482.  
  1483. TEST I;
  1484. END # PROCESS TERMINATION NOTICE FROM O/S #
  1485.  
  1486. ELSE
  1487. BEGIN # PROCESS REQUEST FROM *UCP* #
  1488. IF NOT TESTEXIT
  1489. THEN
  1490. BEGIN # NOT IN *LTCT* SO REQUIRE A CONNECT #
  1491. IF CPR$RQT[0] EQ TYP"TYP1" ##
  1492. AND CPR$RQC[0] EQ REQTYP1"CONNECT"
  1493. THEN
  1494. BEGIN
  1495. LINK$RP;
  1496. END
  1497.  
  1498. ELSE
  1499. BEGIN
  1500. KILL$UC(KILLCODE"NOTCON");
  1501. END
  1502.  
  1503. TEST I;
  1504. END # NOT IN *LTCT* SO REQUIRE A CONNECT #
  1505.  
  1506. IF LTC$UCPA[LTCENTRY] NQ 0
  1507. THEN
  1508. BEGIN # PREVIOUS REQUEST NOT PROCESSED YET #
  1509. KILL$UC(KILLCODE"MULREQ");
  1510. TEST I;
  1511. END # PREVIOUS REQUEST NOT PROCESSED YET #
  1512.  
  1513. IF CPR$RQT[0] EQ TYP"TYP0" OR CPR$RQT[0] GQ TYP"TYPLST"
  1514. THEN
  1515. BEGIN # TYPE CODE OUT OF RANGE #
  1516. KILL$UC(KILLCODE"INVRQT");
  1517. TEST I;
  1518. END # TYPE CODE OUT OF RANGE #
  1519.  
  1520. #
  1521. * SET THE LONG TERM CONNECT TABLE ENTRY TO REFLECT THE CURRENT
  1522. * REQUEST.
  1523. #
  1524.  
  1525. LTC$WORD3[LTCENTRY] = CPR3[0];
  1526. LTC$UCPA[LTCENTRY] = UCP$ADDR[0];
  1527.  
  1528. #
  1529. * CALL THE APPROPRIATE REQUEST PROCESSOR.
  1530. #
  1531.  
  1532. GOTO TYPSW[CPR$RQT[0]];
  1533.  
  1534. TYPE1:
  1535. LINK$RP;
  1536. TEST I;
  1537.  
  1538. TYPE2:
  1539. TYP2$RP;
  1540. TEST I;
  1541.  
  1542. TYPE3:
  1543. NONQ$RP;
  1544. TEST I;
  1545.  
  1546. TYPE4:
  1547. QUE$RP;
  1548. TEST I;
  1549.  
  1550. TYPE5:
  1551. ALT$RP;
  1552. TEST I;
  1553.  
  1554. END # PROCESS REQUEST FROM *UCP* #
  1555.  
  1556. END # PROCESS *UCP* REQUEST #
  1557.  
  1558. #
  1559. * RETURN TO THE CALLER WHEN THERE IS NO REQUEST TO
  1560. * PROCESS OR NO REQUEST CAN BE PROCESSED.
  1561. #
  1562.  
  1563. RETURN;
  1564. END # UCP$RP #
  1565.  
  1566. TERM
  1567. PROC UCP$WRI((LLRQADDR2),(WORDCOUNT),(SCPADDR),RSTATUS);
  1568. # TITLE UCP$WRI - PASS DATA TO *UCP*. #
  1569.  
  1570. BEGIN # UCP$WRI #
  1571.  
  1572. #
  1573. ** UCP$WRI - PASS DATA TO *UCP*.
  1574. *
  1575. * *UCP$WRI* ISSUES AN *SF.WRIT* TO TRANSFER INFORMATION BACK
  1576. * TO THE *UCP*.
  1577. *
  1578. * PROC UCP$WRI((LLRQADDR2),(WORDCOUNT),(SCPADDR),RSTATUS)
  1579. *
  1580. * ENTRY LLRQADDR2 = DESTINATION OF DATA IN *UCP*.
  1581. * WORDCOUNT = NUMBER OF WORDS TO BE TRANSFERRED
  1582. * TO *UCP*.
  1583. * SCPADDR = SOURCE OF DATA IN THE *SCP*.
  1584. *
  1585. * EXIT RSTATUS = *SFCALL* ERROR RETURNED TO THE CALLER.
  1586. *
  1587. * NOTE *LTCENTRY* CONTAINS THE ORDINAL OF THE *UCP* LONG
  1588. * TERM CONNECT TABLE ENTRY.
  1589. *
  1590. #
  1591.  
  1592. ITEM LLRQADDR2 U; # DESTINATION OF DATA IN *UCP* #
  1593. ITEM WORDCOUNT U; # NUMBER OF WORDS TO BE
  1594.   TRANSFERRED #
  1595. ITEM SCPADDR U; # SOURCE OF DATA IN *SCP* #
  1596. ITEM RSTATUS U; # *SFCALL* ERROR RETURNED TO
  1597.   CALLER #
  1598.  
  1599. #
  1600. **** PROC UCP$WRI - XREF LIST BEGIN.
  1601. #
  1602.  
  1603. XREF
  1604. BEGIN
  1605. PROC SFCALL; # INTERFACE TO *SFCALL* MACRO #
  1606. END
  1607.  
  1608. #
  1609. **** PROC UCP$WRI - XREF LIST END.
  1610. #
  1611.  
  1612.  
  1613.  
  1614. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
  1615. *CALL COMBFAS
  1616. *CALL COMBUCR
  1617. *CALL COMXLTC
  1618. *CALL COMXMSC
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624. #
  1625. * SET UP AN *SFCALL* REQUEST FOR AN *SF.WRIT* AND ISSUE IT.
  1626. #
  1627.  
  1628. LTC$SFUCPA[LTCENTRY] = LLRQADDR2;
  1629. LTC$SFSCPA[LTCENTRY] = SCPADDR;
  1630. LTC$SFFP[LTCENTRY] = WORDCOUNT;
  1631. LTC$SFFC[LTCENTRY] = SFWRIT;
  1632. SFCALL(LOC(LTC$WORD0[LTCENTRY]),RCL);
  1633. RSTATUS = LTC$SFRC[LTCENTRY];
  1634. RETURN;
  1635. END # UCP$WRI #
  1636.  
  1637. TERM