Table of Contents

GENPFD

Table Of Contents

  • [00007] GENPFD - PERMANENT FILE ARCHIVE SELECTION UTILITY.
  • [00011] PERMANENT FILE ARCHIVE SELECTION UTILITY.
  • [00129] DAYFILE MESSAGES.
  • [00223] COMMON DECKS.
  • [00232] ASSEMBLY CONSTANTS.
  • [00272] MACRO DEFINITIONS.
  • [00276] COPITEM - COPY ITEM FROM ONE FILE TO ANOTHER.
  • [00300] COPYRUN - COPY RUN OF ENTRIES BETWEEN FILES.
  • [00323] GETITEM - GET AN ITEM FROM A FILE.
  • [00347] PUTITEM - WRITE ITEM TO FILE.
  • [00370] RESET - REWIND FILE AND PREPARE FOR READING.
  • [00392] REWRYTE - REWIND FILE AND PREPARE FOR WRITING.
  • [00412] TABLES.
  • [00417] ITEM - INTERNAL PRIORITY SORT RECORD.
  • [00446] TDIR - TABLE OF DIRECTIVES.
  • [00469] TDEN - TABLE OF TAPE DENSITIES AND GAP SIZES.
  • [00502] TFMT - TABLE OF TAPE FORMATS AND BLOCK SIZES.
  • [00519] TPRG - TABLE OF PREFERRED RESIDENCE GROUPS.
  • [00542] TCDV - TABLE OF CATALOG DEVICES.
  • [00568] TSDV - TABLE OF SELECTED DEVICE TYPES AND NUMBERS.
  • [00590] TSFV - TABLE OF SPECIFIC FILE AND VSN SELECTIONS.
  • [00618] GLOBAL CONSTANTS AND VARIABLES
  • [00653] ERROR MESSAGES.
  • [00663] MAIN LOOP.
  • [00786] PRIMARY SUBROUTINES.
  • [00788] ABT - ABORT PROCESSING.
  • [00813] BDT - BUILD DEVICE TABLE.
  • [00887] BSF - BUILD SELECTION FILE.
  • [01171] BUD - BUILD UTILITY DIRECTIVES.
  • [01341] CTL - CONVERT *DT* AND *DL* LENGTHS.
  • [01388] IIS - ISSUE INITIAL STATISTICS.
  • [01466] IFS - ISSUE FINAL STATISTICS.
  • [01613] RCS - RESTORE CHARACTER SET.
  • [01633] SRT - MERGE SORT OF *ITEML* SIZE ENTRIES.
  • [01680] DIRECTIVE PROCESSORS.
  • [01682] PDL - PROCESS *DL* DIRECTIVE.
  • [01711] PDT - PROCESS *DT* DIRECTIVE.
  • [01740] PPG - PROCESS *PG* DIRECTIVE.
  • [01790] PRL - PROCESS *RL* DIRECTIVE.
  • [01951] PSF - PROCESS *SF* AND *XF* DIRECTIVES.
  • [02005] PSV - PROCESS *SV* DIRECTIVE.
  • [02032] PTD - PROCESS *D* DIRECTIVE.
  • [02069] PTF - PROCESS *F* DIRECTIVE.
  • [02095] SECONDARY SUBROUTINES.
  • [02097] CAP - CHECK FOR ALLOWABLE PATTERNS.
  • [02153] GSH - GET SUMMARY RECORD HEADER.
  • [02200] GSR - GET SUMMARY RECORD.
  • [02406] PFV - PROCESS FILE NAMES AND VSN-S.
  • [02520] SORTMERGE PROCESSING SUBROUTINES.
  • [02522] CIT - COPY ONE ITEM FROM ONE FILE TO ANOTHER.
  • [02566] CRN - COPY RUN OF ENTRIES BETWEEN FILES.
  • [02598] DTR - DISTRIBUTE RUNS FROM C ONTO A AND B.
  • [02623] GIT - GET AN ITEM FROM A FILE.
  • [02651] MRG - MERGE PHASE OF MERGESORT.
  • [02710] MRN - MERGE ONE RUN FROM A AND B ONTO C.
  • [02752] PIT - WRITE AN ITEM TO A FILE.
  • [02764] RST - REWIND FILE AND PREPARE FOR READING.
  • [02788] RWR - REWIND FILE AND PREPARE FOR WRITING.
  • [02806] COMMON DECKS.
  • [02831] FILE ENVIRONMENT TABLES.
  • [02862] PRS - PRESET ROUTINES.
  • [02865] PRS - PRESET PROGRAM.

Source Code

