Table of Contents

ISF

Table Of Contents

  • [00010] ISF - INITIALIZE SYSTEM FILES.
  • [00012] INITIALIZE SYSTEM FILES.
  • [00121] DATA ASSIGNMENTS.
  • [00149] MAIN PROGRAM.
  • [00151] MAIN PROGRAM.
  • [00181] END - TERMINATION PROCESSING.
  • [00195] TSFN - TABLE OF SPECIAL FILE NAMES.
  • [00205] TDFF - TABLE OF DEFAULT FAMILY SPECIAL FILE NAMES.
  • [00217] EDF - ENTER DEFAULT FAMILY FILE.
  • [00300] EFF - ENTER FAST ATTACH FILE.
  • [00333] RTF - RETURN FAST ATTACH FILE.
  • [00367] SJF - SUBMIT JOB FILE.
  • [00398] SPC - SET PROCEDURE CALL.
  • [00429] SUBROUTINES.
  • [00431] CER - CHECK ERROR AND ISSUE MESSAGE.
  • [00452] CES - CHECK AND CLEAR ERROR STATUS IN FET.
  • [00476] PEC - PROCESS EXIT CLEANUP.
  • [00486] RIF - RESTORE INITIAL FAMILY.
  • [00502] RPF - RETURN PROFILE FILE.
  • [00518] SFF - SET FILE NAME IN FET.
  • [00537] WMV - WAIT FOR *1MV* TO COMPLETE.
  • [00618] PRESET.
  • [00633] PRS - PRESET PROGRAM.
  • [00817] CFC - CHECK FILE COUNT.

Source Code