GENPFD.txt
  1. IDENT GENPFD,ORIG
  2. ABS
  3. SST
  4. ENTRY GENPFD
  5. ENTRY RFL=
  6. SYSCOM B1
  7. TITLE GENPFD - PERMANENT FILE ARCHIVE SELECTION UTILITY.
  8. *COMMENT GENPFD - PERMANENT FILE ARCHIVE SELECTION UTILITY.
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  10. GENPFD SPACE 4,10
  11. *** GENPFD - PERMANENT FILE ARCHIVE SELECTION UTILITY.
  12. *
  13. * R. E. DUNBAR. 87/02/01.
  14. SPACE 4,10
  15. *** *GENPFD* IS A UTILITY TO GENERATE A *PFDUMP* DIRECTIVE FILE.
  16. *
  17. SPACE 4,20
  18. *** COMMAND FORMAT.
  19. *
  20. *
  21. * GENPFD(P1,P2,...,PN)
  22. * OR
  23. * GENPFD(P1,P2,...,PN)/DIR1,DIR2,...,DIRN.
  24. *
  25. *
  26. * *PN* MAY BE ONE OF THE FOLLOWING -
  27. *
  28. * PARAMETER DESCRIPTION
  29. * --------- -----------
  30. *
  31. * I=IFILE LOCAL FILE NAME OF THE INPUT DIRECTIVE
  32. * FILE. THE DEFAULT NAME IS *INPUT*.
  33. *
  34. * L=OFILE LOCAL FILE NAME OF THE OUTPUT LISTING
  35. * FILE. THE DEFAULT NAME IS *OUTPUT*.
  36. *
  37. * PO=POPT PROCESSING OPTION.
  38. *
  39. * PO=R. SELECT FILES TO BE RELEASED.
  40. * PO=D. SELECT FILES TO BE DESTAGED.
  41. *
  42. * U=UNITS DESTAGE LIMIT/THRESHOLD UNIT OF MEASURE.
  43. *
  44. * U=FT. MEASURED IN FEET OF TAPE.
  45. * U=MB. MEASURED IN MEGABYTES.
  46. * THE DEFAULT IS *U=FT*.
  47. *
  48. * S=PFILE LOCAL FILE NAME OF THE SUMMARY FILE.
  49. * THE DEFAULT NAME IS *SUMMARY*.
  50. *
  51. * UD=DFILE LOCAL FILE NAME OF THE PERMANENT FILE
  52. * UTILITY DIRECTIVE FILE. THE DEFAULT
  53. * NAME IS *UDIR*.
  54. *
  55. * Z INDICATES DIRECTIVES ARE TO BE TAKEN FROM
  56. * COMMAND LINE. DEFAULT IS FROM *INPUT*.
  57. *
  58. * GENPFD(...Z...)/DIR/DIR/DIR
  59. * / IS ANY CHARACTER NOT IN *DIR*.
  60. SPACE 4,20
  61. *** *DIRN* MAY BE ONE OF THE FOLLOWING -
  62. *
  63. *
  64. * *DIRN* DESCRIPTION
  65. * ------ -----------
  66. *
  67. *
  68. * D,DENSITY. THE DENSITY THAT WILL BE USED FOR THE
  69. * ARCHIVE DUMP TAPE. THE DEFAULT IS *GE*.
  70. * THE FOLLOWING DENSITIES ARE RECOGNIZED.
  71. *
  72. * 7 TRACK (MT) 9 TRACK (NT) CARTRIDGE (CT/AT)
  73. * D=LO 200 CPI D=HD 800 CPI D=CE 38000 CPI
  74. * D=HI 556 CPI D=PE 1600 CPI D=AE 38000 CPI
  75. * D=HY 800 CPI D=GE 6250 CPI D=38000 38000 CPI
  76. * D=200 200 CPI D=1600 1600 CPI
  77. * D=556 556 CPI D=6250 6250 CPI
  78. *
  79. * DL,LIMIT. TOTAL LENGTH OF ARCHIVE DUMP, IN FEET OF
  80. * TAPE IF *U=FT*, OR IN MEGABYTES IF *U=MB*.
  81. * FOR TAPE, *DL* IS USED IN CONJUNCTION WITH
  82. * *D* IN CALCULATING WHETHER A FILE WILL
  83. * FIT ON THE DUMP SET. THE DEFAULT FOR
  84. * *MT* OR *NT* TAPE IS 2200 FEET, ALLOWING
  85. * A SIGNIFICANT NUMBER OF RECOVERED ERRORS
  86. * ON A 2400 FOOT REEL. THE DEFAULT LENGTH
  87. * FOR *CT* OR *AT* TAPE IS 500 FEET; A
  88. * CARTRIDGE CONTAINS 530 FEET OF TAPE. THE
  89. * DEFAULT SIZE FOR OPTICAL DISK IS 102MB.
  90. *
  91. * DT,THRESHOLD. MINIMUM LENGTH OF ARCHIVE DUMP, IN FEET OF
  92. * TAPE IF *U=FT*, OR IN MEGABYTES IF *U=MB*.
  93. * IF SELECTED FILES WOULD FILL LESS THAN THE
  94. * SPECIFIED MINIMUM SPACE, NO PERMANENT FILE
  95. * UTILITY DIRECTIVE FILE WILL BE WRITTEN.
  96. * THE DEFAULT IS NINETY PERCENT OF THE VALUE
  97. * OF *DL*.
  98. *
  99. * F,FORMAT. FORMAT IN WHICH THE ARCHIVE TAPE IS TO BE
  100. * RECORDED. ACCEPTABLE VALUES ARE *I* AND
  101. * *LI*. THE DEFAULT IS *I* FORMAT.
  102. *
  103. * PG,PR1,PR2,PR3. PRIORITY GROUPS, BASED ON THE MNEMONIC FOR
  104. * PREFERRED RESIDENCE. CODES D, L, M, N AND
  105. * T ARE GROUPED IN 1 TO 5 GROUPS IN ORDER OF
  106. * THEIR PRIORITY FOR ARCHIVING.
  107. *
  108. * RL,DN,TRACKS. DEFINES THE NUMBER OF AVAILABLE TRACKS
  109. * RL,DT,TRACKS. GOAL FOR THE SPECIFIED DEVICE NUMBER OR
  110. * FOR EACH DEVICE OF THE SPECIFIED DEVICE
  111. * TYPE. A *TRACKS* VALUE SPECIFIED FOR A
  112. * DEVICE NUMBER TAKES PRECEDENCE OVER ONE
  113. * SPECIFIED FOR A DEVICE TYPE WHEN BOTH
  114. * ARE APPLICABLE.
  115. *
  116. * SF,UI,F1,F2,..FN. SELECT FILES FOR USER INDEX *UI*, FILE
  117. * SF,UI. NAMES *F1* THROUGH *FN*. IF *F1*...*FN*
  118. * ARE OMITTED, SELECT ALL FILES FOR USER
  119. * INDEX *UI*.
  120. *
  121. * SV,V1,V2,..VN. SELECT FILES WHOSE CATALOG ENTRIES SHOW
  122. * ALTERNATE VSN-S WHICH MATCH TO ANY OF THE
  123. * *V1* THROUGH *VN* VALUES.
  124. *
  125. * XF,UI,F1,F2,..FN. EXCLUDE FILES FOR USER INDEX *UI*, FILE
  126. * XF,UI. NAMES *F1* THROUGH *FN*. IF *F1*...*FN
  127. * ARE OMITTED, EXCLUDE ALL FILES FOR USER
  128. * INDEX *UI*.
  129. TITLE DAYFILE MESSAGES.
  130. SPACE 4,20
  131. *** DAYFILE MESSAGES.
  132. *
  133. * * DIRECTIVE ARGUMENT ERROR.* - *GENPFD* DETECTED AN ERROR IN
  134. * AN INPUT DIRECTIVE. THIS COULD BE A BAD SEPARATOR,
  135. * AN INCORRECT VALUE, TOO MANY VALUES, ETC.
  136. *
  137. * * DN = NN, FILE TRACK COUNT = XXXXXXXXX.* - FOR DEVICE NN,
  138. * SPECIFIED VIA *RL* DIRECTIVE, FILES REPRESENTING THE
  139. * EQUIVALENT OF X..X TRACKS WERE SELECTED.
  140. *
  141. * * DT = TTT, FILE TRACK COUNT = XXXXXXXXX.* - FOR DEVICE TYPE
  142. * TTT, SPECIFIED VIA *RL* DIRECTIVE, FILES REPRESENTING
  143. * THE EQUIVALENT OF X..X TRACKS WERE SELECTED.
  144. *
  145. * * DUMP THRESHOLD NOT REACHED.* - TOO FEW FILES QUALIFIED FOR
  146. * SELECTION.
  147. *
  148. * * FEET OF DUMP TAPE REQUIRED = XXXXXXXXX.* - FILES SPECIFIED
  149. * BY THE UTILITY DIRECTIVES GENERATED BY *GENPFD* WILL
  150. * FILL X..X FEET OF TAPE AT THE SELECTED DENSITY.
  151. *
  152. * * FILES SELECTED FOR PPPPPPP = XXXXXXXXX.* - *GENPFD* WROTE
  153. * UTILITY DIRECTIVES FOR X..X FILES TO THE *UD* FILE.
  154. * P..P IS EITHER *DESTAGE* OR *RELEASE*, DEPENDING ON
  155. * THE *PO=* OPTION SPECIFIED ON THE *GENPFD* COMMAND.
  156. *
  157. * * FIRST SELECTION FILE COUNT = XXXXXXXXX.* - X..X FILES WERE
  158. * QUALIFIED BY SELECTED USER INDEX/FILE NAME, SELECTED
  159. * ARCHIVE VSN, OR PREFERRED RESIDENCE AND RELEASE DEVICE
  160. * RESIDENCE TO BE PRIORITIZED FOR FINAL SELECTION.
  161. *
  162. * * GENPFD ABORTED.* - *GENPFD* HAS DETECTED AN ERROR OR
  163. * THE USER HAS INITIATED AN ABORT.
  164. *
  165. * * GENPFD ARGUMENT ERROR.* - AN INCORRECT ARGUMENT WAS
  166. * DETECTED ON THE *GENPFD* COMMAND.
  167. *
  168. * * GENPFD COMPLETE.* - NORMAL COMPLETION.
  169. *
  170. * * INCORRECT ARGUMENT VALUE.* - A VALUE ENTRY ON A DIRECTIVE
  171. * IS NOT VALID FOR THAT DIRECTIVE. THIS COULD BE A NAME
  172. * LONGER THAN SEVEN CHARACTERS, AN ALPHABETIC STRING
  173. * WHEN A NUMBER IS EXPECTED, ETC.
  174. *
  175. * * MAXIMUM TOTAL FEET OF TAPE = XXXXXXXXX.* - FILES QUALIFYING
  176. * FOR FINAL SELECTION WOULD OCCUPY X..X FEET OF TAPE AT
  177. * THE SELECTED DENSITY IF THEY WERE ALL SELECTED.
  178. *
  179. * * MAXIMUM TOTAL MEGABYTES = XXXXXXXXX.* - FILES QUALIFYING
  180. * FOR FINAL SELECTION WOULD OCCUPY X..X MEGABYTES IF
  181. * THEY WERE ALL SELECTED.
  182. *
  183. * * MEGABYTES REQUIRED FOR DUMP= XXXXXXXXX.* - FILES SPECIFIED
  184. * BY THE UTILITY DIRECTIVES GENERATED BY *GENPFD* WILL
  185. * FILL X..X MEGABYTES.
  186. *
  187. * * NO FILES SELECTED FOR PPPPPPP.* - EITHER NO FILES MET THE
  188. * SELECTION CRITERIA OR NONE OF THE SELECTED FILES CAN
  189. * BE DUMPED WITHOUT EXCEEDING THE *DL* MAXIMUM.
  190. * P..P IS EITHER *DESTAGE* OR *RELEASE*, DEPENDING ON
  191. * THE *PO=* OPTION SPECIFIED ON THE *GENPFD* COMMAND.
  192. *
  193. * * SELECTION FILE DEVICE NUMBER ERROR.* - PROGRAM ERROR - A
  194. * DEVICE NUMBER NOT IN THE CATALOG DEVICE TABLE
  195. * WAS FOUND IN A RECORD DURING FINAL SELECTION.
  196. *
  197. * * SUFFICIENT TRACKS ALREADY AVAILABLE.* - THE *TRACKS* GOAL
  198. * SPECIFIED ON THE *RL* DIRECTIVE IS ALREADY AVAILABLE
  199. * ON THE DESIGNATED DEVICE(S).
  200. *
  201. * * SUMMARY FILE IS EMPTY OR MISPOSITIONED.* - END OF
  202. * FILE OR END OF RECORD WAS DETECTED ON THE FIRST READ
  203. * OF THE SUMMARY FILE.
  204. *
  205. * * SUMMARY FILE PREFIX TABLE ERROR.* - NO PREFIX TABLE
  206. * RECORD WAS FOUND ON THE SUMMARY FILE.
  207. *
  208. * * TOO MANY DEVICE SELECTION (RL) ENTRIES.* - THE SIZE OF THE
  209. * *TSDV* TABLE WAS EXCEEDED. THERE ARE TOO MANY *RL*
  210. * DIRECTIVES.
  211. *
  212. * * TOO MANY FILE/VSN SELECTION (SF SV XF) ENTRIES.* - THE SIZE
  213. * OF THE *TSFV* TABLE WAS EXCEEDED. THERE ARE TOO MANY
  214. * *SF*, *SV*, AND/OR *XF* DIRECTIVE ENTRIES.
  215. *
  216. * * TOO MANY PRIORITY GROUP (PG) ENTRIES.* - THE SIZE OF THE
  217. * *TPRG* TABLE WAS EXCEEDED. THERE ARE TOO MANY ENTRIES
  218. * ON THE *PG* DIRECTIVE.
  219. *
  220. * * *WARNING* - FILE(S) LARGER THAN *DL* LIMIT.* - *GENPFD*
  221. * ENCOUNTERED AND SKIPPED ONE OR MORE FILES LARGER THAN
  222. * THE LIMIT SPECIFIED ON THE *DL* DIRECTIVE.
  223. TITLE COMMON DECKS.
  224. SPACE 4,10
  225. * COMMON DECKS.
  226.  
  227.  
  228. *CALL COMCCMD
  229. *CALL COMCMAC
  230. *CALL COMSPFM
  231. *CALL COMSRPV
  232. TITLE ASSEMBLY CONSTANTS.
  233. SPACE 4,10
  234. **** ASSEMBLY CONSTANTS.
  235.  
  236.  
  237. * SUMMARY FILE RECORD SIZES.
  238.  
  239. SFPTL EQU 16B SUMMARY FILE PREFIX TABLE LENGTH
  240. SFSHL EQU 13B SUMMARY FILE SYSTEM RECORD HEADER LENGTH
  241. SFSIL EQU 0 SUMMARY FILE SYSTEM RECORD ITEM LENGTH
  242. SFDHL EQU 2 SUMMARY FILE DEVICE RECORD HEADER LENGTH
  243. SFDIL EQU 2 SUMMARY FILE DEVICE RECORD ITEM LENGTH
  244. SFFHL EQU 0 SUMMARY FILE CATALOG ENTRY HEADER LENGTH
  245. SFFIL EQU 21B SUMMARY FILE CATALOG ENTRY ITEM LENGTH
  246.  
  247. DLMB EQU 102 MEGABYTES DEFAULT FOR *DL* DIRECTIVE.
  248. DLDF EQU 2200 DEFAULT FOR *DL* DIRECTIVE (*MT*/*NT*)
  249. DLDFC EQU 500 DEFAULT FOR *DL* DIRECTIVE (*CT*/*AT*)
  250. DTDF EQU 90 *DT* DEFAULT PERCENT OF *DL* VALUE
  251. ITEML EQU 3 LENGTH OF PRIORITY SORT ITEM RECORD
  252. MFETL EQU 6 FET SIZE FOR MERGE/SORT FILES
  253. PBYT EQU 480 NUMBER OF 8-BIT BYTES PER PRU
  254. MPRU EQU 2083 NUMBER OF SECTORS PER MEGABYTE
  255. RPTR EQU MFETL RECORD POINTER FOR MERGE/SORT FILES
  256. EOF EQU RPTR+ITEML END OF FILE FLAG FOR MERGE/SORT FILES
  257. TCDVE EQU 2 TABLE OF CATALOG DEVICES ENTRY SIZE
  258. TCDVN EQU 120B TABLE OF CATALOG DEVICES ENTRIES
  259. TSDVE EQU 2 TABLE OF SELECTED DEVICES ENTRY SIZE
  260. TSDVN EQU 120B TABLE OF SELECTED DEVICES ENTRIES
  261. TSFVE EQU 1 TABLE OF SELECTED FILES/VSN-S ENTRY SIZE
  262. TSFVN EQU 1000 TABLE OF SELECTED FILES/VSN-S ENTRIES
  263.  
  264. * BUFFER SIZE DEFINITIONS.
  265.  
  266. IBUFL EQU 201B INPUT BUFFER LENGTH
  267. OBUFL EQU 201B OUTPUT BUFFER LENGTH
  268. SBUFL EQU 1001B SUMMARY FILE BUFFER LENGTH
  269. SMBFL EQU 1001B SELECTION/MERGE SORT BUFFER LENGTH
  270. UBUFL EQU 201B UTILITY DIRECTIVES BUFFER LENGTH
  271. WSAL EQU 1000B WORKING STORAGE BUFFER LENGTH
  272. TITLE MACRO DEFINITIONS.
  273. SPACE 4,10
  274. * MACRO DEFINITIONS USED FOR MERGESORT.
  275. COPITEM SPACE 4,15
  276. ** COPITEM - COPY ITEM FROM ONE FILE TO ANOTHER.
  277. *
  278. * COPITEM FILEX,FILEY
  279. *
  280. * ENTRY *FILEX* = FET ADDRESS OF FILE TO READ FROM.
  281. * *FILEY* = FET ADDRESS OF FILE TO WRITE TO.
  282. *
  283. * EXIT ITEM COPIED.
  284. * *ERUN* SET IF ITEM COPIED WAS END OF A RUN.
  285. *
  286. * USES X - 2, 5.
  287. *
  288. * CALLS CIT.
  289.  
  290.  
  291. PURGMAC COPITEM
  292.  
  293. COPITEM MACRO FILEX,FILEY
  294. MACREF COPITEM
  295. R= X2,FILEX
  296. R= X5,FILEY
  297. RJ CIT
  298. COPITEM ENDM
  299. COPYRUN SPACE 4,15
  300. ** COPYRUN - COPY RUN OF ENTRIES BETWEEN FILES.
  301. *
  302. * COPYRUN FILEX,FILEY
  303. *
  304. * ENTRY *FILEX* = FET ADDRESS OF FILE TO READ FROM.
  305. * *FILEY* = FET ADDRESS OF FILE TO WRITE TO.
  306. *
  307. * EXIT RUN COPIED FROM *FILEX* TO *FILEY*.
  308. *
  309. * USES X - 2, 5.
  310. *
  311. * CALLS CRN.
  312.  
  313.  
  314. PURGMAC COPYRUN
  315.  
  316. COPYRUN MACRO FILEX,FILEY
  317. MACREF COPYRUN
  318. R= X2,FILEX
  319. R= X5,FILEY
  320. RJ CRN
  321. COPYRUN ENDM
  322. GETITEM SPACE 4,15
  323. ** GETITEM - GET AN ITEM FROM A FILE.
  324. *
  325. * GETITEM FET,ITEM
  326. *
  327. * ENTRY *FET* = FET ADDRESS OF FILE.
  328. * *ITEM* = ITEM DESTINATION ADDRESS.
  329. *
  330. * EXIT VALUE MOVED.
  331. * EOF FLAG SET IF NEXT READ FAILS.
  332. *
  333. * USES X - 0, 5.
  334. *
  335. * CALLS GIT.
  336.  
  337.  
  338. PURGMAC GETITEM
  339.  
  340. GETITEM MACRO FET,ITEM
  341. MACREF GETITEM
  342. R= X0,FET
  343. R= X5,ITEM
  344. RJ GIT
  345. GETITEM ENDM
  346. PUTITEM SPACE 4,15
  347. ** PUTITEM - WRITE ITEM TO FILE.
  348. *
  349. * PUTITEM FET,ITEM
  350. *
  351. * ENTRY *FET* = FET ADDRESS OF FILE.
  352. * *ITEM* = ADDRESS OF ITEM TO WRITE.
  353. *
  354. * EXIT ITEM WRITTEN TO FILE.
  355. *
  356. * USES X - 2, 5.
  357. *
  358. * CALLS PIT.
  359.  
  360.  
  361. PURGMAC PUTITEM
  362.  
  363. PUTITEM MACRO FET,ITEM
  364. MACREF PUTITEM
  365. R= X2,FET
  366. R= X5,ITEM
  367. RJ PIT
  368. PUTITEM ENDM
  369. RESET SPACE 4,15
  370. ** RESET - REWIND FILE AND PREPARE FOR READING.
  371. *
  372. * RESET FILE
  373. *
  374. * ENTRY *FILE* = FET ADDRESS OF FILE TO REWIND AND READ.
  375. *
  376. * EXIT FILE REWOUND AND PARTIALLY READ.
  377. * EOF FLAG SET IF FILE IS EMPTY.
  378. *
  379. * USES X - 2.
  380. *
  381. * CALLS RST.
  382.  
  383.  
  384. PURGMAC RESET
  385.  
  386. RESET MACRO FET
  387. MACREF RESET
  388. R= X2,FET
  389. RJ RST
  390. RESET ENDM
  391. REWRYTE SPACE 4,15
  392. ** REWRYTE - REWIND FILE AND PREPARE FOR WRITING.
  393. *
  394. * REWRYTE FILE
  395. *
  396. * ENTRY *FILE* = FET ADDRESS OF FILE TO REWIND AND WRITE.
  397. *
  398. * EXIT FILE REWOUND, EOF FLAG SET ON.
  399. *
  400. * USES X - 2.
  401. *
  402. * CALLS RWR.
  403.  
  404.  
  405. PURGMAC REWRYTE
  406.  
  407. REWRYTE MACRO FILE
  408. MACREF REWRYTE
  409. R= X2,FILE
  410. RJ RWR
  411. REWRYTE ENDM
  412. TITLE TABLES.
  413. ORIG SPACE 4,10
  414. ORG 110B
  415. ORIG EQU * PROGRAM ORIGIN
  416. ITEM SPACE 4,30
  417. ** ITEM - INTERNAL PRIORITY SORT RECORD.
  418. *
  419. * *ITEM* IS USED BY *GENPFD* TO BUILD THE PRIORITY SORT
  420. * RECORD AND TO PROCESS IT AFTER THE SORT IS COMPLETED.
  421. *
  422. *T 6/ PG, 36/ PDTM, 18/ SIZE
  423. *T, 42/ FILE NAME, 18/ USER INDEX
  424. *T, 6/ DN, 24/ TSC, 30/ LEN
  425. *
  426. * PG PRIORITY GROUP 0-7, 10-17.
  427. * 0 OR 10B FOR FILES MATCHING *SF* OR *SV* ENTRIES.
  428. * 0 - 7 FOR FILES MATCHING *RL* DEVICE ENTRIES.
  429. * 10B-17B FOR FILES NOT MATCHING *RL* DEVICE ENTRIES.
  430. * PDTM PACKED DATE AND TIME - LAST ACCESS IF *PO=R*,
  431. * LAST DATA MODIFICATION IF *PO=D*.
  432. * SIZE COMPLEMENT OF FILE SIZE IN SECTORS. FILE SIZES
  433. * OVER 17 BITS ARE REPRESENTED WITH BIT 17 CLEAR AND
  434. * THE COMPLEMENT OF THE HIGH 17 BITS OF THE FILE SIZE.
  435. * DN DEVICE NUMBER ON WHICH FILE RESIDES.
  436. * TSC TOTAL SECTOR COUNT ADJUSTED FOR FULL TRACKS.
  437. * LEN TAPE REQUIRED IN 32NDS OF AN INCH (INCHES*32).
  438.  
  439.  
  440. ITEM BSSZ ITEML
  441. ITKY EQU ITEM PG / PDTM / SIZE (SORT KEY)
  442. ITFN EQU ITEM+1 FILE NAME / USER INDEX
  443. ITDN EQU ITEM+2 DN / TSC / LEN
  444. ITSC EQU ITDN ALTERNATE FOR *ITDN*
  445. TDIR SPACE 4,10
  446. ** TDIR - TABLE OF DIRECTIVES.
  447. *
  448. * *TDIR* CONTAINS THE LEGAL DIRECTIVES AND THE ADDRESS
  449. * OF THE ROUTINE THAT PROCESSES THAT DIRECTIVE.
  450. *
  451. *T 42/ DNAME, 18/ PADDR
  452. *
  453. * DNAME DIRECTIVE NAME.
  454. * PADDR ADDRESS OF PROCESSING ROUTINE FOR *DNAME*.
  455.  
  456.  
  457. TDIR BSS 0
  458. VFD 42/0LD,18/PTD TAPE DENSITY
  459. VFD 42/0LDL,18/PDL DESTAGE LIMIT - FEET/MEGABYTES
  460. VFD 42/0LDT,18/PDT DESTAGE THRESHOLD - FEET/MEGABYTES
  461. VFD 42/0LF,18/PTF TAPE FORMAT
  462. VFD 42/0LPG,18/PPG PRIORITY GROUPS
  463. VFD 42/0LRL,18/PRL RELEASE LIMIT
  464. VFD 42/0LSF,18/PSF SPECIFIC FILE/USER INDEX SELECTIONS
  465. VFD 42/0LSV,18/PSV SPECIFIC VSN SELECTIONS
  466. TDIRX VFD 42/0LXF,18/PSF SPECIFIC FILE/USER INDEX EXCLUSIONS
  467. CON 0
  468. TDEN SPACE 4,15
  469. ** TDEN - TABLE OF TAPE DENSITIES AND GAP SIZES.
  470. *
  471. * *TDEN* CONTAINS THE TAPE DENSITY SYMBOLS *GENPFD* RECOGNIZES,
  472. * A FLAG THAT INDICATES IF THIS IS A CARTRIDGE TAPE DENSITY,
  473. * THE INTER-RECORD GAP SIZE FOR THAT DENSITY IN 1/32NDS OF AN
  474. * INCH (INCHES*32), AND THE NUMBER OF 8-BIT BYTES CONTAINED IN
  475. * ONE INCH OF MAGNETIC TAPE RECORDED AT THAT DENSITY.
  476. *
  477. *T 30/ DEN, 1/ CTF, 11/ GAP, 18/ BYTES
  478. *
  479. * DEN THE DISPLAY CODE SYMBOL FOR THE DENSITY.
  480. * CTF NONZERO IF CARTRIDGE TAPE DENSITY.
  481. * GAP THE INTER-RECORD GAP SIZE IN INCHES*32.
  482. * BYTES THE NUMBER OF 8-BIT BYTES PER INCH OF TAPE. FOR
  483. * 7-TRACK TAPE, THIS IS 3/4 OF THE RATED DENSITY.
  484.  
  485.  
  486. TDEN BSS 0 TABLE OF TAPE DENSITIES AND GAP SIZES
  487. VFD 30/2LLO,1/0,11/24,18/200*3/4
  488. VFD 30/2LHI,1/0,11/24,18/556*3/4
  489. VFD 30/2LHY,1/0,11/24,18/800*3/4
  490. VFD 30/2LHD,1/0,11/20,18/800
  491. VFD 30/2LPE,1/0,11/20,18/1600
  492. VFD 30/2LGE,1/0,11/10,18/6250
  493. VFD 30/2LCE,1/1,11/3,18/37871
  494. VFD 30/2LAE,1/1,11/3,18/37871
  495. VFD 30/3L200,1/0,11/24,18/200*3/4
  496. VFD 30/3L556,1/0,11/24,18/556*3/4
  497. VFD 30/4L1600,1/0,11/20,18/1600
  498. VFD 30/4L6250,1/0,11/10,18/6250
  499. VFD 30/5L38000,1/1,11/3,18/37871
  500. CON 0
  501. TFMT SPACE 4,15
  502. ** TFMT - TABLE OF TAPE FORMATS AND BLOCK SIZES.
  503. *
  504. * *TFMT* CONTAINS THE TAPE FORMAT SYMBOLS *GENPFD* RECOGNIZES,
  505. * AND THE NUMBER OF DISK PRU-S (MINUS ONE) CONTAINED IN ONE
  506. * TAPE BLOCK RECORDED IN THAT FORMAT.
  507. *
  508. *T 12/ FORMAT, 36/ 0, 12/ (PBLK-1)
  509. *
  510. * FORMAT THE DISPLAY CODE SYMBOL FOR THE FORMAT.
  511. * PBLK THE NUMBER OF DISK PRU-S PER TAPE BLOCK.
  512.  
  513.  
  514. TFMT BSS 0 TABLE OF TAPE FORMATS AND BLOCK SIZES
  515. VFD 12/1LI,36/0,12/10B-1
  516. VFD 12/2LLI,36/0,12/100B-1
  517. CON 0
  518. TPRG SPACE 4,15
  519. ** TPRG - TABLE OF PREFERRED RESIDENCE GROUPS.
  520. *
  521. * *TPRG* CONTAINS THE PREFERRED RESIDENCE PRIORITY GROUPINGS
  522. * AS DETERMINED BY THE *PG* DIRECTIVES OR BY DEFAULT. EACH
  523. * WORD IN THE TABLE REPRESENTS ONE PRIORITY GROUP, EARLIER
  524. * ENTRIES BEING HIGHER PRIORITY.
  525. *
  526. *T TPRGP 60/ N
  527. *
  528. *T,TPRG 6/PR, 6/PR, 6/PR, 6/PR, 6/PR, 6/PR, 6/PR, 6/PR, 6/PR, 6/PR
  529. *T,TPRG+N 60/ 0
  530. *
  531. * N NUMBER OF PRIORITY GROUPS.
  532. * PR PREFERRED RESIDENCE CODES IN THIS PRIORITY GROUP.
  533.  
  534.  
  535. TPRGP CON 3 NUMBER OF PRIORITY GROUPS (DEFAULT = 3)
  536. TPRG DATA 0LT PREFERRED RESIDENCE *T*
  537. DATA 0LMN PREFERRED RESIDENCES *M* AND *N*
  538. DATA 0LD PREFERRED RESIDENCE *D*
  539. BSSZ 2
  540. TPRGL EQU *-TPRG MAXIMUM NUMBER OF ENTRIES
  541. TCDV SPACE 4,10
  542. ** TCDV - TABLE OF CATALOG DEVICES.
  543. *
  544. * *TCDV* IS USED TO STORE THE INFORMATION FROM THE *DEVSTAT*
  545. * RECORDS OF THE SUMMARY FILE.
  546. *
  547. *T TCDVP 60/ N
  548. *
  549. *T TCDV 12/ DT, 12/ TKSZ, 12/ TKAV, 12/ TKS, 3/ 0, 3/ U, 6/ DN
  550. *T,TCDV+1 6/ 0, 24/ TASC, 14/ 0, 8/ SM, 8/ DM
  551. *
  552. * N NUMBER OF WORDS USED IN *TCDV* TABLE.
  553. * DT DEVICE TYPE MNEMONIC.
  554. * TKSZ TRACK SIZE OF THIS DEVICE IN SECTORS.
  555. * TKAV NUMBER OF TRACKS LEFT AVAILABLE.
  556. * TKS TOTAL NUMBER OF TRACKS ON DEVICE.
  557. * U NUMBER OF UNITS(SPINDLES) - 1.
  558. * DN DEVICE NUMBER.
  559. * TASC TOTAL AVAILABLE SECTOR COUNT.
  560. * NCT NUMBER OF CATALOG TRACKS ON DEVICE.
  561. * SM SECONDARY DEVICE MASK.
  562. * DM DEVICE MASK.
  563.  
  564. TCDVP CON 0 NUMBER OF WORDS IN TABLE
  565. TCDV BSSZ TCDVN*TCDVE+TCDVE
  566. CON -0
  567. TSDV SPACE 4,10
  568. ** TSDV - TABLE OF SELECTED DEVICE TYPES AND NUMBERS.
  569. *
  570. * *TSDV* CONTAINS ENTRIES FOR DEVICE TYPES OR NUMBERS
  571. * SELECTED BY MEANS OF *RL* DIRECTIVES.
  572. *
  573. *T 12/ DT, 12/ TKSZ, 24/ GOAL, 3/ 0, 3/ U, 6/ DN
  574. *T, 30/ 0, 30/ SFSC
  575. *
  576. * DT DEVICE TYPE MNEMONIC, IF SUPPLIED ON *RL* DIRECTIVE.
  577. * TKSZ TRACK SIZE FOR DEVICE/ DEVICE TYPE.
  578. * GOAL SECTORS NEEDED TO MEET RELEASE GOAL.
  579. * U NUMBER OF UNITS(SPINDLES) - 1, IF SUPPLIED ON *RL*.
  580. * DN DEVICE NUMBER, IF SUPPLIED ON *RL* DIRECTIVE.
  581. * SFSC SELECTED FILE SECTOR COUNT.
  582. *
  583. * EITHER *DT* AND *U* APPEAR OR *DN* APPEARS, DEPENDING ON THE
  584. * FORMAT OF THE *RL* DIRECTIVE WHICH PROVIDED THE INFORMATION.
  585.  
  586.  
  587. TSDV BSSZ TSDVN*TSDVE+TSDVE
  588. CON -0
  589. TSFV SPACE 4,10
  590. ** TSFV - TABLE OF SPECIFIC FILE AND VSN SELECTIONS.
  591. *
  592. * *TSFV* CONTAINS SELECTED VSN ENTRIES SUPPLIED VIA *SV*
  593. * DIRECTIVES, SELECTED FILE/USER INDEX ENTRIES SUPPLIED
  594. * VIA *SF* DIRECTIVES, AND EXCLUDED FILE/USER INDEX ENTRIES
  595. * SUPPLIED VIA *XF* DIRECTIVES.
  596. *
  597. *T TSFVP 60/ N
  598. *
  599. *T TSFV 12/ VSNL2, 12/ VSNR4, 36/0
  600. * OR
  601. *T TSFV 42/ FN, 18/ UI
  602. *
  603. * N NUMBER OF WORDS IN THE *TSFV* TABLE.
  604. * VSNL2 THE LEFTMOST TWO CHARACTERS OF THE PRIMARY VSN.
  605. * VSNR4 12-BIT VALUE REPRESENTING THE RIGHTMOST 4 DIGITS
  606. * OF THE PRIMARY VSN OF A DUMP FILE SET.
  607. * FN THE FILE NAME OF A FILE TO BE SELECTED OR EXCLUDED.
  608. * *FN* IS ALWAYS ACCOMPANIED BY *UI*.
  609. * UI USER INDEX TO BE SELECTED OR EXCLUDED. A NEGATIVE
  610. * *UI* INDICATES AN EXCLUSION. IF *FN* ACCOMPANIES
  611. * *UI*, ONLY THAT FILE IS TO BE SELECTED OR EXCLUDED.
  612. * *UI* APPEARS ALONE, ALL FILES FOR *UI* ARE TO BE
  613. * SELECTED OR EXCLUDED.
  614.  
  615.  
  616. TSFVP CON 0 NUMBER OF WORDS IN THE TABLE
  617. TSFV BSS TSFVN*TSFVE+TSFVE
  618. TITLE GLOBAL CONSTANTS AND VARIABLES
  619. SPACE 4,10
  620. * GLOBAL CONSTANTS AND VARIABLES.
  621.  
  622. ADOT DATA 1L. TERMINATING PERIOD FOR VARIOUS MESSAGES
  623. BLNK CON 10H
  624. CSET CON 0 CHARACTER SET CHANGED FLAG
  625. CTSF CON 0 CARTRIDGE TAPE FLAG
  626. DENS CON 6250 DENSITY OF TAPE TO BE USED FOR DUMP
  627. DIRV BSS 1 CURRENT DIRECTIVE
  628. CFBT CON 0 FILES LARGER THAN THRESHOLD
  629. DLFV CON 0 DESTAGE LIMIT - FEET/MEGABYTES
  630. DTFV CON 0 DESTAGE THRESHOLD - FEET/MEGABYTES
  631. ERUN CON 0 END OF RUN INDICATOR FOR SORTING
  632. FCNT CON 0 NUMBER OF FILES SELECTED
  633. GAPS CON 10 INTER-RECORD GAP SIZE IN INCHES*32
  634. IDTP CON 1 INPUT DEVICE TYPE
  635. INCH CON 0 INCHES*32 OR BYTES*MILLION FOR SELECTIONS
  636. JORG BSS 1 JOB ORIGIN
  637. LDFH CON 10H GENPFD- DAYFILE HEADER FOR DIRECTIVE LINE
  638. LINE BSSZ 9 DIRECTIVE INPUT, MESSAGE OUTPUT BUFFER
  639.  
  640. LOFL CON 3 LIST OF FILES LENGTH
  641. CON 0LOUTPUT+O LIST OF FILES ENTRY FOR *OUTPUT*
  642. CON 0 LIST OF FILES TERMINATOR
  643. LOFP VFD 30/LOFL,30/1 LIST OF FILES POINTER WORD
  644.  
  645. NRUN CON 0 NUMBER OF RUNS INDICATOR FOR SORTING
  646. ODTP CON 1 OUTPUT DEVICE TYPE
  647. PBLK CON 10B-1 DISK PRU-S PER TAPE BLOCK (MINUS 1)
  648. PNFM CON 0 UTILITY *PN=* OR *FM=* DIRECTIVE
  649. POPT DATA 0LR PROCESSING OPTION - DEFAULT IS *R*
  650. UNITS DATA 2LFT DEFAULT DESTAGE UNITS = FEET
  651. PRCD DATA 6L.LDMNT PREFERRED RESIDENCE CODES IN SEQUENCE
  652. ZINF CON 0 *Z* PARAMETER FLAG
  653. TITLE ERROR MESSAGES.
  654. * ERROR MESSAGES.
  655. SPACE 4,10
  656. ERDA DATA C* DIRECTIVE ARGUMENT ERROR.*
  657. ERDT DATA C* DEVICE TYPE/NUMBER NOT FOUND.*
  658. ERIA DATA C* INCORRECT ARGUMENT VALUE.*
  659. ERSF DATA C* SELECTION FILE DEVICE NUMBER ERROR.*
  660. ERST DATA C* SUFFICIENT TRACKS ALREADY AVAILABLE.*
  661. ERSE DATA C* SUMMARY FILE IS EMPTY OR MISPOSITIONED.*
  662. ERSP DATA C* SUMMARY FILE PREFIX TABLE ERROR.*
  663. TITLE MAIN LOOP.
  664. GENPFD SPACE 4,15
  665. ** MAIN LOOP.
  666. *
  667. * *GENPFD* READS DIRECTIVES FROM THE INPUT FILE AND CREATES
  668. * A SELECTION FILE OF *PFDUMP* UTILITY DIRECTIVES THAT SATISY
  669. * THE SPECIFIED CONDITIONS.
  670. *
  671. * CALLS BDT, BSF, BUD, CTL, POP, PRS, RCS, SRT, USB.
  672. *
  673. * MACROS MESSAGE, READ, READC, WRITEC, WRITEW.
  674.  
  675.  
  676. GENPFD BSS 0 ENTRY
  677. RJ PRS PRESET
  678. RJ BDT BUILD DEVICE TABLE
  679.  
  680. * GET NEXT DIRECTIVE.
  681.  
  682. GEN1 SA1 ZINF
  683. SA2 INPUT
  684. NZ X1,GEN2 IF *Z* OPTION SELECTED
  685. ZR X2,GEN6 IF NO INPUT FILE (I=0)
  686. SA1 IDTP
  687. SA2 ODTP
  688. NZ X1,GEN2 IF NOT TERMINAL INPUT
  689. NZ X2,GEN2 IF NOT TERMINAL OUTPUT
  690. WRITEC O,GENA * ENTER DIRECTIVE.*
  691. READ I,R
  692. GEN2 READC I,LINE,8
  693. NZ X1,GEN6 IF EOR FOUND
  694. SA1 ODTP
  695. ZR X1,GEN3 IF A TERMINAL OUTPUT FILE
  696. WRITEW O,BLNK,1 ISSUE SPACES TO MOVE LINE TO THE RIGHT
  697. WRITEC O,LINE,8 COPY DIRECTIVE TO LISTING FILE
  698. GEN3 MESSAGE LDFH,3,R PLACE DIRECTIVE IN DAYFILE
  699.  
  700. * PROCESS INPUT LINE.
  701.  
  702. SB2 LINE UNPACK LINE
  703. RJ USB
  704. SX6 X6+B1 APPEND TERMINATOR TO INPUT LINE
  705. SA6 A6
  706. SX6 1R.
  707. SA6 B7+B1
  708. RJ POP PICK OUT DIRECTIVE VERB
  709. ZR B6,GEN11 IF NO ARGUMENTS
  710. NG B6,GEN11 IF NO TERMINATOR FOUND
  711. NG B5,GEN11 IF ARGUMENT ERROR
  712.  
  713. * SEARCH TABLE FOR DIRECTIVE.
  714.  
  715. MX0 42
  716. SA4 TDIR START OF DIRECTIVE TABLE
  717. GEN4 BX1 X0*X4
  718. ZR X1,GEN11 IF UNIDENTIFIABLE DIRECTIVE
  719. BX1 X1-X6
  720. ZR X1,GEN5 IF DIRECTIVE FOUND
  721. SA4 A4+B1
  722. EQ GEN4 CHECK NEXT DIRECTIVE
  723.  
  724. GEN5 SA6 DIRV SAVE DIRECTIVE
  725. SB3 X4+
  726. RJ POP GET THE FIRST ARGUMENT
  727. NZ B5,GEN11 IF ERROR OR ARGUMENT TOO LONG
  728. SA0 B6+ SAVE THE STRING BUFFER ADDRESS
  729. JP B3 ENTER DIRECTIVE PROCESSOR
  730.  
  731. * DIRECTIVES COMPLETE - CREATE THE SELECTION FILE.
  732.  
  733. GEN6 RJ CTL CONVERT *DL* AND *DT* LENGTHS
  734. RJ BSF BUILD SELECTION FILE
  735. SA1 FCNT
  736. ZR X1,GEN8 IF NO FILES SELECTED
  737. RJ IIS ISSUE INITIAL STATISTICS
  738. SA1 DTFV
  739. ZR X1,GEN7 IF NO THRESHOLD SPECIFIED
  740. SA2 INCH
  741. IX6 X1-X2
  742. SX5 GENC * DUMP THRESHOLD NOT REACHED.*
  743. PL X6,GEN9 IF NOT ENOUGH FILES SELECTED
  744. GEN7 RJ SRT SORT SELECTION FILE
  745. RJ BUD BUILD UTILITY DIRECTIVE FILE
  746. SA1 FCNT
  747. ZR X1,GEN8 IF NO FILES SELECTED
  748. RJ IFS ISSUE FINAL STATISTICS
  749. EQ GEN10 TERMINATE PROCESSING
  750.  
  751. GEN8 SA1 POPT
  752. SX5 GEND * NO FILES SELECTED FOR DESTAGE.*
  753. ZR X1,GEN9 IF *PO=D*
  754. SX5 GENE * NO FILES SELECTED FOR RELEASE.*
  755. GEN9 MESSAGE X5,3
  756. WRITEC O,X5
  757. GEN10 WRITER O,R
  758. UNLOAD CF UNLOAD THE SELECTION FILE
  759. MESSAGE GENB,3 * GENPFD COMPLETE.*
  760. RJ RCS RESET CHARACTER SET IF CHANGED
  761. ENDRUN
  762.  
  763. * PROCESS DIRECTIVE ERRORS.
  764.  
  765. GEN11 SX5 ERDA * DIRECTIVE ARGUMENT ERROR *
  766. EQ GEN13 ISSUE ERROR MESSAGE
  767.  
  768. GEN12 SX5 ERIA * INCORRECT ARGUMENT VALUE *
  769. EQ GEN13 ISSUE ERROR MESSAGE
  770.  
  771. * DIRECTIVE ERROR MESSAGE ABORT/CONTINUE ENTRY.
  772. * (X5) = ADDRESS OF ERROR MESSAGE TO BE DISPLAYED.
  773.  
  774. GEN13 SA1 IDTP CHECK FOR TERMINAL INPUT
  775. NZ X1,ABT IF NOT A TERMINAL THEN ABORT
  776. MESSAGE X5,3
  777. WRITEC O,X5
  778. EQ GEN1 PROMPT FOR NEXT DIRECTIVE
  779.  
  780.  
  781. GENA DATA C* ENTER DIRECTIVE.*
  782. GENB DATA C* GENPFD COMPLETE.*
  783. GENC DATA C* DUMP THRESHOLD NOT REACHED.*
  784. GEND DATA C* NO FILES SELECTED FOR DESTAGE.*
  785. GENE DATA C* NO FILES SELECTED FOR RELEASE.*
  786. TITLE PRIMARY SUBROUTINES.
  787. ABT SPACE 4,10
  788. ** ABT - ABORT PROCESSING.
  789. *
  790. * ENTRY (X5) = ADDRESS OF ERROR MESSAGE.
  791. *
  792. * EXIT ALL FILES RETURNED.
  793. * ERROR MESSAGES ISSUED.
  794. * *GENPFD* ABORTED.
  795. *
  796. * MACROS ABORT, MESSAGE, UNLOAD, WRITEC, WRITER.
  797.  
  798.  
  799. ABT BSS 0 ENTRY
  800. MESSAGE X5,3 ISSUE ERROR MESSAGE
  801. WRITEC O,X5
  802. UNLOAD CF UNLOAD FILES
  803. UNLOAD BF
  804. UNLOAD AF
  805. WRITER OUTPUT,R
  806. RJ RCS RESET CHARACTER SET IF CHANGED
  807. MESSAGE ABTA,3,R * GENPFD ABORTED.*
  808. SYSTEM ABT,R ABORT
  809.  
  810.  
  811. ABTA DATA C* GENPFD ABORTED.*
  812. BDT SPACE 4,20
  813. ** BDT - BUILD DEVICE TABLE.
  814. *
  815. * READ SUMMARY FILE DEVICE RECORDS, STORE FAMILY OR PACK
  816. * NAME AND BUILD CATALOG DEVICE TABLE.
  817. *
  818. * EXIT *FM=* OR *PN=* INFORMATION STORED.
  819. * CATALOG DEVICE TABLE COMPLETED.
  820. * SUMMARY FILE POSITIONED AFTER *DEVSTAT* RECORDS.
  821. *
  822. * USES X - 1, 2, 6.
  823. * A - 1, 2, 6.
  824. * B - 3.
  825. *
  826. * CALLS GSR, ZTB.
  827.  
  828.  
  829. BDT SUBR ENTRY/EXIT
  830. BDT1 SA1 BDTA CALLING SEQUENCE ADDRESS
  831. RJ GSR GET SUMMARY FILE *DEVSTAT* RECORD
  832. SA1 BDTE
  833. NZ X1,BDTX IF END OF *DEVSTAT* RECORDS
  834. SA1 PNFM
  835. NZ X1,BDT3 IF PACK/FAMILY NAME ALREADY STORED
  836. SA1 BDTD CHECK DEVICE NUMBER OF FIRST RECORD
  837. MX6 -6
  838. BX1 -X6*X1
  839. SX2 3RFM= PRESET FOR FAMILY NAME
  840. NZ X1,BDT2 IF DEVICE NUMBER NON-ZERO
  841. SX2 3RPN= SET FOR PACK NAME
  842. BDT2 SA1 BDTC+1 GET PACK/FAMILY NAME FROM *DEVSTAT* HEADER
  843. MX6 42
  844. BX6 X6*X1
  845. BX1 X2+X6 ADD UTILITY DIRECTIVE ID *FM=* OR *PN=*
  846. LX1 42
  847. RJ ZTB BLANK FILL
  848. SA6 PNFM
  849. BDT3 SA1 BDTD TRACK SIZE AND COUNTS
  850. MX2 12
  851. LX1 12
  852. BX6 X2*X1 EXTRACT TRACK SIZE
  853. BX2 X1-X6 EXTRACT TRACKS AVAILABLE
  854. LX6 12
  855. AX2 36
  856. IX1 X2*X6 NUMBER OF SECTORS INITIALLY AVAILABLE
  857. SA2 A1+B1 RUNNING TOTAL OF AVAILABLE SECTORS
  858. MX6 -24
  859. LX1 30
  860. BX2 -X6*X2
  861. BX6 X1+X2 SET RUNNING TOTAL TO INITIAL AVAILABILITY
  862. SA1 TCDVP ADVANCE CATALOG DEVICE TABLE POINTER
  863. SA6 A2
  864. SX6 X1+TCDVE
  865. SA6 A1
  866. SX2 X1+TCDV POINT TO NEXT AVAILABLE ENTRY
  867. SB3 TCDVE-1 SET COUNTER FOR MOVE
  868. BDT4 SA1 BDTD+B3 MOVE RECORD TO CATALOG DEVICE TABLE
  869. BX6 X1
  870. SA6 X2+B3
  871. SB3 B3-B1
  872. PL B3,BDT4 IF MORE WORDS TO MOVE
  873. BX6 X6-X6 CLEAR THE FOLLOWING WORD IN THE TABLE
  874. SA6 A6+SFDIL
  875. EQ BDT1 GET NEXT ITEM
  876.  
  877.  
  878. BDTA CON BDTB POINTER TO RECORD ID WORD
  879. CON SUMMARY POINTER TO FET
  880. CON BDTC POINTER TO BUFFER
  881. CON BDTE POINTER TO STATUS WORD
  882. BDTB DATA 0LDEVSTAT
  883. BDTC BSS SFDHL+1 *DEVSTAT* HEADER BUFFER
  884. BDTD BSS SFDIL *DEVSTAT* ITEM BUFFER
  885. BDTE BSS 1 STATUS WORD
  886. BSF SPACE 4,20
  887. ** BSF - BUILD SELECTION FILE.
  888. *
  889. * *BSF* CREATES THE INITIAL SELECTION FILE BY MATCHING THE
  890. * CATALOG ENTRIES TO THE SPECIFIED PARAMETERS. SPECIFICALLY
  891. * SELECTED FILES, THOSE RESIDING ON SPECIFICALLY DESIGNATED
  892. * ARCHIVE VOLUMES, THOSE RESIDING ON SELECTED DEVICE NUMBERS
  893. * AND THOSE RESIDING ON SELECTED DEVICE TYPES ARE WRITTEN TO
  894. * THE SELECTED CANDIDATES FILE, WITH SORT KEYS SET FOR SORTING
  895. * BY PRIORITY GROUP, THEN BY AGE WITHIN THE ABOVE GROUPINGS.
  896. *
  897. * ENTRY SUMMARY FILE POSITIONED AFTER *DEVSTAT* RECORDS.
  898. *
  899. * EXIT SELECTED FILE SORT RECORDS WRITTEN TO SELECTION FILE.
  900. *
  901. * USES X - ALL.
  902. * A - 1, 2, 3, 4, 5, 6, 7.
  903. * B - 2, 3.
  904. *
  905. * CALLS GSR.
  906. *
  907. * MACROS MESSAGE, REWIND, WRITE, WRITEC, WRITER, WRITEW.
  908.  
  909.  
  910. BSF24 WRITER CF,R TERMINATE SELECTION FILE
  911. REWIND CF,R
  912.  
  913. BSF SUBR ENTRY/EXIT
  914. UNLOAD CF,R
  915. WRITE CF,* PRESET WRITE FOR SELECTION FILE
  916. SA1 TPRGP SET PRIORITY GROUP TABLE TERMINATOR
  917. BX6 X6-X6
  918. SB2 X1
  919. SA6 TPRG+B2
  920. BSF1 SA1 BSFA
  921. RJ GSR GET SUMMARY FILE RECORD
  922. SA1 BSFE
  923. NZ X1,BSF24 IF END OF CATALOG ENTRIES
  924. SA1 BSFD+FCFN FILE NAME / USER INDEX
  925. MX0 -3
  926. BX6 X1
  927. SA6 ITFN
  928. BX0 -X0*X1 LOWER OCTAL DIGIT OF USER INDEX
  929. SB3 X0+B1
  930.  
  931. * CHECK IF FILE MATCHES A SPECIFIC FILENAME/UI/VSN SELECTION.
  932. * (B3) = DEVICE MASK SHIFT COUNT.
  933.  
  934. SA2 TSFVP
  935. SA3 BSFD+FCTV VSN FROM SUMMARY FILE
  936. SB2 X2-1
  937. LX3 59-23
  938. MX0 42
  939. BSF2 NG B2,BSF7 IF NO MATCH OF SPECIFIC FILE/UI OR VSN
  940. SA2 TSFV+B2
  941. SB2 B2-B1
  942. SX4 X2
  943. NZ X4,BSF3 IF NOT A VSN SPECIFICATION
  944. MX6 24
  945. BX2 X2-X3
  946. BX6 X6*X2
  947. EQ BSF6 COMPLETE MATCH
  948.  
  949. BSF3 PL X4,BSF4 IF NOT AN EXCLUSION
  950. BX2 -X0-X2 INVERT USER INDEX FOR EXCLUSIONS
  951. BSF4 BX6 X0*X2
  952. ZR X6,BSF5 IF FILE NAME NOT SUPPLIED
  953. MX6 42
  954. BSF5 BX6 X0-X6
  955. BX6 -X6*X1
  956. BX6 X2-X6
  957. BSF6 NZ X6,BSF2 IF NOT THE SAME FILE / USER INDEX / VSN
  958. NG X4,BSF1 IF MATCH WAS TO AN EXCLUSION
  959. SA6 BSFD+FCFN MARK FILE SELECTED
  960. EQ BSF10 FIND DEVICE NUMBER
  961.  
  962. * FILE DID NOT MATCH SPECIFIC FILE OR VSN SELECTIONS.
  963. * CHECK FOR A MATCH TO A PREFERRED RESIDENCE PRIORITY GROUP.
  964. * (B3) = DEVICE MASK SHIFT COUNT.
  965.  
  966. BSF7 SA1 BSFD+FCRS PREFERRED RESIDENCE FOR FILE
  967. MX0 3
  968. BX0 X0*X1
  969. SA1 PRCD PREFERRED RESIDENCE MNEMONICS
  970. LX0 4 COMPUTE SHIFT COUNT
  971. SB2 X0
  972. LX0 1
  973. SB2 X0+B2
  974. LX1 B2 POSITION PREFERRED RESIDENCE MNEMONIC
  975. SB2 B0
  976. MX0 6
  977. BX1 X0*X1 PREFERRED RESIDENCE MNEMONIC
  978. BSF8 SA2 TPRG+B2
  979. ZR X2,BSF1 IF NO MORE GROUPS TO CHECK
  980. SB2 B2+1
  981. BSF9 BX6 X0*X2
  982. LX2 6
  983. ZR X6,BSF8 IF NO MATCH IN THIS GROUP
  984. BX6 X1-X6
  985. NZ X6,BSF9 IF NOT THIS PREFERRED RESIDENCE
  986. SX6 B2 PRIORITY GROUP = TABLE ORDINAL + 1
  987. LX6 59-5
  988.  
  989. * FILE MATCHED SPECIFIC SELECTION OR PREFERRED RESIDENCE GROUP.
  990. * FIND THE DEVICE NUMBER IN THE CATALOG DEVICE TABLE.
  991. * (X6) = PRIORITY GROUP, BITS 59-54.
  992. * (B3) = DEVICE MASK SHIFT COUNT.
  993.  
  994. BSF10 SA1 BSFD+FCEO DEVICE NUMBER / ACCESS DATE
  995. SA3 POPT
  996. BX2 X1 SET UP TO USE ACCESS DATE
  997. NZ X3,BSF11 IF DESTAGE WAS NOT SPECIFIED
  998. SA2 BSFD+FCMD DATA MODIFICATION DATE
  999. BSF11 MX0 -36 DATE FOR SORT KEY
  1000. BX0 -X0*X2
  1001. LX0 18
  1002. BX6 X0+X6 PRIORITY GROUP / DATE
  1003. MX0 -6
  1004. LX1 5-41
  1005. BX1 -X0*X1 DEVICE NUMBER
  1006. NZ X1,BSF12 IF DEVICE NUMBER IS KNOWN
  1007. MX0 1
  1008. LX0 B3 SET UP FOR DEVICE MASK SEARCH
  1009. BSF12 SA2 TCDVP LENGTH OF CATALOG DEVICE TABLE
  1010. SB3 X2
  1011. BSF13 ZR B3,BSF1 IF DEVICE NOT FOUND IGNORE THIS FILE
  1012. SB3 B3-TCDVE LOOK AT NEXT ENTRY
  1013. ZR X1,BSF14 IF LOOKING FOR MASTER DEVICE
  1014. SA2 TCDV+B3
  1015. BX3 -X0*X2
  1016. BX3 X1-X3
  1017. NZ X3,BSF13 IF NOT THE RIGHT DEVICE
  1018. EQ BSF15 GET FILE LENGTH
  1019.  
  1020. BSF14 SA3 TCDV+1+B3
  1021. BX3 X0*X3
  1022. ZR X3,BSF13 IF NOT THE MASTER DEVICE
  1023. SA2 TCDV+B3 GET DEVICE NUMBER OF MASTER DEVICE
  1024. MX0 -6
  1025. BX1 -X0*X2
  1026.  
  1027. * CATALOG DEVICE ENTRY HAS BEEN FOUND. ADD FILE SIZE TO KEY.
  1028. * (X1) = DEVICE NUMBER.
  1029. * (X2) = FIRST WORD OF CATALOG DEVICE ENTRY.
  1030. * (X6) = PRIORITY GROUP / DATE.
  1031. * (B3) = OFFSET INTO CATALOG DEVICE ENTRY TABLE.
  1032.  
  1033. BSF15 SA3 BSFD+FCLF FILE SIZE
  1034. MX0 24
  1035. BX3 X0*X3
  1036. LX3 24
  1037. MX0 -17
  1038. BX0 X0*X3
  1039. ZR X0,BSF16 IF FILE SIZE IS LESS THAN 2**17
  1040.  
  1041. * FILE SIZE EXCEEDS 2**17 SECTORS, SO USE HIGH 17 BITS FOR KEY.
  1042. * BIT 2**17 IS SET, FORCING THESE SIZE KEYS TO BE HIGHER.
  1043.  
  1044. AX3 7
  1045. MX0 1 SET HIGH ORDER BIT
  1046. LX0 18
  1047. BX3 X0+X3
  1048. BSF16 MX0 18 INVERT FILE SIZE FOR SORT KEY
  1049. LX0 18
  1050. IX3 X0-X3
  1051. BX6 X3+X6 PRIORITY GROUP / DATE / SIZE KEY
  1052. SA6 ITKY
  1053. LX1 -6
  1054. BX6 X1 DEVICE NUMBER
  1055. SA6 ITDN
  1056. SA3 BSFD+FCLF FILE SIZE
  1057. MX1 24
  1058. BX3 X1*X3
  1059. LX3 24
  1060. SX1 B1
  1061. IX3 X3+X1 INCREMENT FOR SYSTEM SECTOR
  1062.  
  1063. * CHECK IF FILE RESIDENCE DEVICE IS A SELECTED RELEASE DEVICE.
  1064. * (X2) = FIRST WORD OF CATALOG DEVICE ENTRY.
  1065. * (X3) = FILE SIZE IN SECTORS, ADJUSTED FOR SYSTEM SECTOR.
  1066. * (B3) = OFFSET INTO CATALOG DEVICE ENTRY TABLE.
  1067.  
  1068. MX0 -6 DEVICE NUMBER MASK
  1069. SA4 TSDV FIRST SELECTED DEVICE TABLE ENTRY
  1070. ZR X4,BSF18 IF NO SELECTED DEVICE ENTRIES
  1071. BSF17 BX4 X2-X4
  1072. BX6 -X0*X4
  1073. ZR X6,BSF20 IF MATCH ON DEVICE ENTRY
  1074. SA4 A4+TSDVE NEXT TABLE ENTRY
  1075. NZ X4,BSF17 IF NOT FINISHED WITH THIS PASS
  1076. PL X0,BSF18 IF FINISHED BOTH PASSES WITH NO MATCH
  1077. MX1 21 FORM MASK FOR DEVICE TYPE / SPINDLES
  1078. LX1 9
  1079. BX0 X0-X1
  1080. SA4 TSDV FIRST ENTRY AGAIN
  1081. EQ BSF17 CHECK FOR MATCH ON DEVICE TYPE
  1082.  
  1083. BSF18 SA1 POPT
  1084. ZR X1,BSF19 IF *OP=D*
  1085. SA1 BSFD+FCFN
  1086. NZ X1,BSF1 IF FILE WAS NOT SELECTED
  1087. BSF19 SA1 ITKY DEGRADE PRIORITY GROUP
  1088. SX6 10B
  1089. LX6 54
  1090. BX6 X1+X6
  1091. SA6 A1+
  1092.  
  1093. * FILE HAS SURVIVED TESTS AND PRIORITY HAS BEEN DETERMINED.
  1094. * CALCULATE FILE SIZE IN TRACKS, FOR RELEASE GOAL CHECKING.
  1095. * (X3) = FILE SIZE IN SECTORS, ADJUSTED FOR SYSTEM SECTOR.
  1096. * (B3) = OFFSET INTO CATALOG DEVICE ENTRY TABLE.
  1097.  
  1098. BSF20 BX4 X3 FILE SIZE IN SECTORS
  1099. SX0 B1+
  1100. IX4 X4+X0 ADD EOI SECTOR FOR TRACK CALCULATION
  1101. SA1 BSFD+FCRI CHECK IF THERE ARE PERMITS
  1102. MX2 24
  1103. BX1 X1*X2
  1104. ZR X1,BSF21 IF NO RANDOM INDEX
  1105. IX3 X3+X0 ALLOW ONE SECTOR FOR PERMITS ON ARCHIVE
  1106. BSF21 SA2 BSFD+FCBS CHECK TYPE OF FILE
  1107. MX0 -12
  1108. BX2 -X0*X2
  1109. SX2 X2-4000B
  1110. NZ X2,BSF22 IF INDIRECT FILE
  1111. SA2 TCDV+B3 CATALOG DEVICE TRACK SIZE
  1112. MX0 -12
  1113. LX2 24
  1114. BX2 -X0*X2
  1115. BX1 X2
  1116. BX0 X4
  1117. IX6 X4/X2 DIVIDE SECTORS BY TRACK SIZE
  1118. IX4 X1*X6 MULTIPLY RESULT BY TRACK SIZE
  1119. BX2 X0-X4
  1120. ZR X2,BSF22 IF EVEN TRACKS
  1121. IX4 X1+X4 INCREMENT TO EVEN TRACKS
  1122.  
  1123. * CALCULATE AMOUNT OF SPACE THAT THIS FILE WILL TAKE. INTEGER
  1124. * ARITHMETIC ERROR IS MINIMIZED BY USING 1/32 INCH INCREMENTS
  1125. * FOR CALCULATING SPACE OCCUPIED ON TAPE.
  1126. * (X3) = FILE SIZE IN SECTORS.
  1127. * (X4) = FILE SIZE IN SECTORS FOR COMPLETE TRACKS.
  1128.  
  1129. BSF22 SA1 UNITS FEET OR MEGABYTES
  1130. BX2 X3 DISK SECTORS
  1131. LX1 12
  1132. SX1 X1-2RMB
  1133. ZR X1,BSF23.1 IF MEASURING MEGABYTES
  1134. SA1 PBLK
  1135. SX0 X1+B1
  1136. IX1 X1+X3
  1137. IX2 X1/X0 NUMBER OF TAPE BLOCKS
  1138. SA1 GAPS INTER-RECORD GAP SIZE IN INCHES*32
  1139. IX6 X1*X2
  1140. SX1 PBYT*32
  1141. IX3 X1*X3 NUMBER OF BYTES*32 IN FILE
  1142. SX1 16/2*15*32 PFC BYTES*32
  1143. IX3 X1+X3
  1144. SA1 DENS NUMBER OF BYTES/INCH
  1145. IX2 X3/X1 NUMBER OF INCHES*32 FOR DATA
  1146. IX2 X2+X6 TOTAL INCHES*32 FOR THE FILE
  1147. BSF23.1 SA1 INCH INCREMENT TOTAL
  1148. IX6 X1+X2
  1149. SA6 A1
  1150. SA1 ITDN STORE DEV.NO. / SECTORS / ARCHIVE UNITS
  1151. LX4 30 SECTORS
  1152. BX4 X2+X4 SECTORS / ARCHIVE UNITS
  1153. BX6 X1+X4 DEVICE NUMBER / SECTORS / ARCHIVE UNITS
  1154. SA6 A1
  1155. WRITEW CF,ITEM,ITEML WRITE OUT THE COMPLETED ENTRY
  1156. SA1 FCNT
  1157. SX6 X1+B1
  1158. SA6 A1
  1159. EQ BSF1 GET NEXT SUMMARY FILE RECORD
  1160.  
  1161.  
  1162. BSFA CON BSFB POINTER TO RECORD ID WORD
  1163. CON SUMMARY POINTER TO FET
  1164. CON BSFC POINTER TO BUFFER
  1165. CON BSFE POINTER TO STATUS WORD
  1166. BSFB DATA 0LCATE
  1167. BSFC BSS SFFHL+1 FILE HEADER BUFFER
  1168. BSFD BSS SFFIL FILE ITEM BUFFER
  1169. BSFE BSS 1 STATUS WORD
  1170. BUD SPACE 4,20
  1171. ** BUD - BUILD UTILITY DIRECTIVES.
  1172. *
  1173. * PROCESS SORT SELECTIONS AGAINST TAPE AND DEVICE LIMITS
  1174. * AND BUILD UP THE UTILITY DIRECTIVES FILE.
  1175. *
  1176. * EXIT UTILITY DIRECTIVES WRITTEN TO FILE *UDIR*
  1177. * IF AT LEAST ONE FILE IS SELECTED.
  1178. *
  1179. * USES X - 0, 1, 2, 3, 4, 5, 6.
  1180. * A - 1, 2, 3, 4, 5, 6.
  1181. * B - 3.
  1182. *
  1183. * CALLS CDD, COD.
  1184. *
  1185. * MACROS READ, READW, WRITE, WRITEC, WRITER.
  1186.  
  1187.  
  1188. BUD11 SA1 FCNT
  1189. ZR X1,BUDX IF NO UTILITY DIRECTIVES WRITTEN
  1190. WRITER UD,R TERMINATE UTILITY DIRECTIVE FILE
  1191.  
  1192. BUD SUBR ENTRY/EXIT
  1193. WRITE UD,* PRESET WRITE FUNCTION
  1194. READ CF,R
  1195. SX6 B0+
  1196. SA6 INCH
  1197. SA6 FCNT
  1198. BUD1 READW CF,ITEM,ITEML
  1199. NZ X1,BUD11 IF END OF SELECTION FILE
  1200. SA1 DLFV LENGTH LIMIT IN INCHES*32 OR MEGABYTES
  1201. ZR X1,BUD2 IF THERE IS NO LENGTH LIMIT
  1202. SA2 ITSC
  1203. MX0 -30
  1204. BX6 -X0*X2 FILE LENGTH IN INCHES*32 OR SECTORS
  1205. SA2 INCH TOTAL LENGTH ALREADY ACCEPTED
  1206. IX3 X6-X1
  1207. NG X3,BUD1.2 IF FILE .LE. LIMIT
  1208. SA1 UNITS
  1209. SA3 FCNT
  1210. LX1 12
  1211. SX1 X1-2RMB
  1212. ZR X1,BUD1.1 IF MEGABYTES
  1213. ZR X3,BUD2 IF NO FILES SELECTED YET
  1214. BUD1.1 SA1 CFBT INCREMENT COUNT OF FILES .GT. LIMIT
  1215. SX6 A1+B1
  1216. SA6 A1
  1217. EQ BUD1 CONTINUE PROCESSING
  1218.  
  1219. BUD1.2 IX2 X2+X6
  1220. IX1 X1-X2
  1221. NG X1,BUD1 IF LIMIT WOULD BE EXCEEDED
  1222. BUD2 SA3 TSDV
  1223. ZR X3,BUD6 IF NO SELECTED DEVICES
  1224.  
  1225. * FIND CATALOG DEVICE ENTRY FOR MATCHING DEVICE.
  1226. * (X3) = THE FIRST SELECTED DEVICE TABLE ENTRY.
  1227.  
  1228. SA2 ITDN
  1229. MX0 -6 DEVICE NUMBER MASK
  1230. LX2 6
  1231. SA1 TCDV GET FIRST CATALOG DEVICE
  1232. BUD3 BX6 X1-X2
  1233. BX6 -X0*X6
  1234. ZR X6,BUD4 IF MATCHING DEVICE ENTRY FOUND
  1235. SA1 A1+TCDVE
  1236. NZ X1,BUD3 IF MORE DEVICES TO SEARCH
  1237. SX5 ERSF * SELECTION FILE DEVICE NUMBER ERROR.*
  1238. EQ ABT ABORT
  1239.  
  1240. * THE CATALOG DEVICE ENTRY FOR THE FILE HAS BEEN LOCATED.
  1241. * SEARCH FOR MATCHING SELECTED DEVICE ENTRY.
  1242. * (X0) = MASK FOR DEVICE NUMBER.
  1243. * (X1) = THE CURRENT CATALOG DEVICE ENTRY.
  1244. * (X3) = THE CURRENT SELECTED DEVICE TABLE ENTRY.
  1245.  
  1246. BUD4 BX2 X1-X3
  1247. BX2 -X0*X2
  1248. ZR X2,BUD7 IF MATCHING ENTRY FOUND
  1249. SA3 A3+TSDVE GET NEXT SELECTED DEVICE ENTRY
  1250. NZ X3,BUD4 IF MORE ENTRIES TO CHECK
  1251. BUD5 PL X0,BUD6 IF BOTH KINDS OF ENTRIES CHECKED
  1252. MX2 21 SET UP MASK FOR DEVICE TYPE / SPINDLES
  1253. LX2 9
  1254. BX0 X0-X2 EXCLUDE DEVICE NUMBER FROM MASK
  1255. SA3 TSDV
  1256. NZ X3,BUD4 IF SELECTED DEVICE ENTRIES TO PROCESS
  1257. BUD6 SA2 POPT
  1258. ZR X2,BUD9 IF *PO=D*
  1259. SA2 ITKY CHECK PRIORITY FIELD OF KEY
  1260. MX6 3
  1261. LX2 3
  1262. BX2 X6*X2
  1263. ZR X2,BUD9 IF FILE SELECTED VIA *SF* OR *SV*
  1264. EQ BUD1 BYPASS THIS FILE
  1265.  
  1266. * FILE MATCHES ONE OF THE SELECTED DEVICE ENTRIES.
  1267. * UPDATE COUNT OF SECTORS SELECTED IN THE MATCHING ENTRY.
  1268. * (X0) = MASK FOR DEVICE TYPE OR DEVICE NUMBER.
  1269. * (X1) = THE CURRENT CATALOG DEVICE ENTRY.
  1270. * (X3) = FIRST WORD OF SELECTED DEVICE ENTRY.
  1271.  
  1272. BUD7 SA4 A1+B1 GET SECTORS AVAILABLE ON DEVICE
  1273. MX2 24 BUILD MASK FOR SECTOR COUNTS
  1274. LX2 -6
  1275. LX3 18
  1276. BX3 X2*X3 SECTORS GOAL FROM SELECTED DEVICE ENTRY
  1277. BX6 X2*X4 SECTORS AVAILABLE ON DEVICE
  1278. SA5 ITSC
  1279. IX3 X6-X3
  1280. PL X3,BUD5 IF NO MORE SECTORS NEEDED FOR THIS DEVICE
  1281. SA3 A3+B1
  1282. BX5 X2*X5 SECTOR COUNT FOR FILE
  1283. LX5 30 UPDATE SECTORS SELECTED
  1284. IX6 X3+X5
  1285. SA6 A3
  1286.  
  1287. * ACCUMULATE SPACE REQUIRED FOR FILE AND SECTORS
  1288. * AVAILABLE FOR THE DEVICE UPON WHICH IT RESIDES.
  1289. * (X1) = THE CURRENT CATALOG DEVICE ENTRY.
  1290.  
  1291. BUD9 SA4 A1+B1 SECTORS AVAILABLE ON DEVICE ENTRY
  1292. SA1 ITSC SECTORS AND INCHES*32 FOR THIS FILE
  1293. MX2 24 MASK FOR SECTOR COUNT
  1294. LX2 -6
  1295. BX6 X2*X1 FILE LENGTH IN SECTORS
  1296. IX6 X4+X6 UPDATE SECTORS AVAILABLE ON DEVICE
  1297. SA6 A4
  1298. MX6 -30
  1299. BX6 -X6*X1 FILE LENGTH IN INCHES*32 OR SECTORS
  1300. SA1 INCH UPDATE ACCUMULATED ARCHIVE SIZE
  1301. IX6 X1+X6
  1302. SA6 A1
  1303.  
  1304. * WRITE *FM=*/*PN=* DIRECTIVE IF NOT ALREADY WRITTEN.
  1305.  
  1306. SA1 PNFM
  1307. ZR X1,BUD10 IF *FM=*/*PN=* ALREADY WRITTEN
  1308. BX6 X1
  1309. SA6 BUDA+1
  1310. WRITEC UD,BUDA+1,R WRITE THE *FM=*/*PN=* DIRECTIVE
  1311. SX6 B0+
  1312. SA6 PNFM
  1313.  
  1314. * BUILD UTILITY DIRECTIVES FOR THE SELECTED FILE.
  1315.  
  1316. BUD10 SA1 ITFN
  1317. MX0 42
  1318. BX5 X0*X1 SAVE FILE NAME
  1319. BX1 -X0*X1
  1320. RJ COD CONVERT USER INDEX TO DISPLAY
  1321. MX0 -24
  1322. SA2 =4R,UI= BUILD *UI* DIRECTIVE
  1323. BX4 X0*X4
  1324. BX6 X2+X4
  1325. LX6 42
  1326. SA6 BUDA
  1327. SA2 =3RPF= BUILD *PF* DIRECTIVE
  1328. BX1 X2+X5
  1329. LX1 42
  1330. RJ ZTB
  1331. SA6 BUDA+1
  1332. WRITEC UD,BUDA,R WRITE THE DIRECTIVE SET
  1333. SA1 FCNT INCREMENT FILES SELECTED
  1334. SX6 X1+B1
  1335. SA6 A1
  1336. EQ BUD1 PROCESS NEXT FILE
  1337.  
  1338.  
  1339. BUDA DATA C*UI=UUUUUU,PF=FFFFFFF.*
  1340. CTL SPACE 4,20
  1341. ** CTL - CONVERT *DT* AND *DL* LENGTHS.
  1342. *
  1343. * CONVERT *DL* AND *DT* DIRECTIVE VALUES TO WORKING VALUES, IN
  1344. * 1/32 INCH INCREMENTS (INCHES*32) FOR *U=FT*, OR IN PRU-S FOR
  1345. * *U=MB*. FOR *DT*, THE DEFAULT VALUE IS A PERCENTAGE OF *DL*.
  1346. *
  1347. * EXIT PARAMETERS CONVERTED TO WORKING VALUES.
  1348. *
  1349. * USES X - 1, 2, 3, 4, 6.
  1350. * A - 1, 2, 3, 4, 6.
  1351.  
  1352.  
  1353. CTL SUBR ENTRY/EXIT
  1354. SA4 UNITS FEET OR MEGABYTES
  1355. LX4 12
  1356. SX4 X4-2RMB
  1357. SX6 12*32 CONVERSION FOR FEET TO INCHES*32
  1358. NZ X4,CTL1 IF *U=FT*
  1359. SX6 MPRU SECTORS PER MEGABYTE CONVERSION FACTOR
  1360. CTL1 SA1 POPT
  1361. SA2 DLFV
  1362. SA3 DTFV
  1363. NZ X2,CTL1.1 IF *DL* DIRECTIVE WAS SPECIFIED
  1364. NG X2,CTL2 IF *DL=0* WAS SPECIFIED
  1365. NZ X1,CTL2 IF NOT *OP=D*
  1366. SX2 DLMB DEFAULT LIMIT FOR MEGABYTES
  1367. ZR X4,CTL1.1 IF *U=MB*
  1368. SA4 CTSF
  1369. SX2 DLDF DEFAULT LIMIT FEET (*MT*/*NT* TAPE)
  1370. ZR X4,CTL1.1 IF NOT CARTRIDGE TAPE
  1371. SX2 DLDFC DEFAULT LIMIT FEET (*CT*/*AT* TAPE)
  1372. CTL1.1 IX2 X2*X6
  1373. CTL2 NZ X3,CTL3 IF *DT* DIRECTIVE WAS SPECIFIED
  1374. NG X3,CTL4 IF *DT=0* WAS SPECIFIED
  1375. NZ X1,CTL4 IF NOT *OP=D*
  1376. BX3 X2 CALCULATE *DT* AS A PERCENTAGE OF *DL*
  1377. NG X3,CTL4 IF *DL=0* WAS SPECIFIED
  1378. SX1 100
  1379. IX6 X3/X1
  1380. SX3 DTDF DEFAULT THRESHOLD PERCENTAGE
  1381. CTL3 IX3 X3*X6
  1382. CTL4 BX6 X2
  1383. SA6 A2 STORE CONVERTED *DL*
  1384. BX6 X3
  1385. SA6 A3 STORE CONVERTED *DT*
  1386. EQ CTLX RETURN
  1387. IIS SPACE 4,15
  1388. ** IIS - ISSUE INITIAL STATISTICS.
  1389. *
  1390. * ISSUE STATISTICAL MESSAGES FOR INITIAL SELECTION.
  1391. *
  1392. * EXIT INITIAL STATISTICS ISSUED TO OUTPUT AND DAYFILE.
  1393. *
  1394. * USES X - 0, 1, 2, 3, 6.
  1395. * A - 1, 2, 3, 6.
  1396. * B - 3.
  1397. *
  1398. * CALLS CDD.
  1399. *
  1400. * MACROS MESSAGE, WRITEC.
  1401.  
  1402.  
  1403. IIS SUBR ENTRY/EXIT
  1404. SA1 FCNT
  1405. RJ CDD CONVERT FILE COUNT TO DISPLAY
  1406. MX0 6
  1407. BX6 -X0*X6
  1408. SA1 ADOT
  1409. BX6 X1+X6
  1410. SB3 60
  1411. SB3 B3-B2
  1412. LX6 B3
  1413. SA6 IISA+3
  1414. MESSAGE IISA,3 * FIRST SELECTION FILE COUNT = XXXXXXXXX.*
  1415. WRITEC O,IISA
  1416. SA2 INCH
  1417. SA3 UNITS FEET OR MEGABYTES
  1418. LX3 12
  1419. SX3 X3-2RMB
  1420. NZ X3,IIS1 IF FEET
  1421. SX6 IISC * MAXIMUM TOTAL MEGABYTES = X..X.*
  1422. SA6 IISD
  1423. SX3 PBYT NUMBER OF 8-BIT BYTES PER PRU
  1424. IX2 X2*X3 MAXIMUM TOTAL BYTES
  1425. SX3 500 ROUND TO KILOBYTES
  1426. IX2 X2+X3
  1427. LX3 1
  1428. IX1 X2/X3 KILOBYTES
  1429. RJ CFD CONVERT TO F10.3 DISPLAY MEGABYTES
  1430. SB3 B2+60
  1431. EQ IIS2 CONTINUE PROCESSING MESSAGE
  1432.  
  1433. IIS1 SX3 12*32 CONVERSION FROM INCHES*32 TO FEET
  1434. SX6 IISB * MAXIMUM TOTAL FEET OF TAPE = X..X.*
  1435. IX1 X2/X3
  1436. SA6 IISD
  1437. RJ CDD CONVERT MAXIMUM TOTAL TO DISPLAY
  1438. IIS2 SA1 ADOT
  1439. MX0 6
  1440. BX2 X0*X6
  1441. BX6 -X0*X6
  1442. BX6 X1+X6
  1443. SB3 60
  1444. SB3 B3-B2
  1445. NZ B3,IIS3 IF NOT TEN CHARACTERS
  1446. LX6 6
  1447. IIS3 LX6 B3
  1448. SA3 IISD
  1449. SA6 X3+3
  1450. SA1 A6-B1 STORE UPPER DIGIT OF AMOUNT
  1451. LX1 54
  1452. BX1 -X0*X1
  1453. BX6 X1+X2
  1454. LX6 6
  1455. SA6 A1
  1456. MESSAGE X3,3 * MAXIMUM TOTAL MEGABYTES/FEET OF TAPE...*
  1457. WRITEC O,X3
  1458. EQ IISX RETURN
  1459.  
  1460.  
  1461. IISA DATA C* FIRST SELECTION FILE COUNT = XXXXXXXXX.*
  1462. IISB DATA C* MAXIMUM TOTAL FEET OF TAPE = XXXXXXXXX.*
  1463. IISC DATA C* MAXIMUM TOTAL MEGABYTES =XXXXXX.XXX.*
  1464. IISD BSS 1 POINTER TO MESSAGE TO BE ISSUED
  1465. IFS SPACE 4,15
  1466. ** IFS - ISSUE FINAL STATISTICS.
  1467. *
  1468. * ISSUE FINAL STATISTICAL MESSAGES.
  1469. *
  1470. * EXIT FINAL STATISTICS ISSUED TO OUTPUT AND DAYFILE.
  1471. *
  1472. * USES X - 0, 1, 2, 3, 5, 6.
  1473. * A - 1, 2, 3, 5, 6.
  1474. * B - 3.
  1475. *
  1476. * CALLS CDD, COD.
  1477. *
  1478. * MACROS MESSAGE, WRITEC.
  1479.  
  1480.  
  1481. IFS SUBR ENTRY/EXIT
  1482. SA1 CFBT
  1483. ZR X1,IFS0 IF NO FILES LARGER THAN THRESHOLD
  1484. MESSAGE IFSF,3
  1485. MESSAGE IFSE,3
  1486. MESSAGE IFSF,3
  1487. WRITEC O,IFSF
  1488. WRITEC O,IFSE
  1489. WRITEC O,IFSF
  1490. IFS0 SA1 FCNT
  1491. RJ CDD CONVERT FILE COUNT TO DISPLAY
  1492. MX0 6
  1493. BX6 -X0*X6
  1494. SA1 ADOT
  1495. BX6 X1+X6
  1496. SB3 60
  1497. SB3 B3-B2
  1498. LX6 B3
  1499. SA6 IFSA+3
  1500. SA1 POPT
  1501. SA5 =10HDESTAGE =
  1502. ZR X1,IFS1 IF *PO=D*
  1503. SA5 =10HRELEASE =
  1504. IFS1 BX6 X5
  1505. SA6 IFSA+2
  1506. MESSAGE IFSA,3 * FILES SELECTED FOR PPPPPPP = XXXXXXXXX.*
  1507. WRITEC O,IFSA
  1508. MX0 -6 SET MASK FOR DEVICE NUMBER SEARCH
  1509. IFS2 SA5 TSDV
  1510. ZR X5,IFS8 IF NO SELECTED DEVICE
  1511. IFS3 BX1 -X0*X5
  1512. ZR X1,IFS7 IF THIS ENTRY NOT APPLICABLE
  1513. PL X0,IFS4 IF PROCESSING DEVICE TYPE ENTRIES
  1514. SX1 X1+100B
  1515. RJ COD CONVERT TO DISPLAY
  1516. SA3 =8L, DN = SET DEVICE NUMBER INTO MESSAGE
  1517. MX2 -12
  1518. BX2 -X2*X6
  1519. BX6 X2+X3
  1520. LX6 12
  1521. SA6 IFSC
  1522. EQ IFS6 ADD TRACK COUNT TO MESSAGE
  1523.  
  1524. IFS4 SA3 =6L DT = SET DEVICE TYPE AND SPINDLES INTO MESSAGE
  1525. MX2 12
  1526. BX6 X2*X1
  1527. LX6 24
  1528. BX1 -X2*X1
  1529. SX2 2R,
  1530. ZR X1,IFS5 IF SINGLE SPINDLE DEVICE
  1531. SX2 X1+2R1,
  1532. IFS5 BX2 X2+X6
  1533. BX6 X2+X3
  1534. SA6 IFSC
  1535. IFS6 SA2 A5+B1 SECTORS SELECTED
  1536. MX6 12
  1537. BX5 -X6*X5
  1538. AX5 36 TRACK SIZE
  1539. IX1 X2/X5 NUMBER OF TRACKS
  1540. RJ COD CONVERT TRACKS TO DISPLAY
  1541. MX1 6
  1542. BX6 -X1*X6
  1543. SA1 ADOT
  1544. BX6 X1+X6
  1545. SB3 60
  1546. SB3 B3-B2
  1547. LX6 B3
  1548. SA6 IFSC+3
  1549. * MESSAGE IFSC,3 * DT = TTT, FILE TRACK COUNT = XXXXXXXXX.*
  1550. MESSAGE IFSC,3 * DN = NN, FILE TRACK COUNT = XXXXXXXXX.*
  1551. WRITEC O,IFSC
  1552. IFS7 SA5 A5+TSDVE
  1553. NZ X5,IFS3 IF MORE SELECTED DEVICES
  1554. PL X0,IFS8 IF CHECKING DEVICE TYPE
  1555. MX2 21 SET MASK FOR DEVICE TYPE/SPINDLES
  1556. LX2 9
  1557. BX0 X0-X2
  1558. EQ IFS2 SEARCH FOR DEVICE TYPES
  1559.  
  1560. IFS8 SA2 INCH
  1561. SA3 UNITS FEET OR MEGABYTES
  1562. LX3 12
  1563. SX3 X3-2RMB
  1564. NZ X3,IFS9 IF FEET
  1565. SX6 IFSD * MEGABYTES REQUIRED FOR DUMP= X..X*
  1566. SA6 IFSG
  1567. SX3 PBYT NUMBER OF 8-BIT BYTES PER PRU
  1568. IX2 X2*X3 BYTES
  1569. SX3 500 ROUND TO KILOBYTES FOR CONVERSION
  1570. IX2 X2+X3
  1571. LX3 1
  1572. IX1 X2/X3 KILOBYTES
  1573. RJ CFD CONVERT TO F10.3 DISPLAY MEGABYTES
  1574. SB2 B3+60
  1575. EQ IFS10 CONTINUE PROCESSING MESSAGE
  1576.  
  1577. IFS9 SX3 12*32 CONVERSION FROM INCHES*32 TO FEET
  1578. SX6 IFSB * FEET OF DUMP TAPE REQUIRED = X..X*
  1579. IX1 X2/X3
  1580. SA6 IFSG
  1581. RJ CDD CONVERT AMOUNT REQUIRED TO DISPLAY
  1582. IFS10 SA1 ADOT
  1583. MX0 6
  1584. BX2 X0*X6
  1585. BX6 -X0*X6
  1586. BX6 X1+X6
  1587. SB3 60
  1588. SB3 B3-B2
  1589. NZ B3,IFS11 IF NOT TEN CHARACTERS
  1590. LX6 6
  1591. IFS11 LX6 B3
  1592. SA3 IFSG
  1593. SA6 X3+3
  1594. SA1 A6-B1
  1595. LX1 54
  1596. BX1 -X0*X1
  1597. BX6 X1+X2
  1598. LX6 6
  1599. SA6 A1
  1600. MESSAGE X3,3 * MEGABYTES/FEET OF DUMP TAPE REQUIRED..*
  1601. WRITEC O,X3
  1602. EQ IFSX RETURN
  1603.  
  1604.  
  1605. IFSA DATA C* FILES SELECTED FOR PPPPPPP = XXXXXXXXX.*
  1606. IFSB DATA C* FEET OF DUMP TAPE REQUIRED = XXXXXXXXX.*
  1607. IFSC DATA C* DT = XXX, FILE TRACK COUNT = XXXXXXXXX.*
  1608. IFSD DATA C* MEGABYTES REQUIRED FOR DUMP=XXXXXX.XXX.*
  1609. IFSE DATA C+ *WARNING* - FILES LARGER THAN *DL* LIMIT SKIPPED.+
  1610. IFSF DATA C+ *WARNING*+
  1611. IFSG BSS 1 POINTER TO MESSAGE TO BE ISSUED
  1612. RCS SPACE 4,15
  1613. ** RCS - RESTORE CHARACTER SET.
  1614. *
  1615. * RESTORES ORIGINAL CHARACTER SET IF IT WAS CHANGED.
  1616. *
  1617. * ENTRY (CSET) .NE. 0 IF CHARACTER SET WAS CHANGED.
  1618. *
  1619. * EXIT CHARACTER SET IS THE SAME AS UPON ENTERING *GENPFD*.
  1620. *
  1621. * USES X - 1.
  1622. * A - 1.
  1623. *
  1624. * MACROS CSET.
  1625.  
  1626.  
  1627. RCS SUBR ENTRY/EXIT
  1628. SA1 CSET
  1629. ZR X1,RCSX IF CHARACTER SET WAS NOT CHANGED
  1630. CSET RESTORE RESTORE ORIGINAL CHARACTER SET
  1631. EQ RCSX RETURN
  1632. SRT SPACE 4,20
  1633. ** SRT - MERGE SORT OF *ITEML* SIZE ENTRIES.
  1634. *
  1635. * *SRT* SORTS THE *ITEML* SIZE ENTRIES ON THE SELECTION FILE
  1636. * ON THE FIRST WORD OF EACH ENTRY, USED AS AN UNSIGNED, 60-BIT
  1637. * NUMERIC SORT KEY. THE ALGORITHM USED IS TAKEN
  1638. * FROM N. WIRTH, *ALGORITHMS + DATA STRUCTURES = PROGRAMS*,
  1639. * PRENTICE-HALL, PP. 97-98.
  1640. *
  1641. * ENTRY THE SELECTION FILE CONTAINS AT LEAST ONE ENTRY.
  1642. *
  1643. * EXIT SORTED ENTRIES ON SELECTION FILE.
  1644. *
  1645. * USES X - 1, 2, 6.
  1646. * A - 1, 6.
  1647. *
  1648. * CALLS DTR, MRG.
  1649. *
  1650. * MACROS RESET, REWIND, REWRYTE, UNLOAD, WRITER.
  1651.  
  1652.  
  1653. SRT SUBR ENTRY/EXIT
  1654. UNLOAD AF UNLOAD WORK FILES
  1655. UNLOAD BF
  1656.  
  1657. * REPEAT DISTRIBUTE/MERGE PASSES.
  1658.  
  1659. SRT1 REWRYTE AF
  1660. REWRYTE BF
  1661. RESET CF
  1662. RJ DTR DISTRIBUTE RUNS FROM C ONTO A AND B
  1663. WRITER AF,R
  1664. WRITER BF,R
  1665. RESET AF
  1666. RESET BF
  1667. REWRYTE CF
  1668. SX6 B0+ INITIALIZE COUNT OF RUNS FOR THIS PASS
  1669. SA6 NRUN
  1670. RJ MRG MERGE RUNS FROM A AND B ONTO C
  1671. WRITER CF,R
  1672. SA1 NRUN
  1673. SX2 B1
  1674. IX1 X1-X2
  1675. NZ X1,SRT1 IF NOT A SINGLE RUN YET
  1676. UNLOAD AF
  1677. UNLOAD BF
  1678. REWIND CF,R
  1679. EQ SRTX RETURN
  1680. TITLE DIRECTIVE PROCESSORS.
  1681. PDL SPACE 4,20
  1682. ** PDL - PROCESS *DL* DIRECTIVE.
  1683. *
  1684. * EXTRACT AND STORE DESTAGE MAXIMUM SIZE IN FEET OR MEGABYTES.
  1685. *
  1686. * ENTRY (X6) = FIRST ARGUMENT.
  1687. * (B6) = NEXT STRING BUFFER ADDRESS.
  1688. * = 0, IF TERMINATOR ENCOUNTERED.
  1689. *
  1690. * EXIT DESTAGE MAXIMUM SIZE STORED.
  1691. * TO *GEN1* IF NO ERRORS.
  1692. * TO *GEN12* IF ERROR DETECTED.
  1693. *
  1694. * USES X - 5, 6.
  1695. * A - 6.
  1696. * B - 7.
  1697. *
  1698. * CALLS DXB.
  1699.  
  1700.  
  1701. PDL BSS 0 ENTRY
  1702. BX5 X6
  1703. SB7 B1 INDICATE DECIMAL CONVERSION
  1704. RJ DXB
  1705. NZ X4,GEN12 IF ARGUMENT ERROR
  1706. NZ X6,PDL1 IF ARGUMENT IS NOT ZERO
  1707. MX6 -0 MARK *DL=0* ENTRY
  1708. PDL1 SA6 DLFV SAVE THE DESTAGE LIMIT
  1709. EQ GEN1 RETURN
  1710. PDT SPACE 4,20
  1711. ** PDT - PROCESS *DT* DIRECTIVE.
  1712. *
  1713. * EXTRACT AND STORE DESTAGE MINIMUM SIZE IN FEET OR MEGABYTES.
  1714. *
  1715. * ENTRY (X6) = FIRST ARGUMENT.
  1716. * (B6) = NEXT STRING BUFFER ADDRESS.
  1717. * = 0, IF TERMINATOR ENCOUNTERED.
  1718. *
  1719. * EXIT DESTAGE MINIMUM SIZE STORED.
  1720. * TO *GEN1* IF NO ERRORS.
  1721. * TO *GEN12* IF ERROR DETECTED.
  1722. *
  1723. * USES X - 5, 6.
  1724. * A - 6.
  1725. * B - 7.
  1726. *
  1727. * CALLS DXB.
  1728.  
  1729.  
  1730. PDT BSS 0 ENTRY
  1731. BX5 X6
  1732. SB7 B1 INDICATE DECIMAL CONVERSION
  1733. RJ DXB
  1734. NZ X4,GEN12 IF ARGUMENT ERROR
  1735. NZ X6,PDT1 IF ARGUMENT IS NOT ZERO
  1736. MX6 -0 MARK *DT=0* ENTRY
  1737. PDT1 SA6 DTFV SAVE DESTAGE MINIMUM
  1738. EQ GEN1 RETURN
  1739. PPG SPACE 4,20
  1740. ** PPG - PROCESS *PG* DIRECTIVE.
  1741. *
  1742. * PROCESS PREFERRED RESIDENCE GROUPINGS.
  1743. *
  1744. * ENTRY (X6) = FIRST ARGUMENT.
  1745. * (B6) = NEXT STRING BUFFER ADDRESS.
  1746. * = 0, IF TERMINATOR ENCOUNTERED.
  1747. *
  1748. * EXIT PREFERRED RESIDENCE GROUPINGS STORED.
  1749. * TO *GEN1* IF NO ERRORS.
  1750. * TO *GEN11*, *GEN12* OR *GEN13* IF ERROR DETECTED.
  1751. *
  1752. * USES X - 0, 1, 2, 3, 4, 5, 6.
  1753. * A - 1, 2, 6.
  1754. *
  1755. * CALLS POP.
  1756.  
  1757.  
  1758. PPG BSS 0 ENTRY
  1759. SX1 B0+ CLEAR TABLE POINTER
  1760. PPG1 SA6 TPRG+X1 SAVE PARAMETER VALUE IN TABLE
  1761. BX5 X6
  1762. MX0 6
  1763. SX6 X1+1
  1764. SA6 TPRGP SAVE PRIORITY GROUP TABLE POINTER
  1765. PPG2 ZR X5,PPG4 IF NO MORE CODES TO CHECK
  1766. BX1 X0*X5
  1767. BX5 X5-X1
  1768. LX5 6
  1769. SA2 PRCD VALID PREFERRED RESIDENCE CODES
  1770. PPG3 LX2 6
  1771. BX3 X0*X2
  1772. BX4 X1-X3
  1773. ZR X4,PPG2 IF CODES MATCH
  1774. NZ X3,PPG3 IF MORE CODES TO CHECK
  1775. EQ GEN12 REPORT ERROR
  1776.  
  1777. PPG4 ZR B6,GEN1 IF NO MORE ARGUMENTS
  1778. NG B6,GEN11 IF NO TERMINATOR FOUND
  1779. RJ POP GET THE NEXT ARGUMENT
  1780. NZ B5,GEN11 IF ERROR OR ARGUMENT TOO LONG
  1781. SA1 TPRGP
  1782. SX2 X1-TPRGL
  1783. NG X2,PPG1 IF ROOM REMAINS IN PRIORITY GROUP TABLE
  1784. SX5 PPGA * TOO MANY PRIORITY GROUP (PG) ENTRIES.*
  1785. EQ GEN13 ISSUE ERROR MESSAGE
  1786.  
  1787.  
  1788. PPGA DATA C* TOO MANY PRIORITY GROUP (PG) ENTRIES.*
  1789. PRL SPACE 4,20
  1790. ** PRL - PROCESS *RL* DIRECTIVE.
  1791. *
  1792. * PROCESS RELEASE LIMITS FOR DEVICES OR DEVICE TYPES.
  1793. *
  1794. * ENTRY (X6) = FIRST ARGUMENT.
  1795. * (B6) = NEXT STRING BUFFER ADDRESS.
  1796. * = 0, IF TERMINATOR ENCOUNTERED.
  1797. *
  1798. * EXIT RELEASE LIMITS DEFINED.
  1799. * TO *GEN1* IF NO ERRORS.
  1800. * TO *GEN11*, *GEN12* OR *GEN13* IF ERROR DETECTED.
  1801. *
  1802. * USES X - 0, 1, 2, 5, 6, 7.
  1803. * A - 0, 1, 5, 6.
  1804. * B - 6, 7.
  1805. *
  1806. * CALLS CAP, DXB, POP.
  1807. *
  1808. * MACROS MESSAGE, WRITEC.
  1809.  
  1810.  
  1811. PRL BSS 0 ENTRY
  1812. BX1 X6
  1813. LX1 6
  1814. SX1 X1-1R0
  1815. BX5 X6
  1816. NG X1,PRL1 IF A DEVICE TYPE
  1817. SB7 B0 INDICATE OCTAL CONVERSION
  1818. RJ DXB CONVERT DEVICE NUMBER
  1819. NZ X4,GEN12 IF ERROR
  1820. MX0 6 SET UP MASK FOR DEVICE NUMBER
  1821. LX0 6
  1822. EQ PRL3 CHECK ACTIVE DEVICES
  1823.  
  1824. * VALIDATE DEVICE TYPE.
  1825.  
  1826. PRL1 SA2 PRLA
  1827. RJ CAP CHECK FOR ALLOWABLE PATTERN
  1828. NZ X1,GEN12 IF NOT ALLOWABLE PATTERN
  1829. MX0 12
  1830. BX5 -X0*X6 NUMBER OF SPINDLES
  1831. BX6 X0*X6 DEVICE MNEMONIC
  1832. MX1 -3 MASK FOR SPINDLE COUNT
  1833. ZR X5,PRL2 IF NUMBER OF SPINDLES NOT SPECIFIED
  1834. LX5 18
  1835. SX5 X5-1R1
  1836. BX7 X1*X5
  1837. NG X5,GEN12 IF NUMBER OF SPINDLES INCORRECT
  1838. NZ X7,GEN12 IF TOO MANY SPINDLES SPECIFIED
  1839. PRL2 LX5 6
  1840. BX6 X5+X6 MERGE SPINDLES WITH DEVICE TYPE
  1841. LX1 6
  1842. BX0 -X1+X0 DEVICE TYPE / SPINDLES MASK
  1843.  
  1844. * FIND MATCHING CATALOG DEVICE ENTRY.
  1845. * (X0) = MASK FOR DEVICE NUMBER OR DEVICE TYPE/SPINDLES.
  1846. * (X6) = DEVICE NUMBER OR DEVICE TYPE/SPINDLES SPECIFIED.
  1847.  
  1848. PRL3 SA1 TCDV GET FIRST ACTIVE DEVICE TABLE ENTRY
  1849. BX7 X7-X7 CLEAR FOR TRACK DATA
  1850. MX2 36 SET UP MASK
  1851. PRL4 BX5 X0*X1
  1852. BX5 X5-X6
  1853. NZ X5,PRL5 IF DEVICE TYPE/NUMBER DOES NOT MATCH
  1854. LX1 12 POSITION TRACK SIZE
  1855. BX5 X2*X1
  1856. LX5 -12
  1857. IX1 X5-X7
  1858. ZR X7,PRL4.1 IF FIRST MATCHING ENTRY
  1859. PL X1,PRL5 IF PREVIOUS ENTRY HAD LESS AVAILABLE
  1860. PRL4.1 BX7 X5
  1861. SA7 PRLB SAVE TRACK SIZE, AVAILABLE AND TOTAL
  1862. PRL5 SA1 A1+TCDVE GET NEXT CATALOG DEVICE ENTRY
  1863. NZ X1,PRL4 IF NOT END OF TABLE
  1864. NZ X7,PRL5.1 IF A MATCH WAS FOUND
  1865. SX5 ERDT * DEVICE TYPE/NUMBER NOT FOUND.*
  1866. MESSAGE X5,3
  1867. WRITEC O,X5
  1868. EQ GEN1 RETURN
  1869.  
  1870. * ADD VALIDATED ENTRY TO SELECTED DEVICE TABLE.
  1871. * (X0) = MASK FOR DEVICE NUMBER OR DEVICE TYPE/SPINDLES.
  1872. * (X6) = DEVICE NUMBER OR DEVICE TYPE/SPINDLES SPECIFIED.
  1873.  
  1874. PRL5.1 SA1 TSDV GET FIRST SELECTED DEVICE TABLE ENTRY
  1875. ZR X1,PRL7 IF TABLE IS EMPTY
  1876. PRL6 BX5 X0*X1
  1877. BX1 X5-X6
  1878. ZR X1,PRL7 IF MATCHING ENTRY FOUND IN TABLE
  1879. SA1 A1+TSDVE
  1880. NZ X1,PRL6 IF ANOTHER ENTRY TO CHECK
  1881. PL X1,PRL7 IF ROOM IN TABLE TO ADD NEW ENTRY
  1882. SX5 PRLC * TOO MANY DEVICE SELECTION (RL) ENTRIES.*
  1883. EQ GEN13 ISSUE ERROR MESSAGE
  1884.  
  1885. PRL7 SA6 A1 ADD ENTRY TO TABLE
  1886. SA0 A1 SAVE ADDRESS OF ENTRY
  1887.  
  1888. * PROCESS REQUIRED TRACKS ARGUMENT IF PRESENT.
  1889. * (A0) = ADDRESS OF SELECTED DEVICE ENTRY.
  1890.  
  1891. NG B6,PRL8 IF NO SEPARATOR/TERMINATOR
  1892. ZR B6,PRL8 IF NO MORE ARGUMENTS
  1893. RJ POP PICK OUT NEXT ARGUMENT
  1894. NZ B5,GEN11 IF ERROR OR ARGUMENT TOO LONG
  1895. NZ B6,GEN11 IF TOO MANY ARGUMENTS
  1896. BX5 X6
  1897. SB7 B0 INDICATE OCTAL CONVERSION
  1898. RJ DXB CONVERT REQUIRED TRACKS
  1899. NZ X4,GEN12 IF ERROR
  1900. SA5 PRLB CHECK TOTAL TRACKS
  1901. MX0 -12
  1902. AX5 12
  1903. BX1 -X0*X5 TOTAL TRACKS
  1904. IX1 X1-X6
  1905. PL X1,PRL8 IF LESS REQUIRED THAN TOTAL
  1906. IX6 X1+X6 SET REQUIRED EQUAL TO TOTAL
  1907. PRL8 AX5 12
  1908. BX1 -X0*X5 AVAILABLE TRACKS
  1909. IX1 X6-X1
  1910. PL X1,PRL11 IF SUFFICIENT TRACKS NOT ALREADY AVAILABLE
  1911. SX5 ERST * SUFFICIENT TRACKS ALREADY AVAILABLE.*
  1912. MESSAGE X5,3
  1913. WRITEC O,X5
  1914. SA1 TSDVE+A0 MOVE ALL FOLLOWING ENTRIES BACK ONE
  1915. PRL9 BX6 X1
  1916. SA1 A1+B1
  1917. NZ X6,PRL10 IF NOT AN EMPTY ENTRY
  1918. SX6 B0+
  1919. SX1 B0+
  1920. PRL10 SA6 A0
  1921. BX7 X1
  1922. SA1 A1+B1
  1923. SA7 A6+B1
  1924. SA0 A7+B1
  1925. NZ X6,PRL9 IF ALL ENTRIES NOT MOVED
  1926. EQ GEN1 RETURN
  1927.  
  1928. * CONSTRUCT SELECTED DEVICE TABLE ENTRY.
  1929. * (A0) = ADDRESS OF ENTRY.
  1930. * (X5) = TRACK SIZE (BITS 23-12).
  1931. * (X6) = TRACKS GOAL.
  1932.  
  1933. PRL11 SA1 A0
  1934. AX5 12 TRACK SIZE
  1935. MX0 24
  1936. IX6 X5*X6 TOTAL SECTORS REQUIRED
  1937. LX0 12
  1938. BX1 X0*X1 DEVICE TYPE/NUMBER
  1939. LX5 36 TRACK SIZE
  1940. LX6 12 REQUIRED SECTORS
  1941. BX6 X5+X6 TRACK SIZE AND REQUIRED SECTORS
  1942. BX6 X1+X6 ADD DEVICE TYPE/NUMBER
  1943. SA6 A0
  1944. EQ GEN1 RETURN
  1945.  
  1946.  
  1947. PRLA VFD 9/113B,51/0 PATTERN FOR DEVICE TYPE CHECK
  1948. PRLB BSS 1 TEMPORARY STORAGE
  1949. PRLC DATA C* TOO MANY DEVICE SELECTION (RL) ENTRIES.*
  1950. PSF SPACE 4,15
  1951. ** PSF - PROCESS *SF* AND *XF* DIRECTIVES.
  1952. *
  1953. * PROCESS SPECIFIC FILE/USER INDEX SELECTIONS AND EXCLUSIONS.
  1954. *
  1955. * ENTRY (X6) = FIRST ARGUMENT.
  1956. * (B6) = NEXT STRING BUFFER ADDRESS.
  1957. * = 0, IF TERMINATOR ENCOUNTERED.
  1958. *
  1959. * EXIT SPECIFIED FILE SELECTIONS STORED.
  1960. * TO *GEN1* IF NO ERRORS.
  1961. * TO *GEN11* OR *GEN12* IF ERROR DETECTED.
  1962. *
  1963. * USES X - 0, 2, 5, 6.
  1964. * A - 0, 2, 5, 6.
  1965. * B - 7.
  1966. *
  1967. * CALLS DXB, PFV, POP.
  1968.  
  1969.  
  1970. PSF BSS 0 ENTRY
  1971. ZR X6,GEN11 IF NO USER INDEX SPECIFIED
  1972. BX5 X6
  1973. SB7 B0 INDICATE OCTAL CONVERSION
  1974. RJ DXB
  1975. NZ X4,GEN12 IF ERROR
  1976. ZR X6,GEN12 IF USER INDEX IS ZERO
  1977. MX0 -17
  1978. BX5 X0*X6
  1979. NZ X5,GEN12 IF USER INDEX EXCEEDS 377777B
  1980. SA5 TDIRX
  1981. SA2 DIRV
  1982. MX0 -18
  1983. BX5 X0*X5
  1984. BX5 X2-X5
  1985. NZ X5,PSF1 IF NOT EXCLUSION DIRECTIVE
  1986. BX6 -X0-X6 INVERT USER INDEX FOR EXCLUSIONS
  1987. PSF1 SA5 PSFA ADD USER INDEX TO PATTERN
  1988. BX5 X0*X5
  1989. BX6 X5+X6
  1990. SA6 A5
  1991. BX6 X6-X6 CLEAR FILE NAME
  1992. NG B6,PSF2 IF NO TERMINATOR
  1993. ZR B6,PSF2 IF NO MORE ARGUMENTS
  1994. RJ POP GET FIRST FILE NAME
  1995. NZ B5,GEN11 IF ERROR EXTRACTING ARGUMENT
  1996. PSF2 SA0 PSFA
  1997. RJ PFV PROCESS POSSIBLE LIST OF FILE NAMES
  1998. EQ GEN1 RETURN
  1999.  
  2000.  
  2001. PSFA VFD 21/4444444B,21/0,18/0 PATTERN / USER INDEX
  2002. PSFB CON 77777777777777000000B MASK FOR FILE NAMES IN *PFV*
  2003. PSFC DATA C* ENTER FILE NAME(S).* PROMPT
  2004. PSV SPACE 4,15
  2005. ** PSV - PROCESS *SV* DIRECTIVE.
  2006. *
  2007. * PROCESS ALTERNATE STORAGE VSN SPECIFICATIONS.
  2008. *
  2009. * ENTRY (X6) = FIRST ARGUMENT.
  2010. * (B6) = NEXT STRING BUFFER ADDRESS.
  2011. * = 0, IF TERMINATOR ENCOUNTERED.
  2012. *
  2013. * EXIT ALTERNATE STORAGE VSN ENTRIES PROCESSED.
  2014. * TO *GEN1* IF NO ERRORS.
  2015. * TO *GEN12* FROM *PFV* IF ERROR DETECTED.
  2016. *
  2017. * USES A - 0.
  2018. *
  2019. * CALLS PFV.
  2020.  
  2021.  
  2022. PSV BSS 0 ENTRY
  2023. SA0 PSVA
  2024. RJ PFV PROCESS POSSIBLE LIST OF VSN-S
  2025. EQ GEN1 RETURN
  2026.  
  2027.  
  2028. PSVA VFD 18/443333B,42/0 PATTERN
  2029. PSVB CON 77777777777700000000B MASK FOR VSN-S IN *PFV*
  2030. PSVC DATA C* ENTER VSN(S).* PROMPT
  2031. PTD SPACE 4,20
  2032. ** PTD - PROCESS *D* DIRECTIVE.
  2033. *
  2034. * EXTRACT AND STORE THE DESTAGE TAPE DENSITY.
  2035. *
  2036. * ENTRY (X6) = FIRST ARGUMENT.
  2037. *
  2038. * EXIT (DENS) = NUMBER OF BYTES/INCH FOR SELECTED DENSITY.
  2039. * (GAPS) = SIZE OF INTERRECORD GAP IN INCHES*32.
  2040. * (CTSF) = NONZERO IF CARTRIDGE TAPE DENSITY.
  2041. * TO *GEN1* IF NO ERRORS.
  2042. * TO *GEN12* IF ERROR DETECTED.
  2043. *
  2044. * USES X - 0, 1, 5, 6.
  2045. * A - 1, 6.
  2046.  
  2047.  
  2048. PTD BSS 0 ENTRY
  2049. MX0 30
  2050. SA1 TDEN-1
  2051. PTD1 SA1 A1+1
  2052. ZR X1,GEN12 IF NOT A VALID TAPE DENSITY
  2053. BX5 X1-X6
  2054. BX5 X0*X5
  2055. NZ X5,PTD1 IF NO MATCH
  2056. MX0 -18
  2057. BX6 -X0*X1 SAVE THE DENSITY
  2058. SA6 DENS
  2059. MX0 -11
  2060. AX1 18 SAVE THE GAP SIZE
  2061. BX6 -X0*X1
  2062. MX0 -1
  2063. SA6 GAPS
  2064. AX1 11 SAVE THE CARTRIDGE TAPE FLAG
  2065. BX6 -X0*X1
  2066. SA6 CTSF
  2067. EQ GEN1 RETURN
  2068. PTF SPACE 4,20
  2069. ** PTF - PROCESS *F* DIRECTIVE.
  2070. *
  2071. * EXTRACT AND STORE THE DESTAGE TAPE FORMAT.
  2072. *
  2073. * ENTRY (X6) = FIRST ARGUMENT.
  2074. *
  2075. * EXIT (PBLK) = NUMBER OF DISK PRU-S PER TAPE BLOCK (MINUS 1).
  2076. * TO *GEN1* IF NO ERRORS.
  2077. * TO *GEN12* IF ERROR DETECTED.
  2078. *
  2079. * USES X - 0, 1, 5, 6.
  2080. * A - 1, 6.
  2081.  
  2082.  
  2083. PTF BSS 0 ENTRY
  2084. MX0 12
  2085. SA1 TFMT-1
  2086. PTF1 SA1 A1+1
  2087. ZR X1,GEN12 IF NOT A VALID TAPE FORMAT
  2088. BX5 X1-X6
  2089. BX5 X0*X5
  2090. NZ X5,PTF1 IF NO MATCH
  2091. MX0 -12
  2092. BX6 -X0*X1 SAVE THE PRU-S PER TAPE BLOCK
  2093. SA6 PBLK
  2094. EQ GEN1 RETURN
  2095. TITLE SECONDARY SUBROUTINES.
  2096. CAP SPACE 4,30
  2097. ** CAP - CHECK FOR ALLOWABLE PATTERNS.
  2098. *
  2099. * CHECK PARAMETERS FOR ALLOWABLE CHARACTER PATTERNS.
  2100. *
  2101. * ENTRY (X5) = PARAMETER, LEFT JUSTIFIED ZERO FILLED.
  2102. * (X2) = PATTERN, LEFT JUSTIFIED ZERO FILLED. PATTERN
  2103. * CONSISTS OF ONE OCTAL DIGIT FOR EACH CHARACTER
  2104. * POSITION OF THE PARAMETER. EACH OCTAL DIGIT
  2105. * INDICATES THE CHARACTERS THAT ARE VALID FOR
  2106. * THAT CHARACTER POSITION, AS FOLLOWS.
  2107. *
  2108. * 0 - ANY CHARACTER.
  2109. * 1 - CHARACTERS A THROUGH Z.
  2110. * 2 - DIGITS 0 THROUGH 4.
  2111. * 3 - DIGITS 0 THROUGH 9.
  2112. * 4 - CHARACTERS A THROUGH Z, DIGITS 0 THROUGH 9.
  2113. * 5 - NO CHARACTER IS VALID.
  2114. *
  2115. * EXIT (X1) = 0 IF PARAMETER MATCHES PATTERN.
  2116. * (X1) .NE. 0 IF PARAMETER DOES NOT MATCH PATTERN.
  2117. *
  2118. * USES X - 1, 2, 4, 5.
  2119. * A - 1.
  2120. * B - 3, 4.
  2121.  
  2122.  
  2123. CAP SUBR ENTRY/EXIT
  2124. CAP1 LX5 6
  2125. SX1 X5
  2126. ZR X1,CAPX IF ALL CHARACTERS CHECKED
  2127. BX5 X5-X1
  2128. SB4 X1
  2129. LX2 3
  2130. SX1 X2 INDEX TO PATTERNS
  2131. ZR X1,CAP1 IF NO RESTRICTION ON THIS CHARACTER
  2132. BX2 X2-X1
  2133. LX1 2 PATTERN INDEX * 4
  2134. SB3 X1
  2135. LX1 1 PATTERN INDEX * 8
  2136. SB3 B3+X1 PATTERN INDEX * 12
  2137. SA1 CAPA
  2138. MX4 -6
  2139. LX1 X1,B3
  2140. BX4 -X4*X1
  2141. SB3 X4
  2142. GT B4,B3,CAPX IF CHARACTER OUT OF RANGE
  2143. MX4 -6
  2144. LX1 -6
  2145. BX4 -X4*X1
  2146. SB3 X4
  2147. GE B4,B3,CAP1 IF CHARACTER WITHIN RANGE
  2148. EQ CAPX RETURN WITH ERROR INDICATION
  2149.  
  2150.  
  2151. CAPA VFD 12/2LAZ,12/2L04,12/2L09,12/2LA9,12/2L10
  2152. GSH SPACE 4,20
  2153. ** GSH - GET SUMMARY RECORD HEADER.
  2154. *
  2155. * GSH IDENTIFIES A RECORD AND MOVES THE HEADER INFORMATION
  2156. * TO THE WORKING STORAGE AREA. GSH IS CALLED ONLY BY GSR, AND
  2157. * SHOULD BE CONSIDERED AS A PART OF THAT ROUTINE.
  2158. *
  2159. * ENTRY (X6) = FIRST WORD OF RECORD HEADER.
  2160. *
  2161. * EXIT (X1) .EQ. 0 IF HEADER READ OK.
  2162. * (X1) .NE. 0 IF EOR/EOF/EOI ON READ.
  2163. * (GSRB) = HEADER SIZE - 1.
  2164. * (GSRC) = ITEM SIZE.
  2165. * (GSRE) = FIRST WORD OF RECORD HEADER. THE REST OF THE
  2166. * HEADER FOLLOWS IN THE NEXT (GSRB) WORDS.
  2167. *
  2168. * USES X - 0, 1, 2, 6, 7.
  2169. * A - 1, 6, 7.
  2170. *
  2171. * MACROS READO, READW.
  2172.  
  2173.  
  2174. GSH SUBR ENTRY/EXIT
  2175. READO X5
  2176. NZ X1,GSHX IF EOR/EOF/EOI ON SUMMARY FILE
  2177. SA6 GSRE
  2178. MX0 42
  2179. SA1 TCER-1
  2180. BX6 X0*X6
  2181. GSH1 SA1 A1+B1
  2182. BX2 X0*X1
  2183. ZR X2,GSH2 IF AT END OF TABLE
  2184. BX2 X2-X6
  2185. NZ X2,GSH1 IF NO MATCH ON THIS TYPE
  2186. GSH2 MX0 -9
  2187. BX6 -X0*X1 SAVE ITEM SIZE
  2188. SA6 GSRC
  2189. LX1 -9
  2190. BX6 -X0*X1 SAVE HEADER SIZE
  2191. SA6 GSRB
  2192. BX1 X6
  2193. ZR X1,GSHX IF NO HEADER INFO TO READ
  2194. SA1 GSRE DECREMENT WORD COUNT FOR HEADER
  2195. IX7 X1-X6
  2196. SA7 A1
  2197. READW X5,GSRE+1,X6 READ HEADER INFORMATION
  2198. EQ GSHX RETURN
  2199. GSR SPACE 4,40
  2200. ** GSR - GET SUMMARY RECORD.
  2201. *
  2202. * GSR LOCATES A SPECIFIED TYPE OF RECORD AND RETURNS IT TO
  2203. * THE CALLER IN THE SPECIFIED LOCATION.
  2204. *
  2205. * ENTRY (A1) = ADDRESS OF FIRST WORD OF PARAMETER LIST.
  2206. * (X1) = FIRST WORD OF PARAMETER LIST.
  2207. *
  2208. * PARAMETER LIST IS AS FOLLOWS:
  2209. *
  2210. * WORD 1 - FWA OF REQUESTED RECORD TYPE.
  2211. * REQUESTED RECORD TYPES CAN BE:
  2212. *
  2213. * INIT - OPEN/INITIALIZE FILE - RETURNS
  2214. * THE PREFIX TABLE.
  2215. * SYSTEM - RETURNS THE SYSTEM ID BLOCK.
  2216. * DEVSTAT - RETURNS A DEVICE STATUS ENTRY.
  2217. * CATE - RETURNS A CATALOG ENTRY.
  2218. *
  2219. * WORD 2 - FWA OF FET.
  2220. * WORD 3 - FWA OF BUFFER TO RECEIVE DATA.
  2221. * WORD 4 - ADDRESS OF STATUS RETURN WORD.
  2222. *
  2223. * EXIT (STATUS WORD) = 0, A RECORD OF THE DESIRED TYPE WAS
  2224. * RETURNED.
  2225. * .GT. 0, AN EXCEPTION OF SOME TYPE OCCURRED
  2226. * ON THE *READW* CALL. USUALLY THIS
  2227. * WILL BE *EOR*, *EOF* OR *EOI*.
  2228. * .LT. 0, THE NEXT AVAILABLE RECORD IS NOT
  2229. * THE REQUESTED TYPE, AFTER PREVIOUS
  2230. * TRANSFER OF THAT RECORD TYPE.
  2231. *
  2232. * (BUFFER) = A RECORD OF THE REQUESTED TYPE, PROVIDED
  2233. * THAT THE STATUS IS ZERO.
  2234. *
  2235. * THE REQUESTED RECORD IS RETURNED TO SPECIFIED BUFFER.
  2236. * THE RECORD RETURNED (EXCEPT WHEN THE REQUEST ISSUED IS
  2237. * *INIT*) CONSISTS OF ONE RECORD TYPE WORD CONTAINING
  2238. * THE RECORD IDENTIFIER AND THE COUNT OF REMAINING WORDS
  2239. * IN THE CURRENT BLOCK, A COPY OF THE HEADER PORTION OF
  2240. * THE RECORD, AND THE CURRENT ITEM OF THE RECORD.
  2241. * THE LENGTHS OF THE HEADER AND ITEM PORTIONS OF THE
  2242. * RETURNED RECORD DEPEND UPON THE PARTICULAR TYPE OF
  2243. * RECORD BEING RETURNED.
  2244. * THE DATA RETURNED IN RESPONSE TO THE *INIT* REQUEST
  2245. * CONSISTS OF THE PREFIX TABLE FOR THE FILE.
  2246. *
  2247. * TO *ABT* WITH MESSAGE IF SUMMARY FILE ERROR.
  2248. *
  2249. * USES X - 0, 1, 2, 3, 4, 5, 6.
  2250. * A - 1, 2, 3, 4, 6.
  2251. * B - 2.
  2252. *
  2253. * CALLS GSH.
  2254. *
  2255. * MACROS READ, READO, READW.
  2256.  
  2257.  
  2258. GSR SUBR ENTRY/EXIT
  2259. SX6 A1 SAVE THE CALLING SEQUENCE POINTER
  2260. SA6 GSRA
  2261. SA5 A1+B1 GET FET ADDRESS
  2262. SA3 GSRE CHECK CURRENT RECORD TYPE
  2263. NZ X3,GSR2 IF ALREADY INITIALIZED
  2264.  
  2265. * PROCESS INITIAL REQUEST.
  2266.  
  2267. READ X5,R
  2268. READO X5 READ FIRST WORD OF FILE
  2269. NZ X1,GSR9 IF EOR/EOF/EOI ON SUMMARY FILE
  2270. SA6 GSRE SAVE RECORD TYPE INDICATOR
  2271. SA1 GSRA RESTORE ENTRY REGISTERS
  2272. SA1 X1
  2273. SA2 X1 GET REQUESTED RECORD TYPE
  2274. SA3 GSRD CHECK AGAINST PREFIX HEADER
  2275. BX6 X3-X6
  2276. NZ X6,GSR10 IF NOT A CORRECT PREFIX RECORD
  2277. SA3 =4LINIT
  2278. BX6 X2-X3
  2279. SA4 A1+2 GET BUFFER ADDRESS
  2280. ZR X6,GSR1 IF *INIT* REQUEST
  2281. SX4 WSA USE SCRATCH BUFFER IF NOT *INIT* REQUEST
  2282. GSR1 SA3 GSRE
  2283. BX6 X3
  2284. LX3 12
  2285. AX3 -12 NUMBER OF WORDS TO READ
  2286. SA6 X4 SAVE PREFIX HEADER IN BUFFER
  2287. SX4 X4+B1
  2288. READW X5,X4,X3 READ THE PREFIX TABLE INTO BUFFER
  2289. SA2 GSRA
  2290. SA3 X2+3 GET STATUS WORD ADDRESS
  2291. BX6 X1
  2292. SA6 X3 SAVE STATUS
  2293. SA1 X2
  2294. SA2 X1
  2295. SA3 =4LINIT
  2296. BX6 X2-X3
  2297. ZR X6,GSRX IF REQUEST WAS *INIT*
  2298.  
  2299. * SEARCH FOR REQUESTED RECORD TYPE.
  2300.  
  2301. GSR2 SA2 X1 GET REQUESTED RECORD TYPE
  2302. SA3 GSRE
  2303. MX0 42
  2304. BX6 X2-X3
  2305. BX6 X0*X6
  2306. ZR X6,GSR5 IF REQUEST IS FOR CURRENT RECORD TYPE
  2307.  
  2308. * REQUEST IS NOT FOR CURRENT RECORD TYPE - FIND NEXT RECORD.
  2309.  
  2310. BX6 -X0*X3
  2311. NZ X6,GSR3 IF CURRENT BLOCK NOT EXHAUSTED
  2312. RJ GSH GET CATALOG RECORD HEADER
  2313. NZ X1,GSR7 IF EOR/EOF/EOI ON SUMMARY FILE
  2314. SA1 GSRA
  2315. SA1 X1
  2316. EQ GSR2 CHECK IF REQUESTED RECORD TYPE
  2317.  
  2318. GSR3 SX2 WSAL
  2319. IX1 X6-X2
  2320. BX6 X0*X3
  2321. PL X1,GSR4 IF REMAINING WORDS EXCEED SCRATCH BUFFER
  2322. BX2 -X0*X3 SET REMAINING WORD COUNT
  2323. BX1 X1-X1
  2324. GSR4 BX6 X1+X6
  2325. SA6 A3 UPDATE RECORD HEADER WORD COUNT
  2326. READW X5,WSA,X2
  2327. NZ X1,GSR7 IF EOR/EOF/EOI ON SUMMARY FILE
  2328. SA2 GSRA
  2329. SA1 X1
  2330. EQ GSR2 REPEAT UNTIL REQUESTED RECORD TYPE FOUND
  2331.  
  2332. * REQUEST IS FOR CURRENT RECORD TYPE.
  2333.  
  2334. GSR5 BX6 -X0*X3
  2335. ZR X6,GSR8 IF CURRENT BLOCK IS EXHAUSTED
  2336. SA4 A1+2 GET BUFFER ADDRESS
  2337. SA2 GSRB HEADER SIZE
  2338. SB2 X2
  2339. SA2 GSRC GET ITEM SIZE
  2340. IX6 X3-X2 DECREMENT WORDS REMAINING
  2341. SA6 A3+
  2342. GSR6 SA6 X4 STORE WORD OF HEADER
  2343. SA3 A3+B1
  2344. SX4 X4+B1 INCREMENT BUFFER ADDRESS
  2345. SB2 B2-B1
  2346. BX6 X3
  2347. PL B2,GSR6 IF MORE WORDS TO TRANSFER
  2348. READW X5,X4,X2 READ NEXT ITEM INTO BUFFER AFTER HEADER
  2349. GSR7 SA2 GSRA
  2350. SA3 X2+3 GET STATUS WORD ADDRESS
  2351. MX6 1
  2352. BX6 -X6*X1
  2353. SA6 X3+ SAVE STATUS
  2354. EQ GSRX RETURN
  2355.  
  2356. GSR8 RJ GSH GET CATALOG RECORD HEADER
  2357. NZ X1,GSR7 IF EOR/EOF/EOI ON SUMMARY FILE
  2358. SA1 GSRA
  2359. SA1 X1
  2360. SA2 X1
  2361. SA3 GSRE
  2362. MX0 42
  2363. BX6 X2-X3
  2364. BX6 X0*X6
  2365. ZR X6,GSR5 IF STILL SAME RECORD TYPE
  2366. SA2 A1+3
  2367. MX6 1 STORE END OF CURRENT RECORD TYPE STATUS
  2368. SA6 X2
  2369. EQ GSRX RETURN
  2370.  
  2371. GSR9 SX5 ERSE * SUMMARY FILE IS EMPTY.*
  2372. EQ ABT ABORT
  2373.  
  2374. GSR10 SX5 ERSP * SUMMARY FILE PREFIX TABLE ERROR.*
  2375. EQ ABT ABORT
  2376.  
  2377.  
  2378. GSRA BSS 1 PARAMETER LIST ADDRESS
  2379. GSRB BSS 1 LENGTH OF RECORD HEADER PORTION
  2380. GSRC BSS 1 LENGTH OF RECORD ITEM PORTION
  2381. GSRD VFD 12/7700B,12/SFPTL,36/0 PREFIX TABLE HEADER
  2382. GSRE CON 0 RECORD IDENTIFIER WORD
  2383. BSS SFSHL ALLOW FOR LONGEST RECORD HEADER
  2384.  
  2385. ** TABLE OF SUMMARY FILE RECORD TYPES.
  2386. *
  2387. * *TCER* CONTAINS THE NAMES AND HEADER AND ITEM SIZES
  2388. * ASSOCIATED WITH KNOWN SUMMARY FILE RECORD TYPES.
  2389. * UNKNOWN RECORD TYPES CAN EXIST ON THE SUMMARY FILE.
  2390. * THEY WILL BE CONSIDERED TO HAVE A HEADER LENGTH OF ZERO AND
  2391. * AN ITEM SIZE OF ONE WORD FOR BYPASSING PURPOSES.
  2392. *
  2393. *T 42/ RID, 9/ HL, 9/ IL
  2394. *
  2395. * RID RECORD IDENTIFIER.
  2396. * HL NUMBER OF WORDS IN HEADER.
  2397. * IL NUMBER OF WORDS IN EACH ITEM.
  2398.  
  2399.  
  2400. TCER BSS 0
  2401. VFD 42/0LSYSTEM,9/SFSHL,9/SFSIL
  2402. VFD 42/0LDEVSTAT,9/SFDHL,9/SFDIL
  2403. VFD 42/0LCATE,9/SFFHL,9/SFFIL
  2404. VFD 42/0,9/0,9/1
  2405. PFV SPACE 4,15
  2406. ** PFV - PROCESS FILE NAMES AND VSN-S.
  2407. *
  2408. * ENTRY (X6) = FIRST FILE NAME OR VSN TO ADD TO TABLE.
  2409. * (A0) = ADDRESS OF PARAMETER LIST.
  2410. *
  2411. * EXIT FILE NAME OR VSN ENTRIES ADDED TO *TSFV* TABLE.
  2412. *
  2413. * ERROR TO *GEN13* WITH ERROR MESSAGE AND POSSIBLE ABORT.
  2414. *
  2415. * USES X - 0, 1, 2, 5, 6, 7.
  2416. * A - 1, 2, 5, 6, 7.
  2417. * B - 2.
  2418. *
  2419. * CALLS CAP, DXB, POP, USB.
  2420. *
  2421. * MACROS READ, READC, WRITEC, WRITEW.
  2422.  
  2423.  
  2424. PFV SUBR ENTRY/EXIT
  2425. SA5 TSFVP SAVE CURRENT TABLE SIZE
  2426. BX0 X5
  2427. BX7 X5
  2428. SA7 PFVC
  2429. PFV1 SA2 A0+B1 GET MASK
  2430. BX5 -X2*X6
  2431. NZ X5,PFV9 IF ARGUMENT IS TOO LONG
  2432. SX5 X0-TSFVN
  2433. ZR X5,PFV8 IF TOO MANY FILES/VSN-S
  2434. SA5 A0 GET USER INDEX/VSN FLAG WORD
  2435. BX2 X2*X5 EXTRACT VERIFICATION PATTERN
  2436. BX5 X5-X2 ISOLATE USER INDEX/VSN FLAG
  2437. BX6 X5+X6 MERGE UI/VSN FLAG WITH FILE NAME/VSN
  2438. SA6 TSFV+X0
  2439. SX0 X0+1
  2440. BX5 X6-X5 ISOLATE FILE NAME/VSN
  2441. RJ CAP CHECK FOR ALLOWABLE PATTERN
  2442. NZ X1,PFV9 IF INCORRECT ARGUMENT
  2443. SX1 X6
  2444. NZ X1,PFV2 IF NOT A VSN SPECIFICATION
  2445. LX6 12
  2446. MX1 24
  2447. BX5 X1*X6 EXTRACT THE DIGITS FROM THE VSN
  2448. BX6 X0
  2449. SA6 PFVB
  2450. SB7 B1+ INDICATE DECIMAL CONVERSION
  2451. RJ DXB
  2452. NZ X4,PFV9 IF ERROR IN CONVERSION
  2453. SA1 PFVB RESTORE TABLE POINTER
  2454. BX0 X6
  2455. AX0 12
  2456. NZ X0,PFV9 IF NUMERIC VALUE EXCEEDS 4095
  2457. BX0 X1
  2458. SA1 TSFV-1+X0
  2459. MX5 24 REPLACE DISPLAY DIGITS WITH BINARY
  2460. LX5 -12
  2461. BX1 -X5*X1
  2462. LX6 36
  2463. BX6 X1+X6
  2464. SA6 A1+
  2465. PFV2 ZR B6,PFV3 IF TERMINATOR ENCOUNTERED
  2466. PL B6,PFV4 IF MORE ARGUMENTS
  2467. PFV3 BX6 X6-X6
  2468. SA6 TSFV+X0
  2469. BX6 X0 UPDATE TABLE SIZE
  2470. SA6 TSFVP
  2471. EQ PFVX RETURN
  2472.  
  2473. * GET NEXT FILE NAME OR VSN.
  2474.  
  2475. PFV4 RJ POP
  2476. NG B5,PFV9 IF ERROR
  2477. NZ X6,PFV1 IF ANOTHER FILE NAME/VSN
  2478. ZR B6,PFV3 IF TERMINATOR ENCOUNTERED
  2479. PL B6,PFV4 IF MORE ON THIS LINE
  2480. SA1 ZINF
  2481. NZ X1,PFV3 IF CALLED WITH *Z* OPTION
  2482. SA1 IDTP
  2483. NZ X1,PFV6 IF NOT TERMINAL INPUT
  2484. SX2 A0+2 ADDRESS OF PROMPT MESSAGE
  2485. WRITEC O,X2
  2486. READ I,R
  2487. PFV6 READC I,LINE,8
  2488. NZ X1,PFV3 IF END-OF-RECORD FOUND
  2489. SA1 ODTP
  2490. ZR X1,PFV7 IF OUTPUT FILE IS A TERMINAL FILE
  2491. WRITEW O,BLNK,1 MOVE LINE OVER
  2492. WRITEC O,LINE,8 COPY LINE OF FILE NAMES TO LISTING
  2493. PFV7 SB2 LINE
  2494. RJ USB
  2495. SX6 B7+B1
  2496. SA6 A6
  2497. SX6 1R.
  2498. SA6 B7+B1
  2499. EQ PFV4 GET NEXT FILE NAME/VSN
  2500.  
  2501. * TOO MANY ENTRIES.
  2502.  
  2503. PFV8 SX5 PFVA * TOO MANY FILE/VSN SELECTION ENTRIES.*
  2504. EQ PFV10 RESTORE *TSFV* TABLE AND ABORT
  2505.  
  2506. * ERROR WHILE CRACKING FILE LIST.
  2507.  
  2508. PFV9 SX5 ERDA * DIRECTIVE ARGUMENT ERROR.*
  2509. PFV10 SA1 PFVC RESTORE *TSFV* TABLE
  2510. BX6 X1
  2511. SA6 TSFVP
  2512. SX6 B0+
  2513. SA6 TSFV+X1
  2514. EQ GEN13 DISPLAY ERROR AND ABORT
  2515.  
  2516.  
  2517. PFVA DATA C* TOO MANY FILE/VSN SELECTION (SF SV XF) ENTRIES.*
  2518. PFVB BSS 1 TEMPORARY STORAGE
  2519. PFVC BSS 1 SIZE OF *TSFV* TABLE AT ENTRY
  2520. TITLE SORTMERGE PROCESSING SUBROUTINES.
  2521. CIT SPACE 4,15
  2522. ** CIT - COPY ONE ITEM FROM ONE FILE TO ANOTHER.
  2523. *
  2524. * ENTRY (X2) = ADDRESS OF FET TO READ FROM.
  2525. * (X5) = ADDRESS OF FET TO WRITE TO.
  2526. *
  2527. * EXIT ITEM COPIED.
  2528. * *ERUN* SET IF ITEM COPIED WAS END OF A RUN.
  2529. *
  2530. * USES X - 1, 2, 3, 5, 6, 7.
  2531. * A - 1, 2, 3, 5, 6, 7.
  2532. *
  2533. * MACROS GETITEM, PUTITEM.
  2534.  
  2535.  
  2536. CIT2 NG X1,CIT1 IF NEXT ITEM .LT. COPIED ITEM
  2537.  
  2538. CIT SUBR ENTRY/EXIT
  2539. SX6 X2 SAVE X FET ADDRESS
  2540. SX7 X5 SAVE Y FET ADDRESS
  2541. SA6 CITA
  2542. SA7 CITB
  2543. GETITEM X2,CITC
  2544. SA5 CITB
  2545. PUTITEM X5,CITC
  2546. SA2 CITA
  2547. SA1 X2+EOF CHECK STATUS OF THIS FILE
  2548. NZ X1,CIT1 IF EOF(X)
  2549. SA1 X2+RPTR
  2550. SA3 CITC
  2551. SX6 B0+ CLEAR END OF RUN FLAG
  2552. SA6 ERUN
  2553. BX6 X1-X3
  2554. IX1 X1-X3
  2555. PL X6,CIT2 IF SAME SIGN (NO OVERFLOW POSSIBLE)
  2556. PL X3,CITX IF NEXT ITEM .GT. COPIED ITEM
  2557. CIT1 SX6 B1+ SET END OF RUN FLAG
  2558. SA6 ERUN
  2559. EQ CITX RETURN
  2560.  
  2561.  
  2562. CITA BSS 1 INPUT FET ADDRESS
  2563. CITB BSS 1 OUTPUT FET ADDRESS
  2564. CITC BSS ITEML BLOCK FOR HOLDING COPIED ENTRY
  2565. CRN SPACE 4,15
  2566. ** CRN - COPY RUN OF ENTRIES BETWEEN FILES.
  2567. *
  2568. * ENTRY (X2) = FET READ FROM.
  2569. * (X5) = FET WRITTEN TO.
  2570. *
  2571. * EXIT RUN COPIED FROM X2 FILE TO X5 FILE.
  2572. *
  2573. * USES X - 1, 2, 5, 6, 7.
  2574. * A - 1, 2, 5, 6, 7.
  2575. *
  2576. * MACROS COPITEM.
  2577.  
  2578.  
  2579. CRN SUBR ENTRY/EXIT
  2580. SX6 X2 SAVE INPUT FET ADDRESS
  2581. SX7 X5 SAVE OUTPUT FET ADDRESS
  2582. SA6 CRNA
  2583. SA7 CRNB
  2584.  
  2585. * REPEAT COPYING ITEMS UNTIL END-OF-RUN.
  2586.  
  2587. CRN1 SA2 CRNA
  2588. SA5 CRNB
  2589. COPITEM X2,X5
  2590. SA1 ERUN
  2591. ZR X1,CRN1 IF NOT END OF RUN BEING COPIED
  2592. EQ CRNX RETURN
  2593.  
  2594.  
  2595. CRNA BSS 1 INPUT FET ADDRESS
  2596. CRNB BSS 1 OUTPUT FET ADDRESS
  2597. DTR SPACE 4,15
  2598. ** DTR - DISTRIBUTE RUNS FROM C ONTO A AND B.
  2599. *
  2600. * ENTRY ALL ENTRIES ARE ON THE *CF* FILE.
  2601. * ALL THREE FILES ARE READY TO GO.
  2602. *
  2603. * EXIT RUNS ARE DISTRIBUTED EVENLY BETWEEN *AF* AND *BF*.
  2604. *
  2605. * USES X - 1, 3.
  2606. * A - 1, 3.
  2607. *
  2608. * MACROS COPYRUN.
  2609.  
  2610.  
  2611. DTR SUBR ENTRY/EXIT
  2612.  
  2613. * REPEAT COPY RUNS UNTIL EOF(C).
  2614.  
  2615. DTR1 COPYRUN CF,AF
  2616. SA1 CF+EOF
  2617. NZ X1,DTR2 IF EOF(C)
  2618. COPYRUN CF,BF
  2619. SA1 CF+EOF
  2620. DTR2 ZR X1,DTR1 IF NOT EOF(C)
  2621. EQ DTRX RETURN
  2622. GIT SPACE 4,20
  2623. ** GIT - GET AN ITEM FROM A FILE.
  2624. *
  2625. * *GIT* PERFORMS A PASCAL-LIKE READ FROM A FILE INTO
  2626. * A SPECIFIED LOCATION. THIS INVOLVES MOVING THE
  2627. * CURRENT FILE POINTER VALUE INTO THE LOCATION AND
  2628. * READING THE NEXT ENTRY FROM THE FILE INTO THE POINTER.
  2629. *
  2630. * ENTRY (X0) = FET ADDRESS.
  2631. * (X5) = ITEM DESTINATION ADDRESS.
  2632. * FILE POINTER HAS DESIRED ENTRY, OR BAD VALUE
  2633. * IF THE FILE IS AT EOF.
  2634. *
  2635. * EXIT VALUE MOVED.
  2636. * EOF FLAG SET IF NEXT READ FAILS.
  2637. *
  2638. * USES X - 6.
  2639. * A - 6.
  2640. *
  2641. * MACROS MOVE, READW.
  2642.  
  2643.  
  2644. GIT SUBR ENTRY/EXIT
  2645. MOVE ITEML,X0+RPTR,X5
  2646. READW X0,X0+RPTR,ITEML
  2647. SX6 X1+ SET EOF FLAG APPROPRIATELY
  2648. SA6 X2+EOF
  2649. EQ GITX RETURN
  2650. MRG SPACE 4,20
  2651. ** MRG - MERGE PHASE OF MERGESORT.
  2652. *
  2653. * *MRG* IS THE LOGICAL COMPLEMENT OF ROUTINE *DTR*. *MRG*
  2654. * MERGES ALL THE RUNS DISTRIBUTED ONTO *AF* AND *BF* AND
  2655. * WRITES THEM ON *CF*.
  2656. *
  2657. * ENTRY *AF* AND *BF* HAVE ITEM RUNS.
  2658. *
  2659. * EXIT *AF* AND *BF* ARE EMPTY.
  2660. * *CF* CONTAINS ALL RUNS.
  2661. * NUMBER OF RUNS IS APPROXIMATELY CUT IN HALF.
  2662. *
  2663. * USES X - 1, 2, 3, 6.
  2664. * A - 1, 2, 3, 6.
  2665. *
  2666. * CALLS MRN.
  2667. *
  2668. * MACROS COPYRUN.
  2669.  
  2670.  
  2671. MRG SUBR ENTRY/EXIT
  2672.  
  2673. * WHILE NOT EOF(A) AND EOF(B) DO MERGE RUN.
  2674.  
  2675. MRG1 SA2 AF+EOF
  2676. SA3 BF+EOF
  2677. CX2 X2
  2678. CX3 X3
  2679. IX2 X2+X3 EOF(A) OR EOF(B)
  2680. NZ X2,MRG2 IF EITHER AT EOF THEN STOP
  2681. RJ MRN MERGE ONE RUN ONTO C
  2682. SA1 NRUN
  2683. SX6 1
  2684. IX6 X1+X6 INCREMENT COUNT OF RUNS
  2685. SA6 A1
  2686. EQ MRG1 LOOP FOR NEXT RUN TO MERGE
  2687.  
  2688. * COPY REST OF A ONTO C.
  2689.  
  2690. MRG2 SA2 AF+EOF
  2691. NZ X2,MRG3 IF EOF(A) THEN STOP
  2692. COPYRUN AF,CF
  2693. SA1 NRUN
  2694. SX6 1
  2695. IX6 X1+X6 INCREMENT COUNT OF RUNS
  2696. SA6 A1
  2697. EQ MRG2 LOOP FOR NEXT RUN TO COPY
  2698.  
  2699. * COPY REST OF B ONTO C.
  2700.  
  2701. MRG3 SA3 BF+EOF
  2702. NZ X3,MRGX IF EOF(B) THEN RETURN
  2703. COPYRUN BF,CF
  2704. SA1 NRUN INCREMENT COUNT OF RUNS
  2705. SX6 1
  2706. IX6 X1+X6
  2707. SA6 A1
  2708. EQ MRG3 LOOP FOR NEXT RUN TO COPY
  2709. MRN SPACE 4,15
  2710. ** MRN - MERGE ONE RUN FROM A AND B ONTO C.
  2711. *
  2712. * ENTRY AT LEAST ONE RUN IS ON *AF* AND ON *BF*.
  2713. *
  2714. * EXIT ONE FEWER RUN ON *AF* AND *BF*.
  2715. * ONE MORE RUN ON *CF*.
  2716. *
  2717. * USES X - 1, 3, 4.
  2718. * A - 1, 3, 4.
  2719. *
  2720. * MACROS COPITEM, COPYRUN.
  2721.  
  2722.  
  2723. MRN SUBR ENTRY/EXIT
  2724.  
  2725. * REPEAT COPYING ITEMS UNTIL END-OF-RUN.
  2726.  
  2727. MRN1 SA3 AF+RPTR
  2728. SA4 BF+RPTR
  2729. BX1 X3-X4
  2730. IX3 X4-X3
  2731. PL X1,MRN3 IF SAME SIGN (NO OVERFLOW POSSIBLE)
  2732. NG X4,MRN4 IF A.KEY .LT. B.KEY
  2733.  
  2734. * A.KEY .GT. B.KEY.
  2735.  
  2736. MRN2 COPITEM BF,CF
  2737. SA1 ERUN
  2738. ZR X1,MRN1 IF NOT END OF RUN ON B
  2739. COPYRUN AF,CF
  2740. EQ MRNX RETURN
  2741.  
  2742. MRN3 NG X3,MRN2 IF A.KEY .GT. B.KEY
  2743.  
  2744. * A.KEY .LE. B.KEY.
  2745.  
  2746. MRN4 COPITEM AF,CF
  2747. SA1 ERUN
  2748. ZR X1,MRN1 IF NOT END OF RUN ON A
  2749. COPYRUN BF,CF
  2750. EQ MRNX RETURN
  2751. PIT SPACE 4,10
  2752. ** PIT - WRITE AN ITEM TO A FILE.
  2753. *
  2754. * ENTRY (X2) = FET ADDRESS.
  2755. * (X5) = ADDRESS OF ITEM TO WRITE.
  2756. *
  2757. * MACROS WRITEW.
  2758.  
  2759.  
  2760. PIT SUBR ENTRY/EXIT
  2761. WRITEW X2,X5,ITEML
  2762. EQ PITX RETURN
  2763. RST SPACE 4,15
  2764. ** RST - REWIND FILE AND PREPARE FOR READING.
  2765. *
  2766. * *RST* REWINDS THE SPECIFIED FILE AND READS THE FIRST
  2767. * ENTRY INTO THE FILE-S POINTER.
  2768. *
  2769. * ENTRY (X2) = FET ADDRESS.
  2770. *
  2771. * EXIT FILE REWOUND AND PARTIALLY READ
  2772. * EOF FLAG SET IF FILE IS EMPTY.
  2773. *
  2774. * USES X - 6.
  2775. * A - 6.
  2776. *
  2777. * MACROS READ, READW, REWIND.
  2778.  
  2779.  
  2780. RST SUBR ENTRY/EXIT
  2781. REWIND X2,R
  2782. READ X2,R
  2783. READW X2,X2+RPTR,ITEML
  2784. SX6 X1+ NON-ZERO IF READW HIT EOR/EOF/EOI
  2785. SA6 X2+EOF
  2786. EQ RSTX RETURN
  2787. RWR SPACE 4,10
  2788. ** RWR - REWIND FILE AND PREPARE FOR WRITING.
  2789. *
  2790. * ENTRY (X2) = FET ADDRESS.
  2791. *
  2792. * EXIT FILE REWOUND, EOF FLAG SET ON.
  2793. *
  2794. * USES X - 6.
  2795. * A - 6.
  2796. *
  2797. * MACROS REWIND, WRITE.
  2798.  
  2799.  
  2800. RWR SUBR ENTRY/EXIT
  2801. REWIND X2,R
  2802. WRITE X2,*
  2803. SX6 77B FLAG FILE ALWAYS EOF
  2804. SA6 X2+EOF
  2805. EQ RWRX RETURN
  2806. TITLE COMMON DECKS.
  2807. SPACE 4,10
  2808. * COMMON DECKS.
  2809.  
  2810.  
  2811. *CALL COMCCDD
  2812. *CALL COMCCFD
  2813. *CALL COMCCIO
  2814. *CALL COMCCOD
  2815. *CALL COMCCPM
  2816. *CALL COMCDXB
  2817. *CALL COMCLFM
  2818. *CALL COMCMVE
  2819. *CALL COMCPOP
  2820. *CALL COMCRDC
  2821. *CALL COMCRDO
  2822. *CALL COMCRDW
  2823. *CALL COMCSNM
  2824. *CALL COMCSYS
  2825. *CALL COMCUSB
  2826. *CALL COMCWTC
  2827. *CALL COMCWTO
  2828. *CALL COMCWTS
  2829. *CALL COMCWTW
  2830. *CALL COMCZTB
  2831. TITLE FILE ENVIRONMENT TABLES.
  2832. FETS SPACE 4,10
  2833. * FETS.
  2834.  
  2835.  
  2836. I BSS 0 INPUT
  2837. INPUT FILEB IBUF,IBUFL,(FET=8)
  2838.  
  2839. O BSS 0 OUTPUT
  2840. OUTPUT FILEB OBUF,OBUFL,(FET=8)
  2841.  
  2842. UD BSS 0 UTILITY DIRECTIVE FILE
  2843. UDIR FILEB UBUF,UBUFL,(FET=8)
  2844.  
  2845. SUMMARY BSS 0 SUMMARY FILE
  2846. SUMMARY FILEB SBUF,SBUFL
  2847.  
  2848. AF BSS 0 MERGE SORT SCRATCH FILE ONE
  2849. ZZZZZG1 FILEB AFBUF,SMBFL,FET=MFETL
  2850. APTR BSSZ ITEML
  2851. AEOF BSSZ 1
  2852.  
  2853. BF BSS 0 MERGE SORT SCRATCH FILE TWO
  2854. ZZZZZG2 FILEB BFBUF,SMBFL,FET=MFETL
  2855. BPTR BSSZ ITEML
  2856. BEOF BSSZ 1
  2857.  
  2858. CF BSS 0 MERGE SORT FILE
  2859. ZZZZZG3 FILEB CFBUF,SMBFL,FET=MFETL
  2860. CPTR BSSZ ITEML
  2861. CEOF BSSZ 1
  2862. TITLE PRS - PRESET ROUTINES.
  2863. USE PRESET
  2864. PRS SPACE 4,20
  2865. ** PRS - PRESET PROGRAM.
  2866. *
  2867. * *PRS* CRACKS THE COMMAND, SETS UP FETS FOR I/O, DETERMINES
  2868. * IF INPUT IS FROM A TERMINAL AND SETS FLAGS AND POINTERS.
  2869. *
  2870. * USES X - 0, 1, 2, 4, 6.
  2871. * A - 0, 1, 2, 4, 6.
  2872. * B - 1, 2, 3, 4, 5, 6.
  2873. *
  2874. * CALLS ARG, STF, ZAP.
  2875. *
  2876. * MACROS CSET, GETJO, MESSAGE, READ, SETLOF.
  2877.  
  2878.  
  2879. PRS SUBR ENTRY/EXIT
  2880. SB1 1
  2881.  
  2882. * CRACK PARAMETERS FROM COMMAND.
  2883.  
  2884. SA1 ACTR GET NUMBER OF ARGUMENTS
  2885. SB4 X1+
  2886. SA4 ARGR GET FIRST ARGUMENT
  2887. SB5 TCAT COMMAND ARGUMENT TABLE ADDRESS
  2888. RJ ARG PROCESS ARGUMENTS
  2889. NZ X1,PRS9 IF ERROR
  2890.  
  2891. * CHECK FOR FILE NAME CONFLICTS.
  2892.  
  2893. SB2 B0+ BEGINNING ORDINAL FOR LFN CHECK
  2894. SB4 B2+TLFNL TERMINATION ORDINAL FOR LFN CHECK
  2895. MX0 42
  2896. PRS1 SA1 TLFN+B2 NEXT ENTRY FROM ARGUMENT TABLE
  2897. LX1 -30
  2898. SA1 X1 LFN FROM FET
  2899. BX1 X0*X1
  2900. SB3 B2+B1 BEGIN CHECKING WITH FOLLOWING ENTRY
  2901. EQ B3,B4,PRS3 IF ALL LFNS HAVE BEEN CHECKED
  2902. PRS2 SA2 TLFN+B3 NEXT ENTRY FROM ARGUMENT TABLE
  2903. LX2 -30
  2904. SA2 X2 LFN FROM FET
  2905. BX2 X1-X2
  2906. BX2 X0*X2
  2907. ZR X2,PRS9 IF FILE NAME CONFLICT
  2908. SB3 B3+B1
  2909. LT B3,B4,PRS2 IF MORE LFNS TO CHECK
  2910. SB2 B2+B1
  2911. EQ PRS1 PROCESS NEXT FILE IN LIST
  2912.  
  2913. * PROCESS *Z* PARAMETER IF SPECIFIED.
  2914.  
  2915. PRS3 SA1 ZINF COMMAND LINE INPUT FLAG SET BY *ARG*
  2916. ZR X1,PRS4 IF *Z* ARGUMENT NOT GIVEN
  2917. SX2 I SET FET ADDRESS FOR *ZAP*
  2918. RJ ZAP *Z* ARGUMENT PROCESSOR
  2919.  
  2920. * DETERMINE JOB ORIGIN TYPE.
  2921.  
  2922. PRS4 GETJO JORG
  2923. SA1 JORG
  2924. SX2 X1-SYOT
  2925. ZR X2,PRS7 IF SYSTEM ORIGIN
  2926. SX1 X1-IAOT
  2927. NZ X1,PRS5 IF THIS JOB IS NOT INTERACTIVE
  2928. CSET NORMAL
  2929. MX6 1 INDICATE CHARACTER SET CHANGED
  2930. SA6 CSET
  2931.  
  2932. * CHECK FOR TERMINAL FILES.
  2933.  
  2934. PRS5 SA1 ZINF
  2935. NZ X1,PRS6 IF INPUT IS FROM COMMAND LINE
  2936. SX2 I
  2937. RJ STF CHECK FOR INPUT FILE DISPOSITION
  2938. SA6 IDTP
  2939. ZR X6,PRS6 IF INPUT IS A TERMINAL FILE
  2940. READ I READ FIRST PART OF DISK INPUT FILE
  2941. PRS6 WRITE O,* PRESET WRITE FUNCTION
  2942. SX2 O CHECK OUTPUT FILE EQUIPMENT TYPE
  2943. RJ STF
  2944. SA6 ODTP
  2945. MX0 42
  2946. NZ X6,PRS7 IF OUTPUT NOT ASSIGNED TO TERMINAL
  2947. SETLOF LOFP SET LIST-OF-FILES ADDRESS
  2948. EQ PRS8 CONVERT PROCESSING OPTION
  2949.  
  2950. PRS7 GETPP OBUF,PRSB,PRSC GET PRINT PARAMETERS
  2951. WRITEC O,PRSC SET PRINT DENSITY
  2952. WRITEC O,PRSD ISSUE PAGE EJECT
  2953. PRS8 SA1 POPT VALIDATE AND CONVERT PROCESSING OPTION
  2954. LX1 6
  2955. SX6 X1-1RD
  2956. SX1 X1-1RR
  2957. SA6 POPT
  2958. ZR X6,PRSX IF *PO=D*
  2959. ZR X1,PRSX IF *PO=R*
  2960. PRS9 SX5 PRSA * GENPFD ARGUMENT ERROR.*
  2961. EQ ABT ABORT
  2962.  
  2963.  
  2964. PRSA DATA C* GENPFD ARGUMENT ERROR.*
  2965. PRSB BSS 1
  2966. PRSC BSS 1 PRINT DENSITY FORMAT EFFECTOR
  2967. PRSD DATA 0L1 PAGE EJECT FORMAT EFFECTOR
  2968. SPACE 4,10
  2969. * COMMAND ARGUMENT TABLE.
  2970.  
  2971. TCAT BSS 0 COMMAND ARGUMENT TABLE
  2972. TLFN BSS 0 FILE NAME ARGUMENT LIST
  2973. I ARG I,I INPUT DIRECTIVE FILE NAME
  2974. L ARG O,O LIST OUTPUT FILE NMAE
  2975. U ARG UNITS,UNITS UNITS PARAMETER
  2976. S ARG SUMMARY,SUMMARY SUMMARY FILE NAME
  2977. UD ARG UDIR,UDIR UTILITY DIRECTIVE FILE NAME
  2978. TLFNL EQU *-TCAT LENGTH OF FILE NAME ARGUMENT LIST
  2979.  
  2980. Z ARG -BLNK,ZINF *Z* INPUT FLAG
  2981. PO ARG POPT,POPT PROCESSING OPTION
  2982. CON 0 ARGUMENT LIST TERMINATOR
  2983. SPACE 4,10
  2984. * PRESET COMMON DECKS.
  2985.  
  2986.  
  2987. *CALL COMCARG
  2988. *CALL COMCSTF
  2989. *CALL COMCZAP
  2990. SPACE 4,10
  2991. * BUFFERS.
  2992.  
  2993. USE BUFFERS
  2994.  
  2995. LIST G
  2996. BEGIN BSSN PRS
  2997. AFBUF BSSN SMBFL MERGESORT SCRATCH ONE BUFFER
  2998. BFBUF BSSN SMBFL MERGESORT SCRATCH TWO BUFFER
  2999. CFBUF BSSN SMBFL SELECTION/MERGE SORT BUFFER
  3000. IBUF BSSN IBUFL INPUT BUFFER
  3001. OBUF BSSN OBUFL OUTPUT BUFFER
  3002. SBUF BSSN SBUFL SUMMARY FILE BUFFER
  3003. UBUF BSSN UBUFL UTILITY DIRECTIVES BUFFER
  3004. WSA BSSN WSAL WORKING STORAGE BUFFER
  3005. PAD BSSN 20B UNUSED END OF FL BUFFER AREA
  3006.  
  3007. RFL= BSSN 0 SET INITIAL FIELD LENGTH
  3008. END BSSN
  3009. LIST *
  3010. SPACE 4,10
  3011. * OVERFLOW CHECK.
  3012.  
  3013.  
  3014. USE PRESET
  3015. ERRPL *-IBUF PRESET OVERFLOWS INTO INPUT BUFFER
  3016. SPACE 4
  3017. END GENPFD