ISF.txt
  1. IDENT ISF,FWA
  2. ABS
  3. SST
  4. ENTRY ISF
  5. ENTRY RFL=
  6. ENTRY SSJ=
  7. SYSCOM B1 DEFINE (B1) = 1
  8. *COMMENT ISF - INITIALIZE SYSTEM FILES.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. TITLE ISF - INITIALIZE SYSTEM FILES.
  11. SPACE 4
  12. *** ISF - INITIALIZE SYSTEM FILES.
  13. * G. R. MANSFIELD. 71/07/07.
  14. * S. L. KSANDER. 75/04/28.
  15. * P. C. SMITH. 78/01/30.
  16. SPACE 4
  17. *** ISF PROCESSES AND/OR INITIALIZES SPECIAL SYSTEM FILES.
  18. * ALL FILES ARE FOUND ON USER NAME *SYSTEMX* (UI = 377777).
  19. *
  20. * COMMAND FORMAT -
  21. *
  22. * ISF(R=FILE1,E=FILE2,FM=FAMILY,SJ=FILE3,SP=FILE4)
  23. *
  24. * R = RETURN FAST ATTACH FILE.
  25. * *FILE1* = NAME OF FILE TO BE RETURNED.
  26. * IF R=0, ALL FAST ATTACH FILES WILL BE RETURNED.
  27. *
  28. * E = ENTER NEW FILE.
  29. * *FILE2* = NAME OF FILE TO BE ENTERED.
  30. * IF E=0, ALL FILES WILL BE ENTERED.
  31. * FAST ATTACH FILES MUST BE RETURNED BEFORE THEY
  32. * ARE RE-ENTERED. R AND E OPTIONS CAN NOT APPEAR ON THE
  33. * SAME COMMAND.
  34. *
  35. * FM = FAMILY NAME.
  36. * IF NOT PRESENT, *ISF* WILL PROCESS FILES FOR THE
  37. * JOBS FAMILY.
  38. *
  39. * IF PRESENT, *ISF* WILL PROCESS FILES BELONGING TO THE
  40. * SPECIFIED FAMILY. IF THE *E=0* OPTION IS SELECTED,
  41. * RESOURCE FILES WILL BE SET UP, IF THEY ARE NOT
  42. * ALREADY PRESENT IN FAST ATTACH MODE. IF THE *R=0*
  43. * OPTION IS SELECTED, RESOURCE FILE OPERATIONS ARE
  44. * IGNORED. THE JOB-S FAMILY WILL BE RESTORED UPON
  45. * EXIT FROM *ISF*.
  46. *
  47. * SJ = SUBMIT JOB WHEN ISF IS COMPLETE.
  48. * *FILE3* = NAME OF JOB FILE TO BE SUBMITTED
  49. * (MUST BE INDIRECT ACCESS PERMANENT FILE).
  50. * IF *SJ* IS SPECIFIED BUT NOT EQUIVALENCED,
  51. * *SYSJOB* WILL BE SUBMITTED. IF SJ=0,
  52. * NO JOB WILL BE SUBMITTED.
  53. *
  54. * SP = CALL PROCEDURE FILE WHEN ISF IS COMPLETE.
  55. * *FILE4* = NAME OF PROCEDURE FILE TO BE CALLED
  56. * (MUST BE INDIRECT ACCESS PERMANENT FILE).
  57. * IF *SP* IS SPECIFIED BUT NOT EQUIVALENCED,
  58. * *SYSPROC* WILL BE CALLED. IF SP=0,
  59. * NO PROCEDURE FILE WILL BE CALLED.
  60. *
  61. * NOTES -
  62. *
  63. * IF THE R OR E OPTION IS SPECIFIED FOR ONE OF THE
  64. * RESOURCE FILES (RSXDXX OR RSXVXX), THE OPERATION WILL
  65. * ALSO BE PERFORMED AUTOMATICALLY ON THE OTHER FILE.
  66. *
  67. * IF THE *R* OPTION IS SPECIFIED THE PROFILE FILE (IF IT
  68. * EXISTS) IS ATTACHED IN WRITE MODE. THIS IS AN INTERLOCK
  69. * TO PREVENT *CHARGE* COMMAND PROCESSING IN THE FAMILY FOR
  70. * THE DURATION OF THE *ISF* EXECUTION.
  71. *
  72. * ASSUMED -
  73. * E = 0.
  74. * FM = 0.
  75. * SJ = 0.
  76. * SP = 0.
  77. * R NOT SELECTED.
  78. SPACE 4
  79. *** DAYFILE MESSAGES -
  80. *
  81. * * ARGUMENT ERROR.*
  82. * INCORRECT PARAMETER OR COMBINATION OF PARAMETERS.
  83. *
  84. * * FAMILY FILES ACTIVE.*
  85. * THE NUMBER OF ACTIVE DIRECT ACCESS FILES ON THE
  86. * FAMILY IS GREATER THAN THE NUMBER OF FAST
  87. * ATTACH FILES.
  88. *
  89. * * FILE NOT IN ALTERNATE FAMILY.*
  90. * FAMILY SPECIFIED FOR DEFAULT FAMILY FILE.
  91. *
  92. * * INCORRECT FAMILY NAME.*
  93. * FAMILY NOT FOUND.
  94. *
  95. * * INCORRECT FILE NAME.*
  96. * FILE NAME NOT ON LIST OF SPECIAL FILES.
  97. *
  98. * * ISF COMPLETE.*
  99. * OPERATION COMPLETE.
  100. SPACE 4,10
  101. **** ASSEMBLY CONSTANTS.
  102.  
  103.  
  104. SBUFL EQU ESMX*ESTE+77B/100B*100B+1 FILE BUFFER LENGTH
  105. RDFL EQU 36B-1 (LENGTH - 1) OF RSXDXX IN PRUS
  106. RVFL EQU 36B-1 (LENGTH - 1) OF RSXVXX IN PRUS
  107.  
  108. ****
  109. SPACE 4
  110. *CALL COMCMAC
  111. *CALL COMCCMD
  112.  
  113. *CALL COMSACC
  114. *CALL COMSPFM
  115. *CALL COMSPRD
  116. *CALL COMSPRO
  117. *CALL COMSSCD
  118. *CALL COMSSFM
  119. *CALL COMSSSJ
  120. *CALL COMSSSD
  121. TITLE DATA ASSIGNMENTS.
  122. DATA SPACE 4
  123. ** DATA ASSIGNMENTS.
  124.  
  125.  
  126. ORG 110B
  127. FWA BSS 0
  128.  
  129. S BSS 0
  130. SYSTEM FILEB SBUF,SBUFL,(FET=CFLM),EPR
  131.  
  132. T BSS 0 PROFILE FILE
  133. SCR FILEB 0,0,(FET=CFPK+1),EPR
  134.  
  135. SSJ= BSS 0 SPECIAL SYSTEM JOB PARAMETER BLOCK
  136. VFD 36/0,12/ISCS,12/UJSI
  137. BSSZ SSJL-1
  138.  
  139.  
  140. * TEMPORARY STORAGE.
  141.  
  142. ESTO CON 0 EST ORDINAL FOR SUSPECT SEARCH
  143. FAMD CON 0L0 SYSTEM DEFAULT FAMILY
  144. FAMN CON 0 NEW FAMILY
  145. FAMU CON 0 USER-S FAMILY
  146. LEST CON 0 LAST EST ORDINAL + 1
  147. PRAF CON 0 PROFILE ATTACHED FLAG
  148. RSBP CON 0 *RSB* POINTER
  149. TITLE MAIN PROGRAM.
  150. ISF SPACE 4
  151. ** ISF - MAIN PROGRAM.
  152.  
  153.  
  154. ISF SB1 1 PRESET PROGRAM
  155. RJ PRS
  156. RJ WMV WAIT FOR *1MV* TO COMPLETE
  157. SX5 TSFNL NUMBER OF SPECIAL FILES
  158.  
  159. * EAF - ENTER ALL FILES.
  160.  
  161. EAF SX5 X5-1 (RETURN POINT FROM PROCESSORS)
  162. NG X5,EAF1 IF NO MORE SPECIAL FILES
  163. SA1 TSFN+X5 SPECIAL FILE NAME
  164. ZR X1,EAF IF FILE NAME CLEARED
  165. MX0 42
  166. SB2 X1+ PROCESSOR ADDRESS
  167. BX1 X0*X1
  168. JP B2 ENTER SPECIAL FILE
  169.  
  170. EAF1 SX5 TDFFL NUMBER OF DEFAULT FAMILY FILES
  171. EAF2 SX5 X5-1
  172. NG X5,END IF NO MORE DEFAULT FAMILY FILES
  173. SA1 TDFF+X5 DEFAULT FAMILY SPECIAL FILE NAME
  174. ZR X1,EAF2 IF FILE NAME CLEARED
  175. MX0 42
  176. SX6 X1+ LENGTH OF FILE IN PRUS
  177. BX1 X0*X1
  178. RJ EDF ENTER DEFAULT FAMILY FILE
  179. EQ EAF2 PROCESS NEXT FILE
  180. END SPACE 4,10
  181. ** END - TERMINATION PROCESSING.
  182.  
  183.  
  184. END RJ SJF SUBMIT JOB FILE
  185. RJ SPC SET PROCEDURE FILE CALL
  186. RJ RPF RETURN PROFILE FILE
  187. MESSAGE (=C* ISF COMPLETE.*)
  188. SA1 SPCB+1
  189. ZR X1,END1 IF NO PROCEDURE FILE
  190. EXCST SPCB CALL PROCEDURE FILE
  191.  
  192. END1 RJ RIF RESTORE INITIAL FAMILY
  193. ENDRUN
  194. SPACE 4
  195. ** TSFN - TABLE OF SPECIAL FILE NAMES.
  196. *
  197. *T 42/FILE NAME,18/PROCESSOR ADDRESS
  198.  
  199.  
  200. TSFN BSS 0
  201. CON 0L"APFN"+EFF VALIDATION FILE
  202. PRFN CON 0L"PPFN"+EFF PROJECT PROFILE FILE
  203. TSFNL EQU *-TSFN
  204. TDFF SPACE 4,10
  205. ** TDFF - TABLE OF DEFAULT FAMILY SPECIAL FILE NAMES.
  206. * (THIS TABLE IS A CONTINUATION OF TSFN, AND MUST FOLLOW IT.)
  207. *
  208. *T 42/FILE NAME,18/FILE SIZE
  209.  
  210.  
  211. TDFF BSS 0
  212. RDFN CON 0LRSXDXX+RDFL RESOURCE DEMAND FILE
  213. RVFN CON 0LRSXVXX+RVFL RESOURCE VSN FILE
  214. TDFFL EQU *-TDFF
  215. CON 0 END OF TABLE
  216. ERF SPACE 4
  217. ** EDF - ENTER DEFAULT FAMILY FILE.
  218. *
  219. * IF FILE IS PRESENT AS FAST ATTACH, ACCEPT IT AS IS.
  220. * OTHERWISE, DEFINE THE FILE IF NECESSARY AND INITIALIZE IT.
  221. *
  222. * ENTRY (X1) = FILE NAME.
  223. * (X6) = SIZE OF FILE IN PRUS.
  224. *
  225. * USES X - 0, 1, 6, 7.
  226. * A - 1, 6, 7.
  227. *
  228. * CALLS CES.
  229. *
  230. * MACROS ATTACH, DEFINE, ENFA, MESSAGE, PURGE, RECALL, RETURN,
  231. * WRITER, WRITEW.
  232.  
  233.  
  234. EDF4 RETURN X2
  235.  
  236. EDF SUBR ENTRY/EXIT
  237. SA6 EDFA SAVE FILE SIZE
  238. SX7 B1
  239. BX7 X1+X7
  240. RECALL S
  241. SA7 X2+
  242. ATTACH X2,,,,R,,,DF,FA ATTEMPT FAST ATTACH
  243. RJ CES CHECK FET ERROR STATUS
  244. ZR X0,EDF4 IF FILE IS ALREADY FAST ATTACH
  245. NZ X3,EDF3 IF NOT *FILE NOT FOUND*
  246. ATTACH X2,,,,W,,,DF,IE ATTEMPT REGULAR ATTACH
  247. RJ CES CHECK ERROR STATUS
  248. ZR X0,EDF1 IF ATTACH SUCCESSFUL
  249. ZR X3,EDF0 IF *FILE NOT FOUND*
  250.  
  251. * FOR ERROR OTHER THAN *FILE NOT FOUND*, PURGE EXISTING FILE.
  252.  
  253. PURGE X2,,,,,DF,IE
  254. RJ CES CHECK ERROR STATUS
  255. NZ X0,EDF3 IF ERROR IN PURGE
  256.  
  257. * CREATE A NEW RESOURCE FILE. THE FILE WILL BE CREATED WITH
  258. * *BR=N* TO AVOID THE NECESSITY OF *PFDUMP* PROCESSING, AND
  259. * TO PREVENT A POTENTIAL DEADLOCK BETWEEN *PFDUMP* AND *RESEX*.
  260.  
  261. EDF0 SA1 X2+B1 CLEAR DEVICE TYPE IN FET
  262. MX0 12
  263. BX6 -X0*X1
  264. SA6 A1
  265. DEFINE X2,,,,,,,,,DF,N,,IE
  266. RJ CES CHECK ERROR STATUS
  267. NZ X0,EDF3 IF ERROR IN DEFINE
  268. EDF1 SA1 X2+B1 SET OUT=IN=FIRST
  269. SX6 X1
  270. SA6 A1+B1
  271. SA6 A6+B1
  272.  
  273. * INITIALIZE RESOURCE FILE.
  274.  
  275. SA1 X2+B1 CLEAR ERROR PROCESSING BIT
  276. MX6 1
  277. LX6 44-59
  278. BX6 -X6*X1
  279. SA6 A1
  280. WRITER X2,R WRITE INITIAL EOR
  281. SA1 EDFA LENGTH OF FILE
  282. SX0 X1+
  283. EDF2 SX0 X0-1
  284. WRITEW X2,ZBUF,64 WRITE SECTOR OF DATA
  285. NZ X0,EDF2 IF NOT COMPLETE
  286. WRITER X2,R WRITE FINAL BUFFER OF DATA
  287. SA1 X2+B1 SET ERROR PROCESSING BIT
  288. MX6 1
  289. LX6 44-59
  290. BX6 X6+X1
  291. SA6 A1
  292. ENFA X2 ENTER LOCAL FAST ATTACH
  293. EQ EDF4 RETURN
  294.  
  295. EDF3 MESSAGE CERM ISSUE ERROR MESSAGE
  296. EQ EDFX RETURN
  297.  
  298. EDFA CON 0 FILE SIZE
  299. EFF SPACE 4,15
  300. ** EFF - ENTER FAST ATTACH FILE.
  301. *
  302. * ENTRY (X1) = FILE NAME.
  303. *
  304. * EXIT TO EAF.
  305. *
  306. * CALLS CES, SFF.
  307. *
  308. * MACROS ATTACH, ENFA, MESSAGE, RETURN.
  309.  
  310.  
  311. EFF BSS 0 ENTRY
  312. RJ SFF SET FILE NAME IN FET
  313. ATTACH X2,,,,W,,,IP,FA ATTEMPT FAST ATTACH
  314. RJ CES CHECK ERROR STATUS
  315. ZR X0,EFF0 IF FILE IS ALREADY FAST ATTACH
  316. ZR X6,EFF0 IF *FILE BUSY*
  317. NZ X3,EFF2 IF NOT *FILE NOT FOUND*
  318. ATTACH X2,,,,W,,,IP,IE ATTEMPT NORMAL ATTACH
  319. RJ CES CHECK ERROR STATUS
  320. NZ X0,EFF1 IF ERROR IN ACCESS
  321. ENFA X2,GLOBAL ENTER GLOBAL FAST ATTACH FILE
  322. EFF0 RETURN X2
  323. EQ EAF PROCESS NEXT FILE
  324.  
  325. EFF1 NZ X6,EFF2 IF NOT *FILE BUSY*
  326. ENFA X2,LINK LINK TO EXISTING FAST ATTACH
  327. RETURN X2
  328. EQ EAF PROCESS NEXT FILE
  329.  
  330. EFF2 MESSAGE CERM ISSUE ERROR MESSAGE
  331. EQ EAF PROCESS NEXT FILE
  332. RTF SPACE 4,10
  333. ** RTF - RETURN FAST ATTACH FILE.
  334. *
  335. * ENTRY (X1) = FILE NAME.
  336. *
  337. * USES X - 0, 2, 7.
  338. * A - 2, 7.
  339. *
  340. * CALLS CER, SFF.
  341. *
  342. * MACROS ATTACH, DFAT, RETURN.
  343.  
  344.  
  345. RTF SUBR ENTRY/EXIT
  346. SA2 PRFN
  347. BX2 X2-X1
  348. MX0 42
  349. BX7 X0*X2
  350. NZ X7,RTF1 IF NOT ATTACHING PROFILE
  351. SA2 PRAF
  352. ZR X2,RTFX IF PROFILE DOES NOT EXIST
  353. MX7 0 CLEAR PROFILE ATTACHED FLAG
  354. SA7 PRAF
  355. DFAT T
  356. RETURN T
  357. EQ RTFX RETURN
  358.  
  359. RTF1 RJ SFF SET FILE NAME IN FET
  360. ATTACH X2,,,,W,,,IP,FA
  361. RJ CER CHECK ERROR STATUS
  362. NZ X0,RTFX IF ERROR IN ACCESS
  363. DFAT X2
  364. RETURN X2
  365. EQ RTFX RETURN
  366. SJF SPACE 4,15
  367. ** SJF - SUBMIT JOB FILE.
  368. *
  369. * ENTRY (SJFA) = SUBMIT JOB FILE NAME.
  370. *
  371. * EXIT JOB SUBMITTED, IF FOUND.
  372. *
  373. * USES X - 1, 6.
  374. * A - 1.
  375. *
  376. * CALLS CER, SFF.
  377. *
  378. * MACROS GET, ROUTE.
  379.  
  380.  
  381. SJF SUBR ENTRY/EXIT
  382. SA1 SJFA
  383. MX6 42
  384. BX1 X6*X1
  385. ZR X1,SJFX IF NO SUBMIT JOB
  386. RJ SFF SET FILE NAME IN FET
  387. GET X2,,,,,,IP,IE GET SUBMIT JOB FILE
  388. RJ CER CHECK ERROR
  389. NZ X0,SJFX IF ERROR
  390. ROUTE SJFA,R SUBMIT SYSTEM-ORIGIN JOB
  391. EQ SJFX RETURN
  392.  
  393. SJFA BSS 0 *DSP* PARAMETER BLOCK
  394. VFD 42/0,6/0,1/1,4/0,6/SYOT,1/0
  395. VFD 24/0,12/2RIN,12/40B,12/22B
  396. BSSZ 5
  397. SPC SPACE 4,15
  398. ** SPC - SET PROCEDURE CALL.
  399. *
  400. * ENTRY (SPCA) = PROCEDURE FILE NAME.
  401. *
  402. * EXIT FILE NAME SET IN CALL, IF FILE FOUND.
  403. *
  404. * USES X - 1.
  405. * A - 1, 6.
  406. *
  407. * CALLS CER, SFF, SFN.
  408. *
  409. * MACROS GET, SETFS.
  410.  
  411.  
  412. SPC SUBR ENTRY/EXIT
  413. SA1 SPCA
  414. ZR X1,SPCX IF NO PROCEDURE FILE
  415. RJ SFF SET FILE NAME IN FET
  416. GET X2,,,,,,IP,IE GET PROCEDURE FILE
  417. RJ CER CHECK ERROR
  418. NZ X0,SPCX IF ERROR
  419. SETFS X2,0 CLEAR SPECIAL SYSTEM FILE STATUS
  420. SA1 SPCA SET PROCEDURE FILE NAME IN CALL
  421. RJ SFN
  422. SA6 SPCB+1
  423. EQ SPCX RETURN
  424.  
  425. SPCA CON 0 PROCEDURE FILE NAME
  426. SPCB CON 10H$BEGIN,,
  427. CON 0
  428. CON 1L.
  429. TITLE SUBROUTINES.
  430. CER SPACE 4,10
  431. ** CER - CHECK ERROR AND ISSUE MESSAGE.
  432. *
  433. * ENTRY (X2) = FWA OF FET.
  434. *
  435. * EXIT (X0) = FET ERROR STATUS.
  436. *
  437. * USES X - 0.
  438. *
  439. * CALLS CES.
  440. *
  441. * MACROS MESSAGE.
  442.  
  443.  
  444. CER SUBR ENTRY/EXIT
  445. RJ CES CHECK ERROR STATUS
  446. ZR X0,CERX IF NO ERROR
  447. MESSAGE CERM
  448. EQ CERX
  449.  
  450. CERM BSSZ 4 ERROR MESSAGE BUFFER
  451. CES SPACE 4,10
  452. ** CES - CHECK AND CLEAR ERROR STATUS IN FET.
  453. *
  454. * ENTRY (X2) = FWA OF FET.
  455. *
  456. * EXIT (X0) = FET ERROR STATUS.
  457. * (X3) = 0 IF *FILE NOT FOUND* STATUS.
  458. * (X6) = 0 IF *FILE BUSY* STATUS.
  459. *
  460. * USES A - 1, 6.
  461. * X - 0, 1, 3, 6.
  462.  
  463.  
  464. CES SUBR ENTRY/EXIT
  465. SA1 X2 READ FET STATUS
  466. MX3 -8
  467. LX1 -10
  468. BX0 -X3*X1 ERROR STATUS
  469. BX6 X3*X1 CLEAR STATUS IN FET
  470. SX3 X0-/ERRMSG/FNF *FILE NOT FOUND* STATUS
  471. LX6 10
  472. SA6 A1+
  473. SX6 X0-/ERRMSG/FBS *FILE BUSY* STATUS
  474. EQ CESX RETURN
  475. PEC SPACE 4,10
  476. ** PEC - PROCESS EXIT CLEANUP.
  477. *
  478. * CALLS RIF, RPF.
  479.  
  480.  
  481. PEC SUBR ENTRY/EXIT
  482. RJ RIF RESTORE INITIAL FAMILY
  483. RJ RPF RETURN PROFILE FILE
  484. EQ PECX RETURN
  485. RIF SPACE 4,10
  486. ** RIF - RESTORE INITIAL FAMILY.
  487. *
  488. * USES A - 1.
  489. * X - 1, 6.
  490. *
  491. * MACROS ENFAM.
  492.  
  493.  
  494. RIF SUBR ENTRY/EXIT
  495. SA1 FAMU
  496. ZR X1,RIFX IF USER-S FAMILY NOT SET
  497. ENFAM FAMU RESTORE FAMILY
  498. MX6 0 CLEAR USER-S FAMILY
  499. SA6 FAMU
  500. EQ RIFX RETURN
  501. RPF SPACE 4,10
  502. ** RPF - RETURN PROFILE FILE.
  503. *
  504. * USES A - 1, 6.
  505. * X - 1, 6.
  506. *
  507. * MACROS RETURN.
  508.  
  509.  
  510. RPF SUBR ENTRY/EXIT
  511. SA1 PRAF
  512. ZR X1,RPFX IF PROFILE NOT ATTACHED
  513. MX6 0
  514. SA6 PRAF CLEAR PROFILE ATTACHED FLAG
  515. RETURN T
  516. EQ RPFX RETURN
  517. SFF SPACE 4,10
  518. ** SFF - SET FILE NAME IN FET.
  519. *
  520. * ENTRY (X1) = FILE NAME.
  521. *
  522. * EXIT (X2) = FWA OF FET.
  523. *
  524. * USES X - 2, 7.
  525. * A - 7.
  526. *
  527. * MACROS RECALL.
  528.  
  529.  
  530. SFF SUBR ENTRY/EXIT
  531. SX7 B1 STORE FILE NAME
  532. BX7 X1+X7
  533. RECALL S
  534. SA7 X2
  535. EQ SFFX RETURN
  536. WMV SPACE 4,10
  537. ** WMV - WAIT FOR *1MV* TO COMPLETE.
  538. *
  539. * USES X - ALL.
  540. * A - 1, 2, 5, 6, 7.
  541. *
  542. * CALLS RSB=.
  543. *
  544. * MACROS MESSAGE, RECALL, SYSTEM.
  545.  
  546.  
  547. WMV SUBR ENTRY/EXIT
  548. MESSAGE (=C* WAIT 1MV COMPLETE.*),1
  549. SA1 WMVA READ EST POINTER WORD
  550. MX6 1
  551. BX7 X1
  552. SA6 SBUF SET LOW CORE READ
  553. SA7 RSBP
  554. SYSTEM RSB,R,RSBP READ *ESTP*
  555. SA2 SBUF SET *COMCRSB* ENTRY CONDITIONS
  556. MX3 -12
  557. SX1 A2 SET ADDRESS TO TRANSFER TO
  558. AX2 12
  559. BX7 -X3*X2
  560. AX2 24 SET ADDRESS TO TRANSFER FROM
  561. R= X6,ESTE
  562. SA7 LEST SAVE LAST EST ORDINAL + 1
  563. IX3 X7*X6 SET WORD COUNT
  564. SX4 B0 SET SUBSYSTEM (= *CMR*)
  565. MX6 1
  566. SA6 X1
  567. RJ RSB= READ EST INTO *SBUF*
  568. SX6 NOPE INITIALIZE EST ORDINAL FOR SEARCH
  569. SA6 ESTO
  570. WMV1 SA5 ESTO
  571. SX7 X5+B1
  572. SA7 A5
  573. SA1 LEST CHECK ORDINAL
  574. IX6 X5-X1
  575. R= X0,ESTE
  576. IX7 X5*X0
  577. SA1 SBUF+X7+EQDE GET EST ENTRY
  578. MX0 -12
  579. ZR X6,WMVX IF END OF EST
  580. PL X1,WMV1 IF NOT MASS STORAGE
  581. SX7 MSTB SET MST BUFFER ADDRESS
  582. SX2 MSTL
  583. BX1 -X0*X1
  584. LX2 36
  585. LX1 18+3 MST ADDRESS
  586. BX7 X7+X2
  587. BX7 X1+X7
  588. SA7 RSBP
  589. WMV2 MX6 1
  590. SA6 MSTB FLAG LOW CORE READ
  591. SYSTEM RSB,R,RSBP READ MST
  592. SA1 MSTB+DALL CHECK FOR SUSPECT
  593. SX6 1200B
  594. SX7 200B
  595. LX1 12
  596. BX1 X6*X1
  597. BX1 X7-X1
  598. NZ X1,WMV1 IF *OFF*, *DOWN*, OR NOT SUSPECT
  599. RECALL
  600. EQ WMV2 RECHECK DEVICE FOR SUSPECT
  601.  
  602. WMVA VFD 24/1,18/ESTP,18/SBUF
  603. SPACE 4
  604. * COMMON DECKS.
  605.  
  606.  
  607. *CALL COMCQFM
  608. *CALL COMCCIO
  609. *CALL COMCCPM
  610. *CALL COMCLFM
  611. *CALL COMCPFM
  612. *CALL COMCRDW
  613. *CALL COMCRSB
  614. *CALL COMCSFM
  615. *CALL COMCSFN
  616. *CALL COMCSYS
  617. *CALL COMCWTW
  618. TITLE PRESET.
  619. BUFFERS SPACE 4,10
  620. * BUFFERS.
  621.  
  622.  
  623. USE //
  624. SEG
  625.  
  626. ZBUF BSSZ 100B SECTOR OF ZEROES
  627. SBUF BSS SBUFL CIO BUFFER FOR S
  628. MSTB BSS MSTL MST BUFFER
  629. RFL= EQU *+8 ALLOW FOR *COMCWTW* LOOK-AHEAD
  630.  
  631. ORG SBUF
  632. PRS SPACE 4
  633. ** PRS - PRESET PROGRAM.
  634.  
  635.  
  636. PRS SUBR ENTRY/EXIT
  637. SX7 CERM SET ERROR MESSAGE BUFFER ADDRESS
  638. SA7 S+CFPW
  639. MACHID PRSA RETRIEVE MACHINE ID
  640. SA3 PRSA
  641. MX0 12
  642. SA1 RDFN SET ID IN RESEX FILE NAMES
  643. SA2 RVFN
  644. LX0 -24
  645. BX1 -X0*X1
  646. LX3 24
  647. BX2 -X0*X2
  648. BX6 X3+X1
  649. SA6 A1
  650. BX7 X3+X2
  651. SA7 A2
  652. SA1 ACTR
  653. SB4 X1
  654. ZR B4,PRSX IF NO ARGUMENTS
  655. SA4 ARGR FIRST ARGUMENT
  656. SB5 TARG ARGUMENT TABLE
  657. RJ ARG
  658. NZ X1,PRS16.1 IF ERROR
  659.  
  660. * CHANGE TO SPECIFIED FAMILY.
  661.  
  662. ENFAM FAMD SET DEFAULT FAMILY
  663. SA1 FAMD SAVE USER-S FAMILY NAME
  664. MX0 48
  665. BX6 X0*X1
  666. SA6 FAMU
  667. SA1 FAM SAVE NEW FAMILY NAME
  668. BX7 X1
  669. SA7 FAMN
  670. NZ X1,PRS1 IF *FM* SPECIFIED
  671. SA6 FAMN USE USER-S FAMILY
  672. PRS1 ENFAM FAMN SET FAMILY WHERE FILES ARE LOCATED
  673. SA1 FAMN
  674. BX6 X0*X1
  675. LX1 59-11
  676. NG X1,PRS17 IF INCORRECT FAMILY
  677. SA6 FAMD
  678.  
  679. * CHECK FILE RETURN REQUEST.
  680.  
  681. SA1 RET
  682. ZR X1,PRS11 IF NO RETURN
  683. SA2 ENT
  684. NZ X2,PRS16 IF BOTH *E* AND *R* SPECIFIED
  685. RJ CFC CHECK FILE COUNT
  686. SA1 RET
  687. SX3 0L0
  688. LX3 42
  689. BX2 X1-X3
  690. ZR X2,PRS7 IF ALL FILES TO BE RETURNED
  691.  
  692. * PROCESS *R*=FILENAME.
  693. * SEARCH FILE LIST.
  694.  
  695. SB4 TSFN SEARCH SPECIAL FILE TABLE
  696. SB5 TSFN+TSFNL
  697. SB3 B1+ DONT FORCE DEFAULT FAMILY
  698. PRS2 SA2 B4
  699. BX7 X2-X1
  700. SB4 B4+B1
  701. AX7 18
  702. ZR X7,PRS3 IF FOUND
  703. LT B4,B5,PRS2 IF NOT END OF TABLE
  704. ZR B3,PRS14 IF NOT VALID FILE NAME
  705. SB4 TDFF
  706. SB5 TDFF+TDFFL
  707. SB3 B0 FORCE DEFAULT FAMILY
  708. EQ PRS2 SEARCH DEFAULT FAMILY FILE TABLE
  709.  
  710. PRS3 NZ B3,PRS6 IF NOT DEFAULT FAMILY FILE
  711. SA3 FAM
  712. NZ X3,PRS4 IF *FM* SPECIFIED
  713. SA3 FAMU GET USER-S FAMILY
  714. PRS4 SA2 FAMD
  715. BX3 X3-X2
  716. AX3 18
  717. NZ X3,PRS18 IF NOT DEFAULT FAMILY
  718. SX5 B4-RDFN-1
  719. ZR X5,PRS5 IF RESOURCE DEMAND FILE
  720. SX5 B4-RVFN-1
  721. NZ X5,PRS6 IF NOT RESOURCE VSN FILE
  722. PRS5 SA1 RDFN RETURN BOTH RESOURCE FILES
  723. MX0 42
  724. BX1 X0*X1
  725. RJ RTF RETURN FILE
  726. SA1 RVFN
  727. MX0 42
  728. BX1 X0*X1
  729. PRS6 RJ RTF RETURN FILE
  730. EQ END EXIT
  731.  
  732. * PROCESS *R*=0.
  733. * RETURN SPECIAL FILES IN SPECIFIED FAMILY.
  734.  
  735. PRS7 SX5 TSFNL-1
  736. PRS8 SA1 TSFN+X5
  737. MX0 42
  738. BX1 X0*X1
  739. SX5 X5-1
  740. RJ RTF RETURN FILE
  741. PL X5,PRS8 IF MORE FILES TO RETURN
  742. SA1 FAM GET *FM* FAMILY
  743. NZ X1,PRS9 IF *FM* SPECIFIED
  744. SA1 FAMU GET USER-S FAMILY
  745. PRS9 SA2 FAMD
  746. BX3 X1-X2
  747. AX3 18
  748. NZ X3,END IF .NE. DEFAULT
  749.  
  750. * RETURN DEFAULT FAMILY FILES.
  751.  
  752. SX5 TDFFL-1
  753. PRS10 SA1 TDFF+X5
  754. MX0 42
  755. BX1 X0*X1
  756. SX5 X5-1
  757. RJ RTF RETURN FILE
  758. PL X5,PRS10 IF MORE FILES TO RETURN
  759. EQ END EXIT
  760.  
  761. * CHECK FILE ENTER REQUEST.
  762.  
  763. PRS11 SA1 ENT
  764. ZR X1,PRSX IF NOT SPECIFIED
  765. SX3 0L0
  766. LX3 42
  767. BX2 X1-X3
  768. ZR X2,PRSX IF ALL FILES TO BE ENTERED
  769. SB3 B1 PRESET FILE NOT FOUND
  770. MX6 0
  771. SA2 TSFN SEARCH FILE LIST
  772. SA4 RDFN CHECK FOR BOTH RESOURCE FILES
  773. SA5 RVFN
  774. BX7 X1-X4
  775. BX3 X5 SECOND FILE = RSXVXX
  776. AX7 18
  777. ZR X7,PRS12 IF FILE = RSXDXX
  778. BX7 X1-X5
  779. BX3 X4 SECOND FILE = RSXDXX
  780. AX7 18
  781. ZR X7,PRS12 IF FILE = RSXVXX
  782. SX3 B0+ NO SECOND FILE
  783. PRS12 BX7 X1-X2
  784. AX7 18
  785. ZR X7,PRS15 IF FOUND
  786. BX7 X2-X3 CHECK SECOND FILE
  787. AX7 18
  788. ZR X7,PRS15 IF FOUND
  789. SA6 A2+ ZERO NON-MATCHING ENTRY
  790. PRS13 SA2 A2+B1
  791. NZ X2,PRS12 IF MORE FILE NAMES TO CHECK
  792. ZR B3,PRSX EXIT IF FOUND
  793.  
  794. PRS14 RJ PEC PROCESS EXIT CLEANUP
  795. MESSAGE (=C* INCORRECT FILE NAME.*)
  796. ABORT
  797.  
  798. PRS15 SB3 B0
  799. EQ PRS13 CONTINUE LOOP
  800.  
  801. PRS16 RJ PEC PROCESS EXIT CLEANUP
  802. PRS16.1 MESSAGE (=C* ARGUMENT ERROR.*)
  803. ABORT
  804.  
  805. PRS17 MESSAGE (=C* INCORRECT FAMILY NAME.*)
  806. ABORT
  807.  
  808. PRS18 RJ PEC PROCESS EXIT CLEANUP
  809. MESSAGE (=C* FILE NOT IN ALTERNATE FAMILY.*)
  810. ABORT
  811.  
  812.  
  813. PRSA CON 0 MACHINE ID
  814. PRSB VFD 12/,12/1,18/DSSL,18/PRSC *RSB* STATUS WORD
  815. PRSC CON -1 *RSB* REPLY WORD
  816. CFC SPACE 4,10
  817. ** CFC - CHECK FILE COUNT.
  818. *
  819. * COMPARE ACTIVE DIRECT ACCESS FILE COUNT AND FAST ATTACH
  820. * FILE COUNT. THE PROFILE FILE IS ATTACHED IN WRITE MODE TO
  821. * PREVENT FURTHER *CHARGE* COMMAND PROCESSING.
  822. *
  823. * USES A - 2, 7.
  824. * X - 0, 1, 2, 7.
  825. *
  826. * CALLS CES, RIF.
  827. *
  828. * MACROS ABORT, ATTACH, CFAT, MESSAGE, RECALL, RETURN.
  829.  
  830.  
  831. CFC SUBR ENTRY/EXIT
  832. SA2 PRFN ATTACH PROFILE FILE
  833. MX0 42
  834. SX7 B1
  835. BX2 X0*X2
  836. BX7 X7+X2
  837. RECALL T
  838. SA7 X2+
  839. ATTACH X2,,,,W,,,IP,FA
  840. RJ CES CHECK ERROR (DO NOT PRINT MESSAGE)
  841. ZR X0,CFC1 IF NO ERROR
  842. ZR X3,CFC2 IF *FILE NOT FOUND* ERROR
  843. RJ RIF RESTORE INITIAL FAMILY
  844. ABORT ABORT
  845.  
  846. CFC1 SX7 B1+ SET PROFILE ATTACHED FLAG
  847. SA7 PRAF
  848. CFC2 CFAT S COUNT FAFT FILES
  849. SA2 S+5
  850. SA1 PRAF COMPENSATE FOR ATTACHED PROFILE FILE
  851. IX2 X2-X1
  852. ZR X2,CFCX IF FAFT COUNT = DAF COUNT
  853. ZR X1,CFC3 IF PROFILE NOT ATTACHED
  854. RETURN T
  855. CFC3 RJ RIF RESTORE INITIAL FAMILY
  856. MESSAGE (=C* FAMILY FILES ACTIVE.*)
  857. ABORT ABORT
  858.  
  859.  
  860. * COMMON DECKS.
  861.  
  862.  
  863. *CALL COMCARG
  864.  
  865.  
  866. * ARGUMENT TABLE.
  867.  
  868. TARG BSS 0
  869. E ARG ENT,ENT,400B
  870. FM ARG FAM,FAM,400B
  871. R ARG RET,RET,400B
  872. SJ ARG SJB,SJFA
  873. SP ARG SPF,SPCA
  874. ARG
  875.  
  876.  
  877. * ASSUMED OPTION VALUES.
  878.  
  879. ENT CON 0 FILE TO BE ENTERED
  880. FAM CON 0 ALTERNATE FAMILY NAME
  881. RET CON 0 FILE TO BE RETURNED
  882. SJB VFD 42/0LSYSJOB,6/0,1/1,4/0,6/SYOT,1/0 JOB TO SUBMIT
  883. SPF CON 0LSYSPROC PROCEDURE FILE TO BE CALLED
  884.  
  885. ERRNG RFL=-* IF *PRS* OVERFLOWS *SBUF*
  886.  
  887. END