Table of Contents

RECLAIM

Table Of Contents

  • [00009] RECLAIM - PERMANENT FILE DUMP/LOAD UTILITY.
  • [00013] PERMANENT FILE DUMP/LOAD UTILITY.
  • [00444] *RECLAIM* DIRECTIVES.
  • [00613] DAYFILE MESSAGES.
  • [00829] COMMON DECKS.
  • [00846] ASSEMBLY CONSTANTS.
  • [00910] FILE FORMATS.
  • [01045] PROGRAMMING NOTES.
  • [01071] SYMBOL DEFINITIONS.
  • [01108] GENERAL MACRO DEFINITIONS.
  • [01112] ABORT - ABORT PROGRAM.
  • [01143] BREAK - PROCESS INTERACTIVE PROGRAM INTERRUPTS.
  • [01169] CLEAR - CLEAR FET POINTERS.
  • [01201] COPYBLK - COPY DATA INTO A DUMP TAPE BLOCK.
  • [01227] INDEX - GENERATE INDEXED TABLE WITH 4-WORD MESSAGES.
  • [01253] OPTION - EXPAND SELECTED DIRECTIVE KEYWORD.
  • [01311] MERGESORT MACRO DEFINITIONS.
  • [01315] REWRYTE - REWIND FILE AND PREPARE FOR WRITING.
  • [01336] RESET - REWIND FILE AND PREPARE FOR READING.
  • [01358] GETITEM - GET AN ITEM FROM A FILE.
  • [01382] PUTITEM - WRITE ITEM TO FILE.
  • [01405] COPITEM - COPY ITEM FROM ONE FILE TO ANOTHER.
  • [01429] COPYRUN - COPY RUN OF ENTRIES BETWEEN FILES.
  • [01451] ARGUMENT TABLES.
  • [01530] DIRECTIVES/OPTIONS TABLES.
  • [01596] OUTPUT HEADINGS.
  • [01632] VARIABLES.
  • [01765] ERROR MESSAGES.
  • [01776] MAIN LOOP.
  • [01778] MAIN - MAIN LOOP.
  • [01896] PROCESS *COMPACT* DIRECTIVE.
  • [01898] COMPACT - PROCESS *COMPACT* DIRECTIVE.
  • [02193] PROCESS *COPY* DIRECTIVE.
  • [02195] COPY - PROCESS *COPY* DIRECTIVE.
  • [02424] PROCESS *DELETE**RESET* DIRECTIVES.
  • [02653] PROCESS *DUMP* DIRECTIVE.
  • [02655] DUMP - PROCESS *DUMP* DIRECTIVE.
  • [02917] PROCESS *END* DIRECTIVE.
  • [02919] END - PROCESS *END* DIRECTIVE.
  • [02951] PROCESS *LIST* DIRECTIVE.
  • [02953] LIST - PROCESS *LIST* DIRECTIVE.
  • [03019] PROCESS *LOAD* DIRECTIVE.
  • [03021] LOAD - PROCESS *LOAD* DIRECTIVE.
  • [03036] PROCESS *REMOVE* DIRECTIVE.
  • [03038] REMOVE - PROCESS *REMOVE* DIRECTIVE.
  • [03085] PROCESS *SET* DIRECTIVE.
  • [03087] SET - PROCESS *SET* DIRECTIVE.
  • [03144] PROCESS *UPDATE* DIRECTIVE.
  • [03146] UPDATE - PROCESS *UPDATE* DIRECTIVE.
  • [03164] PRIMARY SUBROUTINES.
  • [03166] ABT - ABORT PROCESSING.
  • [03264] ADB - ATTACH DATABASE.
  • [03423] BTF - BUILD TAPE FLAGS.
  • [03533] CBR - COPY BINARY RECORD.
  • [03594] CDF - CREATE DATABASE FILE.
  • [03808] CDR - CREATE DATABASE RECORD.
  • [03890] CEI - COPY A FILE TO END-OF-INFORMATION.
  • [03965] CFJ - CONVERT FROM JULIAN (BINARY) TO DISPLAY *YYMMDD*.
  • [04058] COE - CALCULATE OPLD ENTRY.
  • [04098] CRF - CHECK RESERVED FILE NAMES.
  • [04155] CRI - CRITERIA CHECKER.
  • [04490] CTF - COPY *PFDUMP* FILE TO DISK AND REMOVE CONTROL WORDS.
  • [04918] CTJ - CONVERT DISPLAY DATE TO BINARY JULIAN DATE.
  • [04991] CUP - CLEAN UP AFTER DIRECTIVE PROCESSING.
  • [05149] CVH - CHECK FOR VALID DUMP HEADER.
  • [05192] CVP - CONVERT PARAMETERS.
  • [05532] CVS - CHECK VSN FOR SCRATCH.
  • [05572] CVT - CHECK FOR VALID DUMP TAPE.
  • [05622] DFT - DUMP FILE TO TAPE.
  • [05935] IMI - ISSUE MESSAGE INSERTING NAME.
  • [05969] ILC - INCREMENT LINE COUNT.
  • [05987] LCV - LOCATE CURRENT VSN AND REQUEST DUMP INPUT TAPE.
  • [06129] LEF - LOCATE EXISTING TAPE FLAGS.
  • [06176] LVI - LOCATE VSN INDEX
  • [06208] MDL - MAKE DUMP FILE LOCAL.
  • [06348] MFP - MAKE FILE PERMANENT.
  • [06493] PBC - PROCESS BREAK CONDITION.
  • [06506] PDB - POSITION DATA BASE.
  • [06649] PDF - POSITION DUMP FILE.
  • [06736] PFN - PROCESS FILE NAMES.
  • [06857] POT - PROCESS OUTPUT.
  • [06993] PPB - PROCESS PERMIT BLOCK.
  • [07045] PPF - PROCESS PERMANENT FILES.
  • [07115] PRH - PRINT HEADER.
  • [07177] PVZ - PAD VSN WITH CHARACTER *0*.
  • [07235] RDB - READ DATABASE.
  • [07343] RDU - READ *UPDATES* FILE.
  • [07370] RNT - REQUEST NEW TAPE.
  • [07565] ROD - REQUEST OUTPUT DUMP.
  • [07696] RPI - REPRIEVE INTERFACE.
  • [07742] SBU - SORT BY USER.
  • [07866] SDE - SORT DATABASE RECORDS.
  • [07959] SFC - SET FILE COUNT.
  • [07975] SRT - MERGE SORT OF 6-WORD ENTRIES.
  • [08022] UDV - UPDATE DUMP VSNS IN DATABASE
  • [08063] UFV - UPDATE FET VSN
  • [08110] UII - UPDATE FOR INITIAL VSN INDEX RECORD.
  • [08163] UPD - UPDATE DATABASE.
  • [08534] WOR - WRITE OPLD RECORD.
  • [08590] WRB - WRITE PARTIAL TAPE BLOCK.
  • [08654] WRS - WRITE SECTOR BOUNDED BY CONTROL WORDS.
  • [08679] SECONDARY SUBROUTINES.
  • [08681] CIT - COPY ONE ITEM FROM ONE FILE TO ANOTHER.
  • [08724] CRN - COPY RUN OF ENTRIES BETWEEN FILES.
  • [08756] DTR - DISTRIBUTE RUNS FROM C ONTO A AND B.
  • [08781] GIT - GET AN ITEM FROM A FILE.
  • [08809] MRG - MERGE PHASE OF MERGESORT.
  • [08868] MRN - MERGE ONE RUN FROM A AND B ONTO C.
  • [08910] PIT - WRITE AN ITEM TO A FILE.
  • [08922] RST - REWIND FILE AND PREPARE FOR READING.
  • [08946] RWR - REWIND FILE AND PREPARE FOR WRITING.
  • [08964] COMMON DECKS.
  • [08993] FETS AND BUFFERS.
  • [09069] PRS - PRESET ROUTINES.
  • [09072] PRS - PRESET PROGRAM.
  • [09336] OPTIONS.

Source Code

RECLAIM.txt
  1. IDENT RECLAIM,ORIG
  2. ABS
  3. SST
  4. ENTRY RECLAIM
  5. ENTRY RFL=
  6. ENTRY SDM=
  7. SYSCOM B1
  8. LIST F
  9. TITLE RECLAIM - PERMANENT FILE DUMP/LOAD UTILITY.
  10. *COMMENT RECLAIM - PERMANENT FILE DUMP/LOAD UTILITY.
  11. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  12. RECLAIM SPACE 4,10
  13. *** RECLAIM - PERMANENT FILE DUMP/LOAD UTILITY.
  14. *
  15. * J. L. COURTNEY. 81/11/23.
  16. * R. G. UPTON. 80/10/01.
  17. * J. G. HAMBLETON. 79/11/01.
  18. * R. L. LAMEY. 78/09/01.
  19. SPACE 4,10
  20. *** *RECLAIM* IS A UTILITY WHICH ENABLES USER TO EASILY PROVIDE
  21. * MAGNETIC TAPE BACKUP FOR PERMANENT FILES AS WELL AS MAINTAIN
  22. * GREATER CONTROL OVER THE SIZE OF THEIR PERMANENT FILE DISK
  23. * SPACE. THE DUMPED FILES CAN THEN LATER BE LOADED AS
  24. * PERMANENT FILES OR AS LOCAL FILES.
  25. *
  26. * INFORMATION ABOUT DUMPED FILES IS KEPT IN A DIRECT ACCESS
  27. * FILE DATABASE IN THE USER CATALOG. THIS DATABASE STORES
  28. * EACH FILE TYPE (IA OR DA), USER NAME, TAPE VSN WHERE IT WAS
  29. * DUMPED, POSITION ON THE TAPE, AND DATE IT WAS DUMPED.
  30. SPACE 4,20
  31. *** COMMAND FORMAT.
  32. *
  33. *
  34. * RECLAIM(P1,P2...PN)
  35. * OR
  36. * RECLAIM(P1,P2...PN)/KW,OP1...OPN./KW,OP1...OPN./KW,OP1...OPN.
  37. *
  38. *
  39. * *P* MAY BE ONE OF THE FOLLOWING -
  40. *
  41. * PARAMETER DESCRIPTION
  42. * --------- -----------
  43. *
  44. * DB=PFN NAME OF THE DIRECT ACCESS FILE CONTAINING
  45. * THE *RECLAIM* DATABASE. DEFAULT NAME
  46. * IS *RECLDB*.
  47. *
  48. * I=LFN NAME OF THE LOCAL FILE CONTAINING
  49. * USER INPUT DIRECTIVES. DEFAULT NAME
  50. * IS *INPUT*.
  51. *
  52. * L=LFN LIST OUTPUT FILE NAME. DEFAULT NAME
  53. * IS *OUTPUT*.
  54. *
  55. * NA PREVENTS *RECLAIM* FROM ABORTING IN CASE
  56. * OF PROGRAM ERROR. IF OMITTED *RECLAIM*
  57. * WILL ABORT WHEN AN ERROR OCCURS.
  58. *
  59. * NH INHIBITS *RECLAIM* FROM PRINTING A HEADER
  60. * IN THE OUTPUT FILE. A HEADER IS PRINTED
  61. * IF THIS OPTION IS OMITTED.
  62. *
  63. * NV PREVENTS *RECLAIM* FROM VALIDATING THAT A
  64. * RECLAIM DUMP EXISTS ON A DUMP FILE BEING
  65. * WRITTEN AT END-OF-INFORMATION. ALLOWS A
  66. * RECLAIM DUMP TO BE WRITTEN TO ANY FILE.
  67. *
  68. * PN=PACKNAM OPTIONAL PACK NAME FOR THE DATABASE FILE.
  69. *
  70. * PW=PASSWRD OPTIONAL PASSWORD FOR THE DATABASE FILE.
  71. *
  72. * R=DEVTYPE OPTIONAL RESIDENCE DEVICE TYPE FOR THE
  73. * DATABASE FILE. USED ALONG WITH THE *PN*
  74. * PARAMETER. IF NOT SPECIFIED, THE SYSTEM
  75. * DEFAULT DEVICE TYPE WILL BE USED.
  76. *
  77. * S INDICATES THE SITE-MAINTAINED DATABASE IS
  78. * TO BE USED RATHER THAN A USER DATABASE.
  79. * USER DATABASE IS ASSUMED BY DEFAULT.
  80. *
  81. * T=LFN TAPE NUMBER FILE. DEFAULT NAME IS
  82. * *NUMBERS*.
  83. *
  84. * UN=USERNAM OPTIONAL ALTERNATE USER NAME WHERE THE
  85. * DATABASE RESIDES.
  86. *
  87. * Z INDICATES DIRECTIVES ARE TO BE TAKEN FROM
  88. * COMMAND LINE. DEFAULT IS FROM *INPUT*.
  89. *
  90. * RECLAIM(...Z...)/DIR./DIR./DIR.
  91. * / IS ANY CHARACTER NOT IN *DIR*.
  92. SPACE 4,20
  93. *** *KW* MAY BE ONE OF THE FOLLOWING -
  94. *
  95. *
  96. * *KW* DESCRIPTION
  97. * ---- -----------
  98. *
  99. *
  100. * COMPACT REMOVES DELETED OR UNSELECTED FILES FROM A
  101. * DUMP TAPE.
  102. *
  103. * COPY LOADS TO LOCAL FILES ALL FILES MEETING THE CRITERIA
  104. * SPECIFIED BY THE OPTIONS FOLLOWING THE KEYWORD.
  105. *
  106. * DELETE DISABLES ALL FILES MEETING THE SPECIFIED CRITERIA.
  107. *
  108. * DUMP DUMPS TO TAPE ALL FILES MEETING THE SPECIFIED
  109. * CRITERIA.
  110. *
  111. * END ENDS *RECLAIM* PROCESSING.
  112. *
  113. * LIST LISTS THE NAMES OF ALL PERMANENT FILES MEETING THE
  114. * SPECIFIED CRITERIA.
  115. *
  116. * LOAD LOADS ALL OF THE TAPE FILES MEETING THE SPECIFIED
  117. * CRITERIA.
  118. *
  119. * REMOVE PERMANENTLY REMOVES A TAPE VSN FROM THE DATABASE.
  120. *
  121. * RESET RESTORES FILES MEETING THE SPECIFIED CRITERIA WHICH
  122. * WERE PREVIOUSLY DISABLED BY THE *DELETE* DIRECTIVE.
  123. *
  124. * SET REDEFINES THE *RECLAIM* DIRECTIVE OPTION DEFAULTS.
  125. *
  126. * UPDATE UPDATE THE *RECLAIM* DATABASE.
  127. *
  128. *
  129. * SEE *RECLAIM* DIRECTIVES DESCRIPTIONS BELOW FOR DETAILS.
  130. SPACE 4,20
  131. *** *OPN* MAY BE ANY OF THE FOLLOWING -
  132. *
  133. *
  134. * *OP* DESCRIPTION
  135. * ---- -----------
  136. *
  137. *
  138. * AA=YYMMDD PROCESS ONLY FILES ACCESSED AFTER YYMMDD.
  139. * USEFUL FOR *DUMP*. IF *DB=0*, THEN USABLE
  140. * ALSO FOR *COPY*, *LIST* AND *LOAD*.
  141. *
  142. * AB=YYMMDD PROCESS ONLY FILES ACCESSED BEFORE YYMMDD.
  143. * USEFUL FOR *DUMP*. IF *DB=0*, THEN USABLE
  144. * ALSO FOR *COPY*, *LIST* AND *LOAD*.
  145. *
  146. * AD=YYMMDD PROCESS ONLY FILES ACCESSED ON YYMMDD.
  147. * USEFUL FOR *DUMP*. IF *DB=0*, THEN USABLE
  148. * ALSO FOR *COPY*, *LIST* AND *LOAD*.
  149. *
  150. * AS=ASOP SPECIFIES WHETHER TO PRESERVE PERMANENT
  151. * FILE CATALOG DATA RELATING TO CARTRIDGE
  152. * AND TAPE ALTERNATE STORAGE. *ASOP* MAY BE
  153. * *Y* OR *N*. IF *AS* IS OMITTED, *ASOP*
  154. * DEFAULTS TO *N*. IF SPECIFIED WITHOUT AN
  155. * EQUIVALENCE, *ASOP* IS ASSUMED TO BE *Y*.
  156. * THE *AS* OPTION IS USEFUL ONLY WHERE A
  157. * *RECLAIM* DUMP TAPE WILL BE PROCESSED BY
  158. * THE *NOS* UTILITY *PFLOAD*.
  159. * USED ONLY WITH THE *DUMP* DIRECTIVE.
  160. *
  161. * CF=CLFN SPECIFIES THE LOCAL FILE NAME TO BE USED
  162. * FOR THE COMPACTED DUMP. IF *CF* IS
  163. * OMITTED, THE LFN IS THE NAME SPECIFIED BY
  164. * THE *CN* OPTION. IF THE *CN* OPTION IS
  165. * OMITTED, THE LFN *NTAPE* IS USED.
  166. * USED WITH THE *COMPACT* DIRECTIVE.
  167. *
  168. * CN=CPFN NAME BY WHICH THE COMPACTED DUMP WILL
  169. * BE IDENTIFIED IN THE DATABASE IF THE
  170. * ORIGINAL DUMP FILE IS NOT OVERWRITTEN.
  171. * ALSO THE PERMANENT FILE NAME THAT WILL
  172. * BE USED FOR LATER REFERENCES BY *RECLAIM*
  173. * TO THE FILE. THIS OPTION DOES NOT SAVE,
  174. * REPLACE OR DEFINE THE PERMANENT FILE; THAT
  175. * IS THE RESPONSIBILITY OF THE USER.
  176. * USED WITH THE *COMPACT* DIRECTIVE.
  177. *
  178. * CT=VSN COMPACTED TAPE VSN. USED WITH *COMPACT*.
  179. *
  180. * D=DEN SPECIFIES TAPE DENSITY WHEN REQUESTING A
  181. * DUMP. ACCEPTABLE VALUES ARE:
  182. *
  183. * LO - 7-TRACK REEL TAPE, 200 BPI.
  184. * HI - 7-TRACK REEL TAPE, 556 BPI.
  185. * HY - 7-TRACK REEL TAPE, 800 BPI.
  186. * HD - 9-TRACK REEL TAPE, 800 CPI.
  187. * PE - 9-TRACK REEL TAPE, 1600 CPI.
  188. * GE - 9-TRACK REEL TAPE, 6250 CPI.
  189. * CE - CARTRIDGE TAPE, 38000 CPI.
  190. * AE - ACS CARTRIDGE TAPE, 38000 CPI.
  191. *
  192. * DA=YYMMDD PROCESS ONLY FILES DUMPED AFTER *YYMMDD*.
  193. *
  194. * DB=YYMMDD PROCESS ONLY FILES DUMPED BEFORE *YYMMDD*.
  195. *
  196. * DD=YYMMDD PROCESS ONLY FILES DUMPED ON *YYMMDD*.
  197. *
  198. * DE PROCESS ONLY DELETED FILES. DEFAULT IS
  199. * UNDELETED FILES.
  200. *
  201. * DF=DLFN SPECIFIES THE LOCAL FILE NAME TO BE USED
  202. * FOR THE DUMP FILE. IF *DF* IS OMITTED,
  203. * THE LFN IS THE NAME SPECIFIED ON THE *DN*
  204. * OPTION. IF THE *DN* OPTION IS OMITTED,
  205. * THE LFN *TAPE* IS USED. MAY BE USED WITH
  206. * *COMPACT*, *COPY*, *DUMP*, *LOAD* OR ANY
  207. * DIRECTIVE THAT REQUIRES A DUMP TO BE READ
  208. * OR WRITTEN. FOR *COMPACT*, APPLIES TO THE
  209. * ORIGINAL DUMP.
  210. *
  211. * DN=DPFN NAME BY WHICH THE DUMP FILE IS IDENTIFIED
  212. * IN THE DATABASE. FOR A MASS STORAGE DUMP,
  213. * THE PERMANENT FILE NAME USED BY *RECLAIM*
  214. * TO ACCESS THE DUMP FILE. THIS OPTION DOES
  215. * NOT SAVE, REPLACE OR DEFINE THE PERMANENT
  216. * FILE; THAT IS THE RESPONSIBILITY OF THE
  217. * USER. THE *DN* OPTION IS LOGICALLY THE
  218. * EQUIVALENT OF AND INTERCHANGEABLE WITH THE
  219. * *TN* OPTION, EXCEPT THAT IF NO *DT*, *MT*
  220. * OR *NT* OPTION IS SPECIFIED, A *DN* OPTION
  221. * IMPLIES A MASS STORAGE DUMP WHILE A *TN*
  222. * OPTION IMPLIES A TAPE DUMP.
  223. * USED WITH THE *COMPACT*, *COPY*, *DELETE*,
  224. * *DUMP*, *LIST*, *LOAD* AND *RESET*
  225. * DIRECTIVES.
  226. *
  227. * DT=DTYPE SPECIFIES THE RESIDENCY OF THE DUMP FILE
  228. * BEING REFERENCED. ACCEPTABLE VALUES ARE:
  229. *
  230. * MS - MASS STORAGE (DISK).
  231. * MT - 7-TRACK MAGNETIC TAPE - EQUIVALENT
  232. * TO USING THE OBSOLETE *MT* OPTION.
  233. * NT - 9-TRACK MAGNETIC TAPE - EQUIVALENT
  234. * TO USING THE OBSOLETE *NT* OPTION,
  235. * AND THE DEFAULT VALUE FOR *DTYPE*.
  236. * CT - CARTRIDGE TAPE.
  237. * AT - ACS CARTRIDGE TAPE.
  238. *
  239. * USED WITH THE *COMPACT*, *COPY*, *DELETE*,
  240. * *DUMP*, *LIST*, *LOAD* AND *RESET*
  241. * DIRECTIVES.
  242. *
  243. * EI WRITE DUMPED FILES AT EOI ON THE TAPE.
  244. * THIS OPTION IS SELECTED BY DEFAULT FOR
  245. * THE *DUMP* DIRECTIVE.
  246. * USED WITH *DUMP* AND *COMPACT* DIRECTIVES.
  247. *
  248. * EI=NO WRITE DUMPED FILES OVER ANY EXISTING
  249. * FILES ON THE TAPE. THIS OPTION IS
  250. * SELECTED BY DEFAULT FOR THE *COMPACT*
  251. * DIRECTIVE.
  252. * USED WITH *DUMP* AND *COMPACT* DIRECTIVES.
  253. *
  254. * EI=YES WRITE DUMPED FILES AT EOI ON THE TAPE.
  255. * SAME AS UNEQUIVALENCED *EI*.
  256. *
  257. * EX=EXOP SPECIFIES THE USE OF EXCEPTION PROCESSING
  258. * FOR THE CURRENT *RECLAIM* DIRECTIVE. THE
  259. * ACCEPTABLE VALUES ARE *Y* AND *N*. IF THE
  260. * *EX* OPTION IS OMITTED, *EX=N* IS ASSUMED.
  261. * *EX=N* INDICATES NORMAL PROCESSING, THAT
  262. * ONLY FILES MEETING ALL SELECTION CRITERIA
  263. * ARE PROCESSED. *EX=Y* INDICATES THAT ONLY
  264. * FILES *FAILING* TO MEET ALL THE SELECTION
  265. * CRITERIA ARE TO BE PROCESSED.
  266. * USED WITH THE *COMPACT*, *COPY*, *DELETE*,
  267. * *DUMP*, *LIST*, *LOAD* AND *RESET*
  268. * DIRECTIVES.
  269. *
  270. * F=FORMAT FORMAT OF USER TAPE. USED WHEN REQUESTING
  271. * A DUMP. ACCEPTABLE VALUES ARE:
  272. *
  273. * I - INTERNAL FORMAT (DEFAULT).
  274. * SI - SYSTEM INTERNAL FORMAT (NOS/BE).
  275. * F - FOREIGN FORMAT.
  276. * S - STRANGER FORMAT.
  277. * L - LONG BLOCK STRANGER FORMAT.
  278. * LI - LONG BLOCK INTERNAL FORMAT.
  279. *
  280. * FI=NN FILE POSITION ON TAPE. IF OMITTED THIS
  281. * WILL NOT BE A PROCESSING CRITERION.
  282. *
  283. * FN=FILENAME SAME AS THE *PF* OPTION EXCEPT THAT WHEN
  284. * USED WITH THE *DUMP* DIRECTIVE, *RECLAIM*
  285. * FIRST CHECKS TO SEE IF THE FILE IS LOCAL,
  286. * AND IF SO DUMPS THE LOCAL FILE.
  287. * THE *TY* OPTION CAN BE USED WITH THE *FN*
  288. * OPTION TO SPECIFY WHETHER THE NAMED LOCAL
  289. * FILES ARE TO BE DUMPED AS IF THEY WERE
  290. * DIRECT OR INDIRECT ACCESS PERMANENT FILES.
  291. * THE DEFAULT IS DIRECT ACCESS.
  292. * USED WITH THE *COMPACT*, *COPY*, *DELETE*,
  293. * *DUMP*, *LIST*, *LOAD* AND *RESET*
  294. * DIRECTIVES. FOR ALL EXCEPT THE *DUMP*
  295. * DIRECTIVE, THE *FN* AND *PF* OPTIONS ARE
  296. * INTERCHANGEABLE. IF BOTH THE *FN* AND THE
  297. * *PF* OPTIONS ARE OMITTED, THE FILES TO BE
  298. * PROCESSED ARE DETERMINED BY OTHER OPTIONS.
  299. *
  300. * FT THE DUMP TAPE BEING REQUESTED IS *FOREIGN*
  301. * IN THAT IT IS NOT KNOWN TO THE NOS TAPE
  302. * MANAGEMENT SUBSYSTEM (TMS). *FT* CAN BE
  303. * USED ONLY WHEN *TMS* IS ACTIVE. USED WITH
  304. * THE *COMPACT*, *COPY*, *DUMP*, *LIST* AND
  305. * *LOAD* DIRECTIVES.
  306. *
  307. * GT=NNNN PROCESS ONLY FILES WITH LENGTH GREATER
  308. * THAN *NNNN* PRUS.
  309. *
  310. * LT=NNNN PROCESS ONLY FILES WITH LENGTH LESS
  311. * THAN *NNNN* PRUS.
  312. *
  313. * LV PROCESS LATEST VERSION OF THE FILE (MOST
  314. * RECENT DUMP DATE). DEFAULT IS THE LATEST
  315. * VERSION FOR THE *LOAD* DIRECTIVE.
  316. *
  317. * MA=YYMMDD PROCESS ONLY FILES MODIFIED AFTER YYMMDD.
  318. *
  319. * MB=YYMMDD PROCESS ONLY FILES MODIFED BEFORE YYMMDD.
  320. *
  321. * MD=YYMMDD PROCESS ONLY FILES MODIFED ON YYMMDD.
  322. *
  323. * MT SPECIFIES THE USE OF A 7-TRACK TAPE. THIS
  324. * IS AN OBSOLETE FORM AND SHOULD NO LONGER
  325. * BE USED. *DT=MT* SHOULD BE USED INSTEAD.
  326. * USED ONLY WITH THE *DUMP* DIRECTIVE.
  327. *
  328. * NA NO ABORT OPTION. DO NOT ABORT IF ANY OF
  329. * THE FILES SPECIFIED WITH THIS DIRECTIVE
  330. * ARE NOT FOUND. NOTE THAT ANY ERROR OTHER
  331. * THAN A *FILE NOT FOUND* WILL STILL CAUSE
  332. * *RECLAIM* TO ABORT UNLESS THE *NA* COMMAND
  333. * PARAMETER IS ALSO SPECIFIED.
  334. *
  335. * NF=NNN NUMBER OF FILES (VERSIONS) TO PROCESS.
  336. * THE *LIST* OPTION ASSUMES AN UNLIMITED
  337. * NUMBER OF FILES. ALL OTHER OPTIONS
  338. * DEFAULT TO NF=1.
  339. *
  340. * NN=PFN SPECIFIES THE NEW NAME OF A FILE PROCESSED
  341. * BY *DUMP*, *LOAD* AND *COPY* DIRECTIVES.
  342. * ALLOWS MULTIPLE LOADS OF THE SAME FILE AND
  343. * DUMPING, LOADING OR COPYING TO A DIFFERENT
  344. * FILE NAME.
  345. *
  346. * NT SPECIFIES THE USE OF A 9-TRACK TAPE. THIS
  347. * IS AN OBSOLETE FORM AND SHOULD NO LONGER
  348. * BE USED. *DT=NT* SHOULD BE USED INSTEAD.
  349. * USED ONLY WITH THE *DUMP* DIRECTIVE.
  350. *
  351. * OV OVERWRITE OLD DUMP TAPE WITH COMPRESSED
  352. * DUMP. USED WITH *COMPACT* DIRECTIVE.
  353. *
  354. * PO=X FORCES SPECIFIED STANDARD NOS PROCESSING
  355. * OPTION X FOR TAPE REQUEST. OPTIONS *I*,
  356. * *P* AND *S* ARE NOT ACCEPTED BY *RECLAIM*.
  357. *
  358. * PF=PFN SPECIFIES PERMANENT FILE NAME PFN TO BE
  359. * PROCESSED BY *RECLAIM*. IF OMITTED ALL
  360. * FILES MEETING THE OTHER SELECTION CRITERIA
  361. * ARE PROCESSED.
  362. *
  363. * PF=* INDICATES A LIST OF PERMANENT FILE NAMES
  364. * TO BE SPECIFIED BY THE USER WILL FOLLOW.
  365. * UP TO 999 FILE NAMES MAY BE ENTERED.
  366. * *RECLAIM* PROMPTS INTERACTIVE USERS FOR
  367. * THE LIST OF FILE NAMES. BATCH JOBS
  368. * SPECIFY THE NAMES AS THE FOLLOWING LINE(S)
  369. * ON THE *INPUT* FILE. NAMES MAY BE OF THE
  370. * FORM *PFN1,PFN2,PFN3...* OR OF THE FORM
  371. * *NEW1=PFN1,PFN2,NEW3=PFN3...*, WHERE
  372. * *NEW* IS THE NEW NAME TO BE APPLIED TO THE
  373. * FILE ON THE LOAD OR DUMP (SEE *NN* ABOVE).
  374. *
  375. * PW=PASSWORD INDICATES THE *TMS* PASSWORD REQUIRED TO
  376. * ACCESS THE REQUESTED DUMP TAPE. USED ONLY
  377. * WHEN *TMS* IS ACTIVE IN THE NOS SYSTEM AND
  378. * THE *FT* OPTION IS NOT SELECTED. CAN BE
  379. * USED WITH THE *COMPACT*, *COPY*, *DUMP*,
  380. * *LIST* AND *LOAD* DIRECTIVES.
  381. *
  382. * RC=NNNN RECORD NUMBER ON TAPE. USED IN
  383. * CONJUNCTION WITH *FI*. IF OMITTED IT IS
  384. * NOT USED AS A CRITERION FOR PROCESSING.
  385. *
  386. * RP=RPOP SPECIFIES WHETHER AND HOW A FILE IS TO BE
  387. * LOADED/COPIED FROM A DUMP FILE IF A LOCAL
  388. * OR PERMANENT FILE BY THE SAME NAME ALREADY
  389. * EXISTS. ACCEPTABLE VALUES FOR *RPOP* ARE
  390. * *Y*, *N* AND *C*. *RP* SPECIFIED ALONE IS
  391. * THE SAME AS IF *RP=Y* HAD BEEN SPECIFIED.
  392. * WHEN USED WITH THE *COPY* DIRECTIVE, *RP*
  393. * OR *RP=Y* SPECIFIES THAT A LOCAL FILE OF
  394. * THE SAME NAME AS THE FILE BEING COPIED
  395. * WILL BE REWOUND BEFORE BEING OVERWRITTEN,
  396. * WHILE *RP=C* MEANS THAT THE COPY WILL BE
  397. * DONE AT THE CURRENT LOCATION. IF *RP* IS
  398. * OMITTED OR *RP=N* IS SPECIFIED, A LOCAL
  399. * FILE WITH THE SAME NAME WILL BE RETURNED
  400. * PRIOR TO COPYING FROM THE DUMP FILE.
  401. * USED WITH *COPY* AND *LOAD* DIRECTIVES.
  402. *
  403. * RS=FILERES SPECIFIES THE ACCEPTABLE RESIDENCE(S) FOR
  404. * FILES TO BE DUMPED. *FILERES* VALUES ARE
  405. * *C* FOR CARTRIDGE, *D* FOR DISK AND *T*
  406. * FOR TAPE. MORE THAN ONE RESIDENCE CAN BE
  407. * SPECIFIED BY CONCATENATING THE LETTERS
  408. * FOR THE DESIRED RESIDENCES. FOR EXAMPLE,
  409. * *RS=CD* WOULD SELECT THOSE FILES RESIDENT
  410. * ON EITHER DISK OR CARTRIDGE. IF OMITTED
  411. * OR SPECIFIED WITHOUT A VALUE, ANY FILE
  412. * RESIDENCE IS CONSIDERED ACCEPTABLE.
  413. * USED ONLY WITH THE *DUMP* DIRECTIVE.
  414. *
  415. * TN=VSN PROCESSES ONLY FILES FROM THE SPECIFIED
  416. * TAPE NUMBER. FOR THE *COPY*, *LIST* AND
  417. * *LOAD* DIRECTIVES, IF THE TAPE IS NOT IN
  418. * THE USER DATABASE *RECLAIM* WILL REQUEST
  419. * THE TAPE AND TRY TO ADD APPROPRIATE
  420. * INFORMATION TO THE DATBASE, BASED ON THE
  421. * FILES PREVIOUSLY DUMPED TO THIS TAPE.
  422. * THIS ALLOWS THE USER TO RECOVER AT LEAST
  423. * SOME PORTIONS OF THE DATABASE IF IT IS
  424. * DESTROYED OR PURGED.
  425. *
  426. * TO=USERNAME INDICATES THE USERNAME OF THE OWNER OF THE
  427. * DUMP TAPE BEING REQUESTED. USED ONLY WHEN
  428. * *TMS* IS ACTIVE IN THE NOS SYSTEM AND THE
  429. * *FT* OPTION IS NOT SELECTED. CAN BE USED
  430. * WITH THE *COMPACT*, *COPY*, *DUMP*, *LIST*
  431. * AND *LOAD* DIRECTIVES.
  432. *
  433. * TY=T FILE TYPE(S) TO BE PROCESSED. *D* OR *I*.
  434. * DEFAULT IS BOTH FILE TYPES.
  435. *
  436. * UN=USERNAM PROCESS ONLY FILES FOR SPECIFIED USER
  437. * NAME. THIS OPTION IS USED WHEN DUMPED
  438. * FILES ARE SHARED AMONG TWO OR MORE
  439. * USER NAMES. WHEN OMITTED, PROCESSING IS
  440. * PERFORMED ON THE DUMPED FILES FOR THE
  441. * CALLING USER. *UN* VALUE OF *0* INDICATES
  442. * ALL USER NAMES TO BE PROCESSED (E.G., BY
  443. * THE *LIST* DIRECTIVE).
  444. TITLE *RECLAIM* DIRECTIVES.
  445. SPACE 4,20
  446. *** *RECLAIM* DIRECTIVES.
  447. *
  448. *
  449. * *RECLAIM* IS A GENERAL PURPOSE PERMANENT FILE RETRIEVAL
  450. * SYSTEM WHICH ALLOWS VARIOUS TYPES OF FILE MANIPULATION
  451. * AND INTERROGATION BY EMPLOYING ONE OR MORE OF THE
  452. * FOLLOWING DIRECTIVES (*?* IS A TERMINAL INPUT PROMPT)--
  453. *
  454. *
  455. *
  456. * COMPACT.
  457. *
  458. * THE *COMPACT* DIRECTIVE ALLOWS THE USER TO PERMANENTLY
  459. * REMOVE UNWANTED FILES FROM A GIVEN DUMP TAPE. FIRST
  460. * THE USER LOGICALLY TURNS OFF THE UNNEEDED FILES WITH THE
  461. * *DELETE* DIRECTIVE. THEN THE USER ISSUES A *COMPACT*
  462. * TO PHYSICALLY REMOVE THE FILES FROM THE DUMP TAPE. THE USER
  463. * HAS THE OPTION OF WRITING THE SHORTENED DUMP OVER THE OLD
  464. * TAPE OR CREATING A NEW TAPE.
  465. *
  466. * RECLAIM.
  467. * ? DELETE,TN=123456,FI=1,NF=999999.
  468. * ? COMPACT,TN=123456,OV.
  469. *
  470. * WILL DELETE ALL THE DUMPED FILES ON THE FIRST FILE OF TAPE
  471. * *123456*, AND THEN REMOVE THEM FROM THE TAPE. WRITES THE
  472. * DUMP OVER THE OLD TAPE. IF OTHER FILE SELECTION CRITERIA
  473. * ARE SPECIFIED (E.G., *LV*, *DD*, ETC.), ONLY FILES SATISFYING
  474. * THOSE CRITERIA WILL BE RETAINED--ALL DELETED FILES AND FILES
  475. * NOT FULFILLING THE SELECTION CRITERIA WILL BE REMOVED. IF
  476. * NO FILES MEET THE CRITERIA, NO ACTION WILL OCCUR (*COMPACT*
  477. * OF A VSN CONTAINING ONLY DELETED FILES WILL DO NOTHING).
  478. *
  479. *
  480. *
  481. * COPY.
  482. *
  483. * THIS OPTION ALLOWS USERS TO COPY ONE OR MORE OF THEIR FILES
  484. * DIRECTLY FROM TAPE TO A LOCAL FILE. THE COPIED FILES ARE
  485. * LOADED TO THE SAME LOGICAL FILE NAMES AS THEIR ORIGINAL
  486. * PERMANENT FILE NAMES.
  487. *
  488. * RECLAIM(Z)/COPY,LV,NF=7,DD=YYMMDD.
  489. *
  490. * COPIES TO LOCAL FILES 7 FILES THAT WERE DUMPED ON *YYMMDD*.
  491. *
  492. *
  493. *
  494. * DELETE.
  495. *
  496. * DISABLES ALL FILES MEETING THE SPECIFIED CRITERIA. THIS
  497. * PERMITS A USER TO LOAD ALL FILES ON A TAPE EXCEPT THOSE THAT
  498. * HAVE BEEN DISABLED. DELETED FILES ARE NOT PHYSICALLY REMOVED
  499. * FROM THE TAPE AND CAN BE RESTORED USING *RESET*.
  500. *
  501. * RECLAIM.
  502. * ? DELETE,PF=C,DB=YYMMDD,NF=100.
  503. *
  504. * DELETES REPORTING OF UP TO 100 FILES CALLED *C* THAT WERE
  505. * DUMPED BEFORE *YYMMDD*.
  506. *
  507. *
  508. *
  509. * DUMP.
  510. *
  511. * DUMPS TO TAPE ALL FILES MEETING THE SPECIFIED CRITERIA.
  512. * FILES ARE DUMPED IN *PFDUMP* FORMAT AND ARE READABLE BY
  513. * *RECLAIM* AND *PFLOAD*. THE DATABASE FILE WILL CONTAIN
  514. * INFORMATION REQUIRED BY *RECLAIM* TO RELOAD THE FILE IN THE
  515. * FUTURE. IF THE SPECIFIED DATABASE FILE DOES NOT CURRENTLY
  516. * EXIST, *RECLAIM* WILL TRY TO CREATE IT. UNLESS *EI=NO* IS
  517. * SPECIFIED, THE DUMPED FILES WILL BE WRITTEN ON THE TAPE
  518. * FOLLOWING THE END OF INFORMATION.
  519. *
  520. * RECLAIM(Z)/DUMP,TY=D,TN=001442
  521. *
  522. * WILL DUMP ALL DIRECT ACCESS PERMANENT FILES TO MAGNETIC TAPE
  523. * WITH VSN *001442*.
  524. *
  525. *
  526. *
  527. * END.
  528. *
  529. * ENDS THE CURRENT *RECLAIM* SESSION. *END* IS NOT REQUIRED
  530. * IF THE *Z* PARAMETER IS USED ON THE *RECLAIM* COMMAND.
  531. * ON AN INTERACTIVE TERMINAL A CARRIAGE RETURN IS EQUIVALENT
  532. * TO *END*.
  533. *
  534. *
  535. *
  536. * LIST.
  537. *
  538. * THE *LIST* DIRECTIVE ENABLES USERS TO RETRIEVE INFORMATION
  539. * ON ALL OF THE PERMANENT FILES THAT HAVE BEEN ENTERED INTO
  540. * THE DATABASE DEPENDING ON USER SPECIFIED CRITERIA. FILES ARE
  541. * LISTED IN ALPHABETICAL ORDER.
  542. *
  543. * RECLAIM(Z)/LIST,MA=YYMMDD,TY=D.
  544. *
  545. * LISTS ALL DIRECT ACCESS FILES WHICH HAVE BEEN MODIFIED
  546. * AFTER *YYMMDD*.
  547. *
  548. *
  549. *
  550. * LOAD.
  551. *
  552. * LOADS TAPE FILES INTO THE PERMANENT FILE CATALOG BASED ON
  553. * THE SPECIFIED CRITERIA. THE MOST RECENTLY MODIFIED VERSION
  554. * OF A FILE IS LOADED UNLESS OTHER CHARACTERISTICS ARE
  555. * INDICATED. IF A FILE NAME SPECIFIED IN A *LOAD* DIRECTIVE
  556. * (OR THE NEW NAME SPECIFIED BY THE *NN* OPTION) ALREADY
  557. * EXISTS IN THE CATALOG THE FILE WILL NOT BE LOADED.
  558. *
  559. * RECLAIM(Z)/LOAD,PF=A,DD=YYMMDD./LOAD,PF=B,LV.
  560. *
  561. * LOAD FILE WITH THE PERMANENT FILE NAME OF *A* WHICH HAS A
  562. * DUMP DATE OF *YYMMDD* PLUS THE LATEST VERSION OF *B*.
  563. *
  564. *
  565. *
  566. * REMOVE.
  567. *
  568. * PERMANENTLY REMOVES A TAPE VSN FROM THE DATABASE. ALL FILES
  569. * FOR THAT TAPE NUMBER WILL BE PURGED.
  570. *
  571. * RECLAIM.
  572. * ? REMOVE,TN=001234.
  573. *
  574. * ALL ENTRIES IN THE USER DATABASE ON THE CURRENT USER NAME
  575. * FOR THE TAPE *001234* WILL BE DELETED.
  576. *
  577. *
  578. *
  579. * RESET.
  580. *
  581. * THE RESET OPTION ENABLES UNDELETING DELETED FILES. FILES
  582. * MEETING THE SPECIFIED CRITERIA WHICH WERE PREVIOUSLY DISABLED
  583. * BY *DELETE* WILL BE RESTORED.
  584. *
  585. * RECLAIM.
  586. * ? RESET,NF=777
  587. *
  588. * UNDELETE UP TO 777 FILES WHICH HAVE BEEN PREVIOUSLY DELETED.
  589. *
  590. *
  591. *
  592. * SET.
  593. *
  594. * ALLOWS SPECIFICATION OF NEW DEFAULT DIRECTIVE OPTIONS.
  595. * A *SET* DIRECTIVE WITH NO OPTIONS HAS NO EFFECT.
  596. *
  597. * RECLAIM.
  598. * ? SET,LV,TY=D,MB=YYMMDD.
  599. *
  600. * DURING THE REMAINDER OF THIS SESSION (OR UNTIL AN OVERRIDING
  601. * *SET* IS ENTERED) THE USER IS ONLY INTERESTED IN THE LATEST
  602. * VERSION OF DIRECT ACCESS FILES THAT WERE LAST MODIFIED
  603. * BEFORE *YYMMDD*.
  604. *
  605. *
  606. *
  607. * UPDATE.
  608. *
  609. * THIS OPTION IS USED TO UPDATE THE *RECLAIM* DATABASE. IT
  610. * REQUIRES THE *UPDATES* FILE AND THE *NUMBERS* FILE AS INPUT.
  611. *
  612. * RECLAIM(Z)/UPDATE.
  613. TITLE DAYFILE MESSAGES.
  614. SPACE 4,20
  615. *** DAYFILE MESSAGES.
  616. *
  617. *
  618. * * ADDING FILE FFFFFFF TO DATABASE.* - FILE NAMED FFFFFFF
  619. * IS BEING READ AND *RECLAIM* IS ADDING INFORMATION FOR
  620. * THIS FILE TO THE USER DATABASE.
  621. *
  622. * * ADDING TAPE VVVVVV TO DATABASE.* - TAPE WITH VSN VVVVVV
  623. * IS BEING READ AND *RECLAIM* IS ADDING INFORMATION FOR
  624. * THIS TAPE TO THE USER DATABASE.
  625. *
  626. * * CANNOT ATTACH/GET FILE - FILE SKIPPED.* - WHILE TRYING TO
  627. * DUMP A PERMANENT FILE, *RECLAIM* DETECTED A *PFM*
  628. * ERROR WHEN PERFORMING A *GET* OR *ATTACH* FUNCTION.
  629. *
  630. * * CONTACT CUSTOMER SERVICES -- DB ERROR.* - A SERIOUS SITE
  631. * DATABASE ERROR HAS OCCURRED.
  632. *
  633. * * CONTACT CUSTOMER SERVICES -- DB MISSING.* - A SERIOUS SITE
  634. * DATABASE ERROR HAS OCCURRED.
  635. *
  636. * * CT, CN OR OV KEYWORD NOT PRESENT.* - WHILE PROCESSING A
  637. * *COMPACT* DIRECTIVE, *RECLAIM* FOUND THAT NONE OF THE
  638. * *CT=VSN*, *CN=LFN* OR *OV* KEYWORDS WERE SPECIFIED IN
  639. * THE OPTIONS. ONE OF THESE OPTIONS IS REQUIRED.
  640. *
  641. * * DATABASE CORRUPTED.* - AN ERROR WAS ENCOUNTERED WHILE
  642. * READING THE DATABASE. THIS USUALLY MEANS THE DATABASE
  643. * IS EMPTY OR HAS BEEN OVERWRITTEN WITH SOMETHING
  644. * UNIDENTIFIABLE TO *RECLAIM*.
  645. *
  646. * * DATABASE NOT FOUND -- DEFINING NEW ONE.* - *RECLAIM*
  647. * DETECTED THAT THERE WAS NO DATABASE IN THE USER
  648. * CATALOG, SO IT TRIES TO CREATE A NEW ONE.
  649. *
  650. * * DIRECTIVE ARGUMENT ERROR.* - *RECLAIM* DETECTED A
  651. * SYNTAX ERROR IN AN INPUT DIRECTIVE.
  652. *
  653. * * DUMP DENIED FOR SPECIFIED DATABASE.* - USER REQUESTED
  654. * ACCESS TO THE SITE DATABASE BUT WAS NOT PRIVILEGED.
  655. *
  656. * * DUMP FILE CONTAINS 63 DUMPS. FILE IS FULL.* - *RECLAIM*
  657. * DETECTED THAT THE DUMP FILE IT WAS DIRECTED TO USE
  658. * ALREADY CONTAINS THE MAXIMUM NUMBER OF DUMPS.
  659. *
  660. * * DUMP FILE MALFUNCTION - EOI ENCOUNTERED.* - THE END OF
  661. * INFORMATION WAS ENCOUNTERED BEFORE THE PROPER DUMP
  662. * FILE OR RECORD WAS FOUND. THE DUMP FILE MAY HAVE
  663. * BEEN OVERWRITTEN OR IMPROPERLY COPIED.
  664. *
  665. * * DUMP FILE MALFUNCTION - FILE NAME MISMATCH.* - THE FILE TO
  666. * BE PROCESSED IS NOT THE ONE FOUND AT THE POSITION ON
  667. * THE DUMP FILE INDICATED BY THE DATABASE. THE DUMP
  668. * FILE MAY HAVE BEEN OVERWRITTEN OR IMPROPERLY COPIED.
  669. *
  670. * * DUMP FILE MALFUNCTION - FILE TRUNCATED.* - THE FILE BEING
  671. * PROCESSED WAS INCOMPLETE ON THE DUMP FILE. THE DUMP
  672. * FILE MAY HAVE BEEN OVERWRITTEN OR IMPROPERLY COPIED.
  673. *
  674. * * DUMP FILE MALFUNCTION - POSITION LOST.* - THE DUMP FILE
  675. * POSITION DOES NOT AGREE WITH INTERNAL INDICATORS OR
  676. * POSITION INFORMATION FROM THE DATABASE.
  677. *
  678. * * DUMP FILE MALFUNCTION - UNRECOGNIZABLE PFC.* - WHAT SHOULD
  679. * BE THE PFC RECORD FOR THE FILE BEING PROCESSED IS NOT
  680. * A PFC RECORD. THE DUMP FILE MAY HAVE BEEN OVERWRITTEN
  681. * OR IMPROPERLY COPIED.
  682. *
  683. * * DUMP FILE MUST BE IN WRITE MODE.* - A *DUMP* OR *COMPACT*
  684. * WAS ATTEMPTED USING A MASS STORAGE DUMP FILE WHICH WAS
  685. * ATTACHED IN SOME MODE OTHER THAN WRITE MODE.
  686. *
  687. * * DUMP FILE NOT FOUND.* - A *LOAD* OR *COPY* WAS ATTEMPTED,
  688. * BUT THE MASS STORAGE DUMP FILE WHICH WAS INDICATED BY
  689. * THE DATABASE COULD NOT BE FOUND. THE FILE MAY HAVE
  690. * BEEN PURGED OR MAY NEVER HAVE BEEN MADE PERMANENT.
  691. *
  692. * * ERROR IN ATTACHING USER DATABASE.* - *RECLAIM* DETECTED A
  693. * *PFM* ERROR WHEN ATTEMPTING TO ATTACH THE
  694. * USER DATABASE.
  695. *
  696. * * ERROR IN FILE NAME LIST.* - A SYNTAX ERROR WAS FOUND IN
  697. * THE LIST OF FILE NAMES ENTERED IN RESPONSE TO USING
  698. * THE (PF=*) OPTION.
  699. *
  700. * * FILE NOT FOUND OR FAILED CRITERIA - FFFFFFF.* - *RECLAIM*
  701. * DID NOT PROCESS FILE *FFFFFFF* BECAUSE IT COULD NOT
  702. * BE FOUND ON THE DUMP FILE(*LOAD* OR *COPY*), NO LOCAL
  703. * OR PERMANENT FILE BY THAT NAME COULD BE FOUND(*DUMP*),
  704. * OR THE FILE WAS FOUND, BUT FAILED THE OTHER CRITERIA.
  705. *
  706. * * INCORRECT ARGUMENT VALUE.* - A DIRECTIVE KEYWORD WAS
  707. * EQUATED TO AN INVALID VALUE. THIS COULD BE A NAME
  708. * LONGER THAN SEVEN CHARACTERS, AN ALPHABETIC STRING
  709. * WHEN A NUMBER IS EXPECTED, ETC.
  710. *
  711. * * INCORRECT TAPE DENSITY.* - AN INVALID NOS TAPE DENSITY WAS
  712. * REQUESTED FOR THE *DUMP* DIRECTIVE.
  713. *
  714. * * INCORRECT TAPE FORMAT.* - AN INVALID NOS TAPE FORMAT WAS
  715. * REQUESTED FOR THE *DUMP* DIRECTIVE.
  716. *
  717. * * NO DATA FOUND FOR USER NAME.* - *RECLAIM* COULD NOT FIND
  718. * THE CALLING USER IN THE DIRECTORY OF THE DATABASE.
  719. *
  720. * * NO FILES FOUND FOR SPECIFIED DUMP FILE.* - FOR A *COPY*,
  721. * *LOAD* OR *LIST* DIRECTIVE, NO ENTRIES WERE FOUND IN
  722. * THE DATABASE FOR THE DUMP FILE SPECIFIED. *RECLAIM*
  723. * MAY TRY TO READ THE DUMP FILE AND ENTER IT INTO THE
  724. * DATABASE.
  725. *
  726. * * NO FILES SELECTED - NO ACTION TAKEN.* - *COMPACT* FOUND
  727. * NO FILES TO RETAIN AND SO NO ACTION OCCURRED.
  728. *
  729. * * NO VALID DUMP FOUND ON DUMP FILE.* - FOR A *COPY*, *LOAD*
  730. * OR *LIST* OPERATION, *RECLAIM* DETERMINED THAT THE
  731. * SPECIFIED DUMP FILE WAS NOT A *RECLAIM* DUMP FILE.
  732. * THE DIRECTIVE BEING PROCESSED WILL BE IGNORED.
  733. *
  734. * * RECLAIM ABORTED.* - *RECLAIM* HAS DETECTED AN ERROR OR
  735. * THE USER HAS INITIATED AN ABORT.
  736. *
  737. * * RECLAIM ARGUMENT ERROR.* - AN INCORRECT ARGUMENT WAS
  738. * DETECTED ON THE *RECLAIM* COMMAND LINE.
  739. *
  740. * * RECLAIM COMPLETE.* - NORMAL COMPLETION.
  741. *
  742. * * REMOVE DENIED FOR SPECIFIED DATABASE.* - NON-PRIVILEGED
  743. * USER ATTEMPTED TO USE *REMOVE* WITH SITE DATABASE.
  744. *
  745. * * REQUESTING DUMP FILE.* - *RECLAIM* IS REQUESTING THE DUMP
  746. * FILE SPECIFIED BY *TN* OR *DN*, AND WILL ATTEMPT TO
  747. * REBUILD THE DATABASE ENTRIES FOR THIS DUMP FILE.
  748. *
  749. * * SEE DAYFILE - UNABLE TO COMPACT XXXXXXX.* - *RECLAIM*
  750. * CANNOT COMPACT FILE *XXXXXXX* DUE TO A TAPE, DATABASE
  751. * OR OTHER ERROR, AS INDICATED IN THE DAYFILE.
  752. *
  753. * * SEE DAYFILE - UNABLE TO LOAD XXXXXXX.* - *RECLAIM* CANNOT
  754. * LOAD FILE *XXXXXXX*. THE FILE IS ALREADY PERMANENT,
  755. * OR A TAPE, DATABASE OR OTHER ERROR HAS OCCURRED, AS
  756. * INDICATED IN THE DAYFILE.
  757. *
  758. * * TAPE DENSITY/DEVICE/FORMAT MISMATCH.* - AN OPERATION OTHER
  759. * THAN A *DUMP* OR *COMPACT* AT *BOI* WAS ATTEMPTED ON
  760. * AN EXISTING *RECLAIM* DUMP TAPE, BUT THE SPECIFIED
  761. * DENSITY, DEVICE TYPE OR TAPE FORMAT DID NOT MATCH THE
  762. * EXISTING DENSITY, DEVICE TYPE OR TAPE FORMAT.
  763. *
  764. * * TAPE NUMBER FILE EMPTY.* - *UPDATE* HAS BEEN ATTEMPTED
  765. * WITHOUT THE *NUMBERS* FILE.
  766. *
  767. * * TN OR DN MUST BE SPECIFIED.* - A *RECLAIM* OPERATION WAS
  768. * ATTEMPTED WHICH REQUIRED A DUMP FILE NAME OR TAPE
  769. * NUMBER, BUT NEITHER WAS SPECIFIED.
  770. *
  771. * * TOO MANY FILE NAMES IN LIST.* - WHEN READING THE LIST OF
  772. * FILE NAMES SPECIFIED AFTER USING (PF=*), *RECLAIM*
  773. * DETECTED THAT THE NUMBER OF FILE NAMES EXCEEDED THE
  774. * MAXIMUM NUMBER THAT *RECLAIM* CAN HANDLE. WHEN THIS
  775. * HAPPENS *RECLAIM* WILL IGNORE THE DIRECTIVE WHICH HAD
  776. * THE (PF=*).
  777. *
  778. * * UNKNOWN DUMP FILE WILL BE OVERWRITTEN.* - WHEN PREPARING TO
  779. * DO AN INCREMENTAL DUMP (THAT IS, THE TAPE IS TO BE
  780. * WRITTEN AT THE EOI), *RECLAIM* DETECTED THAT THE DUMP
  781. * FILE SPECIFIED DID NOT HAVE VALID DUMP INFORMATION
  782. * ON IT. THIS WOULD HAPPEN IF THE DUMP FILE WAS EMPTY,
  783. * OR HAD BEEN USED FOR SOMETHING BESIDES FILE DUMPS.
  784. * IF THE USER IS EXECUTING INTERACTIVELY, *RECLAIM* WILL
  785. * ALSO ISSUE A PROMPT, * IS THIS OK (YES OR NO)?*, AND
  786. * WILL ASK THE USER FOR A RESPONSE. THUS THE USER HAS A
  787. * CHANCE TO PREVENT *RECLAIM* FROM OVERWRITING THE FILE.
  788. *
  789. * * USER DATABASE MISSING.* - THE USER DATABASE FILE WAS
  790. * NOT FOUND.
  791. *
  792. * * WAITING FOR DATABASE NON-BUSY.* - WHILE TRYING TO ATTACH
  793. * THE DATABASE, *RECLAIM* DETECTED THAT THE DATABASE
  794. * WAS BUSY (I.E. ATTACHED BY SOME OTHER USER IN A
  795. * CONFLICTING MODE, SUCH AS WRITE MODE). WHEN THIS
  796. * HAPPENS *RECLAIM* WILL ROLL OUT FOR TEN SECONDS AND
  797. * THEN TRY AGAIN TO ATTACH THE DATABASE. *RECLAIM*
  798. * WILL CONTINUE THIS UNTIL IT CAN ATTACH THE DATABASE
  799. * SUCCESSFULLY OR THE USER INTERRUPTS *RECLAIM*.
  800. *
  801. *
  802. *
  803. * ERROR EXIT MESSAGES - ISSUED WHEN A SEVERE SYSTEM ERROR
  804. * IS DETECTED, FROM WHICH *RECLAIM* CANNOT RECOVER AND
  805. * PROCEED WITH WHAT IT WAS DOING. SUCH ERRORS WOULD BE
  806. * OPERATOR DROP, SRU LIMIT, UNRECOVERED TAPE ERRORS, ETC.
  807. *
  808. * * CPU ERROR EXIT. *
  809. * * ARITHMETIC ERROR. *
  810. * * ILLEGAL INSTRUCTION. *
  811. * * PP ABORT. *
  812. * * CPU ABORT. *
  813. * * PP CALL ERROR. *
  814. * * TIME LIMIT. *
  815. * * TOO MANY LOCAL FILES. *
  816. * * TRACK LIMIT. *
  817. * * ACCOUNT BLOCK SRU LIMIT. *
  818. * * FORCED ERROR. *
  819. * * OPERATOR DROP. *
  820. * * OPERATOR RERUN. *
  821. * * OPERATOR KILL. *
  822. * * SUBSYSTEM ABORT. *
  823. * * EXTENDED MEMORY PARITY ERROR. *
  824. * * CPU PARITY ERROR. *
  825. * * TERMINAL USER HUNG UP. *
  826. * * SYSTEM ABORT. *
  827. * * OPERATOR OVERRIDE. *
  828. * * JOB STEP SRU LIMIT. *
  829. TITLE COMMON DECKS.
  830. SPACE 4,10
  831. ** COMMON DECKS.
  832.  
  833.  
  834. *CALL COMCCMD
  835. *CALL COMCMAC
  836. QUAL MTX
  837. *CALL COMSMTX
  838. QUAL *
  839. *CALL COMSPFM
  840. *CALL COMSPFS
  841. *CALL COMSRPV
  842. *CALL COMSSFM
  843. QUAL TFM
  844. *CALL COMSTFM
  845. QUAL *
  846. TITLE ASSEMBLY CONSTANTS.
  847. SPACE 4,10
  848. **** ASSEMBLY CONSTANTS.
  849.  
  850.  
  851. VER MICRO 1,,*5.0* CURRENT VERSION OF *RECLAIM*
  852.  
  853. CFBUFL EQU 1001B MERGESORT BUFFER LENGTH
  854. DIRBUFL EQU 1001B *NUMBERS*, MERGESORT BUFFER LENGTH
  855. IBUFL EQU 201B INPUT BUFFER LENGTH
  856. NEWBUFL EQU 3001B DATABASE OUT BUFFER LENGTH
  857. OBUFL EQU 201B OUTPUT BUFFER LENGTH
  858. OLDBUFL EQU 1001B DATA BASE IN BUFFER LENGTH
  859. RLDBUFL EQU 1001B *OPLDF* BUFFER LENGTH
  860. TFBUFL EQU 30061B PRIMARY DUMP FILE BUFFER LENGTH
  861. TNBUFL EQU 1001B *UPDATES* BUFFER LENGTH
  862. WSAL EQU 1000B WORKING STORAGE BUFFER LENGTH
  863.  
  864. AFBUFL EQU DIRBUFL FIRST MERGESORT SCRATCH BUFFER LENGTH
  865. BFBUFL EQU TNBUFL SECOND MERGESORT SCRATCH BUFFER LENGTH
  866. MFBUFL EQU TFBUFL *COMPACT* DUMP FILE BUFFER LENGTH
  867. SFBUFL EQU NEWBUFL LENGTH OF SCRATCH BUFFER FOR LOAD/COPY
  868.  
  869. CATBUFL EQU NWCE+1 CATLIST BUFFER LENGTH
  870. * *PRMITBWC MUST BE A MULTIPLE OF TWO AND AT LEAST TWO WORDS
  871. * LESS THAN THE LENGTH OF A DISK PRU.
  872.  
  873. PRMITBWC EQU 62 NUMBER OF PERMIT WORDS IN A FULL BLOCK
  874.  
  875. PRMITBL EQU 1+2+PRMITBWC PERMIT BLOCK LENGTH
  876. TCATBFL EQU NWCE*3 TRUE LENGTH OF CATBUF
  877. CLSBUFL EQU NWCE*100+1 FILE *CATLIST* BUFFER LENGTH
  878.  
  879. DBEL EQU 4 DATA BASE ENTRY LENGTH
  880. DCW EQU 30000B DUMMY TAPE BLOCK CONTROL WORD
  881. ITEMSIZ EQU DBEL+2 SIZE OF ENTRIES HANDLED IN MERGESORT
  882. MFETSIZ EQU 6 FET SIZE FOR MERGESORT FILES
  883. OLENGTH EQU 8 OUTPUT LINE LENGTH
  884. PRUSIZE EQU 100B SIZE OF DISK SECTOR IN WORDS
  885. ROLLFBS EQU 12 MAXIMUM ROLLOUTS BEFORE TAPE UNLOAD
  886. TFETSIZ EQU 16 FET SIZE FOR TAPES
  887. UDBEL EQU 5 UPDATE DATA BASE ENTRY LENGTH
  888. WRITTEN EQU TFETSIZ FET OFFSET FOR WRITTEN FLAG
  889. CRVSN EQU WRITTEN+1 FET OFFSET FOR CURRENT REEL VSN
  890. TFLAGS EQU CRVSN+1 FET OFFSET FOR CHARACTERISTICS FLAGS
  891. INITREQ EQU TFLAGS+1 FET OFFSET FOR INITIAL REQUEST FLAG
  892. TRING EQU INITREQ+1 FET OFFSET FOR WRITE RING FLAG
  893. TMSV EQU TRING+1 FET OFFSET FOR MASS STORAGE FLAG
  894. TTNV EQU TMSV+1 FET OFFSET FOR VSN VARIABLE
  895. TDNV EQU TTNV+1 FET OFFSET FOR NAME VARIABLE
  896. TDFV EQU TDNV+1 FET OFFSET FOR LFN VARIABLE
  897. TFC EQU TDFV+1 FET OFFSET FOR CURRENT FILE COUNT
  898. TRC EQU TFC+1 FET OFFSET FOR CURRENT RECORD COUNT
  899. CFN EQU TRC+1 FET OFFSET FOR CURRENT RMS FILE NAME
  900. TFETVSN EQU 9 FET VSN LOCATION FOR LABEL MACRO
  901.  
  902. PTR EQU MFETSIZ PASCAL-LIKE FILE POINTER RELATIVE LOCATION
  903. EOF EQU PTR+ITEMSIZ END-OF-FILE FLAG RELATIVE LOCATION
  904.  
  905. WRIF$ EQU 0 DEFINE DATA TRANSFER FLAG
  906.  
  907. NDMPWD EQU 777B NUMBER OF WORDS IN DUMP TEXT TABLE
  908. PFTABL EQU 999 MAXIMUM FILE NAMES FOR PF=*
  909. ****
  910. TITLE FILE FORMATS.
  911. SPACE 4,10
  912. * FILE FORMATS.
  913. DATABASE SPACE 4,20
  914. ** DATABASE.
  915. *
  916. * THE DATABASE CONSISTS OF 4-WORD RECORDS, EACH CONTAINING
  917. * DATA FOR ONE DUMPED PERMANENT FILE. THESE 4-WORD ENTRIES
  918. * ARE SORTED BY USER NAME, PERMANENT FILE NAME, LAST
  919. * MODIFICATION DATE AND LAST DUMP DATE. THE DATABASE MAY
  920. * CONTAIN DUMP DATA FOR MORE THAN ONE USER NAME. IF SO, DATA
  921. * FOR EACH USER IS A SEPARATE SYSTEM RECORD, SO THAT A LIST
  922. * OF USERS CAN BE GENERATED VIA *CATALOG* OR *ITEMIZE*. THE
  923. * LAST PART OF THE DATABASE IS AN *OPLD* DIRECTORY, AS USED
  924. * BY *MODIFY*, *LIBEDIT*, AND *GTR*. EACH USER IN THE
  925. * DATABASE HAS AN ENTRY IN THE DIRECTORY, POINTING TO
  926. * ITS RELATIVE OFFSET WITHIN THE DATABASE (RELATIVE PRU
  927. * NUMBER). THE FORMAT OF A 4-WORD DUMP ENTRY IS AS FOLLOWS--
  928. *
  929. *T ID 42/ USER NAME, 18/ UNUSED
  930. *T,ID+1 42/ PERMANENT FILE NAME,18/ DUMP DATE
  931. *T,ID+2 42/ DUMP FILE NAME, 18/ LM DATE
  932. *T,ID+3 1/ DEL,5/ ULEN,6/ FTYP,12/ TFLGS,6/ FNUM,12/ RNUM,18/ LLEN
  933. *
  934. * *LM DATE* - DATE FILE WAS LAST MODIFIED.
  935. *
  936. * *DEL* - DELETE FLAG.
  937. *
  938. * *ULEN* - UPPER 5 BITS OF THE LENGTH OF PF IN PRUS.
  939. *
  940. * *FTYP* - FILE TYPE (DIRECT OR INDIRECT).
  941. *
  942. * *FNUM* - NUMBER OF FILE THAT PF RESIDES ON TAPE.
  943. *
  944. * *RNUM* - EXACT RECORD NUMBER ON FILE OF PF RESIDENCE.
  945. *
  946. * *LLEN* - LOWER 18 BITS OF THE LENGTH OF PF IN PRUS.
  947. *
  948. * *TFLGS* - TAPE REQUEST FLAGS FOR THIS FILE-S DUMP SET.
  949. * 1/ MASS STORAGE DUMP FLAG (BIT 11).
  950. * 1/ LABELED TAPE FLAG (BIT 10).
  951. * 1/ FOREIGN TAPE FLAG (BIT 9).
  952. * 2/ TAPE DEVICE TYPE (BITS 8-7).
  953. * 1/ 0. (BIT 6).
  954. * 3/ TAPE DENSITY (BITS 5-3).
  955. * 3/ TAPE FORMAT (BITS 2-0).
  956. *
  957. *
  958. * NOTE A DATABASE MUST BE SORTED BY THE FOLLOWING KEYS--
  959. *
  960. * 1 - USER NAME.
  961. * 2 - PERMANENT FILE NAME.
  962. * 3 - LM DATE.
  963. * 4 - DUMP DATE.
  964. NUMBERS SPACE 4,10
  965. ** VSN INDEX.
  966. *
  967. * THE VSN INDEX IS A PART OF THE DATABASE. IT OCCUPIES THE
  968. * LAST SYSTEM RECORD BEFORE THE *OPLD* RECORD, AND APPEARS TO
  969. * MANY *RECLAIM* ROUTINES AS JUST ANOTHER USER RECORD. HOWEVER,
  970. * EACH ENTRY IN THE VSN INDEX REPRESENTS A REEL OF A DUMP
  971. * TAPE SET. THE 4-WORD ENTRIES CONTAIN INFORMATION WHICH LETS
  972. * *RECLAIM* DETERMINE WHICH REEL OF A SET IS TO BE MOUNTED TO
  973. * RETRIEVE A PARTICULAR FILE FROM THAT DUMP SET.
  974. *
  975. *T,ID 42/ 7L.VSNDX., 18/0
  976. *T,ID+1 36/ SETVSN, 24/0
  977. *T,ID+2 36/ CURVSN, 24/0
  978. *T,ID+3 12/ 0, 12/ TFLGS, 6/ FNUM, 12/ RNUM, 18/0
  979. *
  980. * *SETVSN* - THIS VSN IDENTIFIES THE DUMP TAPE SET. IT IS
  981. * NORMALLY THE VSN OF THE FIRST REEL OF THE SET.
  982. *
  983. * *CURVSN* - THIS IS THE ACTUAL VSN OF THE REEL REPRESENTED
  984. * BY THE VSN INDEX ENTRY, AS DETERMINED BY A *FILINFO*
  985. * KEY 4 REQUEST AFTER EACH FILE DUMP.
  986. *
  987. * *TFLGS* - TAPE REQUEST FLAGS FOR THIS DUMP SET. *TFLGS*
  988. * IS STORED ONLY IN THE FIRST RECORD OF THE SET.
  989. *
  990. * 1/ MASS STORAGE DUMP FLAG (BIT 11).
  991. * 1/ LABELED TAPE FLAG (BIT 10).
  992. * 1/ FOREIGN TAPE FLAG (BIT 9).
  993. * 2/ TAPE DEVICE TYPE (BITS 8-7).
  994. * 1/ 0. (BIT 6).
  995. * 3/ TAPE DENSITY (BITS 5-3).
  996. * 3/ TAPE FORMAT (BITS 2-0).
  997. *
  998. * *FNUM* - THE FILE NUMBER OF THE DUMP BEING PROCESSED AT
  999. * THE TIME THIS REEL WAS ASSIGNED. ZERO FOR THE FIRST
  1000. * REEL OF A SET.
  1001. *
  1002. * *RNUM* - THE RECORD NUMBER OF THE DUMP BEING PROCESSED AT
  1003. * THE TIME THIS REEL WAS ASSIGNED. ZERO FOR THE FIRST
  1004. * REEL OF A SET.
  1005. *
  1006. *
  1007. *
  1008. * NOTE VSN INDEX RECORDS ARE SORTED AS FOLLOWS--
  1009. *
  1010. * 1 - SET VSN.
  1011. * 2 - FILE NUMBER.
  1012. * 3 - RECORD NUMBER.
  1013. SPACE 4,10
  1014. ** NUMBERS.
  1015. *
  1016. * THE NUMBERS FILE IS USED BY THE *COMPACT*, *DUMP*, *REMOVE*,
  1017. * AND *UPDATE* DIRECTIVES. IT CONTAINS THE VSN-S OF THE
  1018. * TAPES USED FOR THE DUMP.
  1019. *
  1020. *T,NUMB 42/ DUMP FILE NAME,18/0
  1021. CF SPACE 4,15
  1022. ** CF.
  1023. *
  1024. * THE *CF* FILE IS THE SCRATCH FILE REQUIRED FOR THE *COPY*
  1025. * AND *COMPACT* DIRECTIVES, WHICH IS SORTED EXTERNALLY.
  1026. *
  1027. *T,CF 42/ DUMP FILE NAME,6/ FNUM,12/ REC NUM
  1028. *T,CF+1 42/ PERMANENT FILE NAME,6/ FTYP,12/ REQ FLGS
  1029. *T,CF+2 60/ DATABASE ENTRY FIRST WORD
  1030. *T,CF+3 60/ DATABASE ENTRY SECOND WORD
  1031. *T,CF+4 60/ DATABASE ENTRY THIRD WORD
  1032. *T,CF+5 60/ DATABASE ENTRY FOURTH WORD
  1033. UPDATES SPACE 4,15
  1034. ** UPDATES.
  1035. *
  1036. * *UPDATES* IS USED IN THE *COMPACT*, *DUMP*, *REMOVE, AND
  1037. * *UPDATE* DIRECTIVES. IT HAS 5-WORD RECORDS FOR THE FILES
  1038. * TO BE ADDED TO THE *RECLAIM* DATABASE. IT HAS THE FORMAT--
  1039. *
  1040. *T,ID 60/ DATABASE ENTRY FIRST WORD
  1041. *T,ID+1 60/ DATABASE ENTRY SECOND WORD
  1042. *T,ID+2 60/ DATABASE ENTRY THIRD WORD
  1043. *T,ID+3 60/ DATABASE ENTRY FOURTH WORD
  1044. *T,ID+4 42/ FAMILY,18/ 0
  1045. TITLE PROGRAMMING NOTES.
  1046. NOTES SPACE 4,30
  1047. ** PROGRAMMING NOTES.
  1048. *
  1049. * 1. DEBUGGING CODE IS EMBEDDED WITHIN *RECLAIM* TO MAKE
  1050. * TESTING EASIER. ONE INSTANCE OF SUCH USE IS IN ROUTINE
  1051. * *RNT* (REQUEST NEXT TAPE), WHICH ASSEMBLES EITHER A *LABEL*
  1052. * MACRO OR A *RECALL* MACRO. THE DEBUGGING CODE IS TURNED ON
  1053. * BY USING THE *ML* PARAMETER ON THE COMPASS COMMAND. A
  1054. * TYPICAL SEQUENCE OF CODE IS--
  1055. * DEBUG IFC EQ,$DEBUG$"MODLEVEL"$
  1056. * ....REGULAR CODE....
  1057. * DEBUG ELSE
  1058. * ....DEBUGGING CODE....
  1059. * DEBUG ENDIF
  1060. * THIS CONVENTION SHOULD BE FOLLOWED FOR ANY OTHER DEBUGGING
  1061. * OR TESTING CODE. THEN TO ASSEMBLE THE DEBUG CODE, USE
  1062. * *ML=DEBUG* ON THE *COMPASS* COMMAND.
  1063. *
  1064. * 2. PROGRAM FLOW. *RECLAIM* HAS ONE MAIN LOOP WHICH CRACKS
  1065. * DIRECTIVES, SETS UP TABLES, AND JUMPS TO A PARTICULAR
  1066. * DIRECTIVE PROCESSOR THROUGH A JUMP TABLE. EACH DIRECTIVE
  1067. * PROCESSOR RETURNS TO THE MAIN LOOP THROUGH TAG *MAIN8* IF
  1068. * ANY OUTPUT HAS BEEN GENERATED (I.E. NORMAL RETURN).
  1069. * OTHERWISE RETURN IS THROUGH TAG *MAIN* IF A GIVEN DIRECTIVE
  1070. * WAS IGNORED.
  1071. TITLE SYMBOL DEFINITIONS.
  1072. SPACE 4,10
  1073. **** SYMBOL DEFINITIONS.
  1074.  
  1075.  
  1076. * DATA BASE WORD OFFSET DEFINITIONS.
  1077.  
  1078. DBUNM EQU 0 USER NAME
  1079. DBUUI EQU 0 USER INDEX
  1080. DBPFN EQU 1 PERMANENT FILE NAME
  1081. DBDDT EQU 1 DUMP DATE
  1082. DBXSV EQU 1 SET VSN - VSN INDEX
  1083. DBTNO EQU 2 TAPE NUMBER FOR FILE RESIDENCE
  1084. DBLMO EQU 2 LAST MODIFICATION DATE OF FILE
  1085. DBXCV EQU 2 CURRENT VSN - VSN INDEX
  1086. DBFLG EQU 3 SPECIAL FLAGS
  1087. DBFTY EQU 3 FILE TYPE (D/I)
  1088. DBRFL EQU 3 TAPE REQUEST FLAGS
  1089. DBFNO EQU 3 FILE NUMBER ON TAPE
  1090. DBRNO EQU 3 RECORD NUMBER OF FILE RESIDENCE
  1091. DBLEN EQU 3 LENGTH OF PERMANENT FILE
  1092. DBXFR EQU 3 FILE AND RECORD NUMBERS - VSN INDEX
  1093. UDBFAM EQU 4 FAMILY NAME IN *UPDATES* INPUT RECORD
  1094.  
  1095. * OUTPUT LINE DEFINITIONS.
  1096.  
  1097. LPFN EQU 0 PERMANENT FILE NAME
  1098. LFTY EQU 0 FILE TYPE
  1099. LLMO EQU 1 LAST MOD
  1100. LDDT EQU 2 DUMP DATE
  1101. LLEN EQU 3 LENGTH
  1102. LUNM EQU 4 USER NAME
  1103. LTNO EQU 5 TAPE NUMBER
  1104. LRNO EQU 6 RECORD NUMBER
  1105. LFNO EQU 6 FILE NUMBER ON TAPE
  1106. LEND EQU 7 TERMINATOR
  1107. ****
  1108. TITLE GENERAL MACRO DEFINITIONS.
  1109. SPACE 4,10
  1110. * GENERAL MACRO DEFINITIONS.
  1111. ABORT SPACE 4,15
  1112. ** ABORT - ABORT PROGRAM.
  1113. *
  1114. * ABORT MSG
  1115. *
  1116. * ENTRY *MSG* = FWA OF ERROR MESSAGE TO BE ISSUED TO THE
  1117. * DAYFILE. IF OMITTED, NO MESSAGE IS ISSUED.
  1118. * *NAP* = *NA* PARAMETER VALUE.
  1119. *
  1120. * EXIT OPTIONAL MESSAGE ISSUED TO DAYFILE.
  1121. * *RECLAIM* ABORTED (OR TERMINATED NORMALLY IF *NA*).
  1122. *
  1123. * USES X - 1.
  1124. * A - 1.
  1125. *
  1126. * MACROS ENDRUN, MESSAGE, SYSTEM.
  1127.  
  1128.  
  1129. PURGMAC ABORT
  1130.  
  1131. ABORT MACRO MSG
  1132. LOCAL NOBOMB
  1133. MACREF ABORT
  1134. IFC NE,$MSG$$,2
  1135. R= X1,MSG
  1136. MESSAGE X1,3,R
  1137. SA1 NAP
  1138. NZ X1,NOBOMB
  1139. SYSTEM ABT,R
  1140. NOBOMB ENDRUN
  1141. ABORT ENDM
  1142. BREAK SPACE 4,15
  1143. ** BREAK - PROCESS INTERACTIVE PROGRAM INTERRUPTS.
  1144. *
  1145. * BREAK REG
  1146. *
  1147. * ENTRY *REG* = ALTERNATE REGISTER TO BE DESTROYED BY
  1148. * *BREAK* MACRO. IF OMITTED, X1 IS USED.
  1149. *
  1150. * EXIT TO *PBC* IF TERMINAL INTERRUPT INITIATED.
  1151. *
  1152. * USES X - 1 (OR X.REG).
  1153. * A - 1 (OR A.REG).
  1154.  
  1155.  
  1156. PURGMAC BREAK
  1157.  
  1158. BREAK MACRO REG
  1159. MACREF BREAK
  1160. IFC NE,$REG$$
  1161. SA_REG BREAK
  1162. NZ X_REG,PBC IF INTERRUPT INITIATED
  1163. ELSE
  1164. SA1 BREAK
  1165. NZ X1,PBC IF INTERRUPT INITIATED
  1166. ENDIF
  1167. BREAK ENDM
  1168. CLEAR SPACE 4,15
  1169. ** CLEAR - CLEAR FET POINTERS.
  1170. *
  1171. * CLEAR FET
  1172. *
  1173. * ENTRY *FET* = FWA OF FET TO BE CLEARED. IF OMITTED (X2)
  1174. * IS ASSUMED TO CONTAIN THE FET ADDRESS.
  1175. *
  1176. * EXIT FET POINTERS *IN* AND *OUT* SET TO *FIRST*.
  1177. *
  1178. * USES X - 1, 6.
  1179. * A - 1, 6.
  1180.  
  1181.  
  1182. PURGMAC CLEAR
  1183.  
  1184. CLEAR MACRO FET
  1185. MACREF CLEAR
  1186. IFC EQ,$FET$$
  1187. RECALL X2
  1188. SA1 X2+B1 FIRST
  1189. ELSE
  1190. RECALL FET
  1191. SA1 FET+B1 FIRST
  1192. MX6 12 CLEAR *DT* FIELD
  1193. BX6 -X6*X1
  1194. SA6 A1
  1195. ENDIF
  1196. SX6 X1
  1197. SA6 A1+B1 FIRST INTO IN
  1198. SA6 A6+B1 IN INTO OUT
  1199. CLEAR ENDM
  1200. COPYBLK SPACE 4,15
  1201. ** COPYBLK - COPY DATA INTO A DUMP TAPE BLOCK.
  1202. *
  1203. * COPYBLK WC,FS,SHORT
  1204. *
  1205. * ENTRY *WC* = WORD COUNT TO COPY INTO TAPE BLOCK.
  1206. * *FS* = FREE SPACE IN TAPE BLOCK.
  1207. * *SHORT* = FLAG INDICATING IF THIS TAPE BLOCK SHOULD
  1208. * BE AN EOR OR EOF BLOCK--
  1209. * .EQ. 0 IF THIS IS A NORMAL DATA BLOCK.
  1210. * .LT. 0 IF THE LAST PRU READ WAS A SHORT PRU.
  1211. *
  1212. * USES X - 1, 2, 3.
  1213. *
  1214. * CALLS WRB.
  1215.  
  1216.  
  1217. PURGMAC COPYBLK
  1218.  
  1219. COPYBLK MACRO WC,FS,SHORT
  1220. MACREF COPYBLK
  1221. R= X1,WC
  1222. R= X2,FS
  1223. R= X3,SHORT
  1224. RJ WRB
  1225. COPYBLK ENDM
  1226. INDEX SPACE 4,15
  1227. ** INDEX - GENERATE INDEXED TABLE WITH 4-WORD MESSAGES.
  1228. *
  1229. *ADDR INDEX I,MSG
  1230. *
  1231. * ENTRY *ADDR* = FWA OF TABLE, IF PRESENT.
  1232. * *I* = TABLE INDEX.
  1233. * *MSG* = MESSAGE TEXT (DOES NOT CONTAIN ASTERISKS).
  1234. *
  1235. * EXIT 4-WORD TABLE ENTRY GENERATED AT I*4+ADDR.
  1236. *
  1237. * THIS MACRO IS A MODIFIED VERSION OF *INDEX* FROM *COMPMAC*.
  1238.  
  1239.  
  1240. PURGMAC INDEX
  1241.  
  1242. MACRO INDEX,ADDR,I,MSG
  1243. IFC NE,$ADDR$$
  1244. ADDR BSS 0
  1245. .2 SET ADDR
  1246. ELSE 4
  1247. ORG I+I+I+I+.2
  1248. IFC NE,$MSG$$,1
  1249. DATA C*MSG*
  1250. BSS 0
  1251. ENDM
  1252. OPTION SPACE 4,20
  1253. ** OPTION - EXPAND SELECTED DIRECTIVE KEYWORD.
  1254. *
  1255. * *OPTION* GENERATES THE *COMCARM* ARGUMENT TABLE, THE DEFAULT
  1256. * VALUE TABLE, AND THE ARGUMENT VARIABLE TABLE FOR EACH KEYWORD
  1257. * THAT CAN BE USED ON A *RECLAIM* DIRECTIVE.
  1258. *
  1259. * OPTION KW,DEF,CVT,ASV,WC
  1260. *
  1261. * ENTRY *KW* = OPTION ENTERED BY USER.
  1262. * *DEF* = DEFAULT.
  1263. * *CVT* = REQUIRED CONVERSION.
  1264. * *ASV* = ADDRESS OF ASSUMED VALUE.
  1265. * *WC* = WORD COUNT OF VALUE.
  1266. *
  1267. * EXIT *KWA* = ARGUMENT PROCESSOR EQUIVALENCE TABLE ADDRESS.
  1268. * *KWD* = DEFAULT VALUE TABLE ADDRESS.
  1269. * *KWV* = VARIABLE TABLE ADDRESS.
  1270.  
  1271.  
  1272. PURGMAC OPTION
  1273.  
  1274. OPTION MACRO KW,DEF,CVT,ASV,WC
  1275. MACREF OPTION
  1276.  
  1277. ARMTAB RMT
  1278. KW_A VFD 12/0L_KW KEYWORD
  1279. IFC NE,$ASV$$
  1280. VFD 18/ASV FOR NON-EQUIVALENCED INPUT VARIABLES
  1281. ELSE 1
  1282. VFD 18/=0 VALUE EXPECTED BY ARGUMENT PROCESSOR
  1283.  
  1284. VFD 3/4 33B = 0
  1285.  
  1286. ECHO 1,MODE=(JDATE,OCTAL,DECIMAL,FILETY,TAPEPO,SPFILL)
  1287. .MODE SET 0
  1288. .CVT SET 1
  1289. VFD 1/.JDATE,1/.OCTAL,1/.DECIMAL
  1290. VFD 1/.FILETY,1/.TAPEPO,1/.SPFILL
  1291.  
  1292. IFC EQ,$WC$$
  1293. VFD 3/1
  1294. ELSE 1
  1295. VFD 3/WC
  1296.  
  1297. VFD 18/KW_V
  1298. ARMTAB RMT
  1299.  
  1300. DEFAULT RMT
  1301. KW_D VFD 60/DEF
  1302. DEFAULT RMT
  1303.  
  1304. VARIABL RMT
  1305. IFC EQ,$WC$$
  1306. KW_V BSSZ 1
  1307. ELSE 1
  1308. KW_V BSSZ WC
  1309. VARIABL RMT
  1310. OPTION ENDM
  1311. TITLE MERGESORT MACRO DEFINITIONS.
  1312. SPACE 4,10
  1313. * MERGESORT MACRO DEFINITIONS.
  1314. REWRYTE SPACE 4,15
  1315. ** REWRYTE - REWIND FILE AND PREPARE FOR WRITING.
  1316. *
  1317. * REWRYTE FILE
  1318. *
  1319. * ENTRY *FILE* = FET ADDRESS OF FILE TO REWIND AND WRITE.
  1320. *
  1321. * EXIT FILE REWOUND, EOF FLAG SET ON.
  1322. *
  1323. * USES X - 2.
  1324. *
  1325. * CALLS RWR.
  1326.  
  1327.  
  1328. PURGMAC REWRYTE
  1329.  
  1330. REWRYTE MACRO FILE
  1331. MACREF REWRYTE
  1332. R= X2,FILE
  1333. RJ RWR
  1334. REWRYTE ENDM
  1335. RESET SPACE 4,15
  1336. ** RESET - REWIND FILE AND PREPARE FOR READING.
  1337. *
  1338. * RESET FILE
  1339. *
  1340. * ENTRY *FILE* = FET ADDRESS OF FILE TO REWIND AND READ.
  1341. *
  1342. * EXIT FILE REWOUND AND PARTIALLY READ.
  1343. * EOF FLAG SET IF FILE IS EMPTY.
  1344. *
  1345. * USES X - 2.
  1346. *
  1347. * CALLS RST.
  1348.  
  1349.  
  1350. PURGMAC RESET
  1351.  
  1352. RESET MACRO FET
  1353. MACREF RESET
  1354. R= X2,FET
  1355. RJ RST
  1356. RESET ENDM
  1357. GETITEM SPACE 4,15
  1358. ** GETITEM - GET AN ITEM FROM A FILE.
  1359. *
  1360. * GETITEM FET,ITEM
  1361. *
  1362. * ENTRY *FET* = FET ADDRESS OF FILE.
  1363. * *ITEM* = ITEM DESTINATION ADDRESS.
  1364. *
  1365. * EXIT VALUE MOVED.
  1366. * EOF FLAG SET IF NEXT READ FAILS.
  1367. *
  1368. * USES X - 0, 5.
  1369. *
  1370. * CALLS GIT.
  1371.  
  1372.  
  1373. PURGMAC GETITEM
  1374.  
  1375. GETITEM MACRO FET,ITEM
  1376. MACREF GETITEM
  1377. R= X0,FET
  1378. R= X5,ITEM
  1379. RJ GIT
  1380. GETITEM ENDM
  1381. PUTITEM SPACE 4,15
  1382. ** PUTITEM - WRITE ITEM TO FILE.
  1383. *
  1384. * PUTITEM FET,ITEM
  1385. *
  1386. * ENTRY *FET* = FET ADDRESS OF FILE.
  1387. * *ITEM* = ADDRESS OF ITEM TO WRITE.
  1388. *
  1389. * EXIT ITEM WRITTEN TO FILE.
  1390. *
  1391. * USES X - 2, 5.
  1392. *
  1393. * CALLS PIT.
  1394.  
  1395.  
  1396. PURGMAC PUTITEM
  1397.  
  1398. PUTITEM MACRO FET,ITEM
  1399. MACREF PUTITEM
  1400. R= X2,FET
  1401. R= X5,ITEM
  1402. RJ PIT
  1403. PUTITEM ENDM
  1404. COPITEM SPACE 4,15
  1405. ** COPITEM - COPY ITEM FROM ONE FILE TO ANOTHER.
  1406. *
  1407. * COPITEM FILEX,FILEY
  1408. *
  1409. * ENTRY *FILEX* = FET ADDRESS OF FILE TO READ FROM.
  1410. * *FILEY* = FET ADDRESS OF FILE TO WRITE TO.
  1411. *
  1412. * EXIT ITEM COPIED.
  1413. * *EORUN* SET IF ITEM COPIED WAS END OF A RUN.
  1414. *
  1415. * USES X - 2, 5.
  1416. *
  1417. * CALLS CIT.
  1418.  
  1419.  
  1420. PURGMAC COPITEM
  1421.  
  1422. COPITEM MACRO FILEX,FILEY
  1423. MACREF COPITEM
  1424. R= X2,FILEX
  1425. R= X5,FILEY
  1426. RJ CIT
  1427. COPITEM ENDM
  1428. COPYRUN SPACE 4,15
  1429. ** COPYRUN - COPY RUN OF ENTRIES BETWEEN FILES.
  1430. *
  1431. * COPYRUN FILEX,FILEY
  1432. *
  1433. * ENTRY *FILEX* = FET ADDRESS OF FILE TO READ FROM.
  1434. * *FILEY* = FET ADDRESS OF FILE TO WRITE TO.
  1435. *
  1436. * EXIT RUN COPIED FROM *FILEX* TO *FILEY*.
  1437. *
  1438. * USES X - 2, 5.
  1439. *
  1440. * CALLS CRN.
  1441.  
  1442.  
  1443. PURGMAC COPYRUN
  1444.  
  1445. COPYRUN MACRO FILEX,FILEY
  1446. MACREF COPYRUN
  1447. R= X2,FILEX
  1448. R= X5,FILEY
  1449. RJ CRN
  1450. COPYRUN ENDM
  1451. TITLE ARGUMENT TABLES.
  1452. SPACE 4,10
  1453. * ARGUMENT TABLES.
  1454. OPTIONS SPACE 4,10
  1455. * OPTIONS - OPTIONS LIST FOR ARGUMENT PROCESSING.
  1456.  
  1457.  
  1458. ORG 110B
  1459. ORIG BSS 0 PROGRAM ORIGIN
  1460.  
  1461.  
  1462. OPTIONS BSS 0 OPTIONS TABLE
  1463. OPTION AA,0,JDATE ACCESSED AFTER DATE
  1464. OPTION AB,0,JDATE ACCESSED BEFORE DATE
  1465. OPTION AD,0,JDATE LAST ACCESS DATE
  1466. OPTION CF,0LNTAPE,0,OPNTAPE COMPACT LOCAL FILE NAME
  1467. OPTION CN,0,0 COMPACT PERMANENT FILE NAME
  1468. OPTION CT,0,0 COMPACT TAPE VSN
  1469. OPTION DA,0,JDATE DUMPED AFTER DATE
  1470. OPTION DB,0,JDATE DUMPED BEFORE DATE
  1471. OPTION DD,0,JDATE DUMP DATE
  1472. OPTION DE,0,0,-NOEQV FILES WHICH HAVE BEEN DELETED
  1473. OPTION DF,0LTAPE,0,OPTAPE LOCAL DUMP FILE NAME
  1474. OPTION DT,0,0 DEVICE TYPE ( MT/NT/CT/AT/MS )
  1475. OPTION EX,0LNO,0,OPYES REVERSE SELECTION CRITERIA
  1476. OPTION GT,0,DECIMAL FILE SIZE GREATER THAN
  1477. OPTION FN,0 PROCESS LOCAL FILE NAME FIRST
  1478. OPTION FI,0,DECIMAL FILE POSITION
  1479. OPTION LT,0,DECIMAL FILE SIZE LESS THAN
  1480. OPTION LV,0,0,-NOEQV LATEST VERSION OF A FILE
  1481. OPTION MA,0,JDATE MODIFIED AFTER
  1482. OPTION MB,0,JDATE MODIFIED BEFORE
  1483. OPTION MD,0,JDATE LAST MODIFICATION
  1484. OPTION NA,0,0,-NOEQV NO ABORT OPTION
  1485. OPTION NF,0L0,DECIMAL NUMBER OF FILES TO BE SELECTED
  1486. OPTION NN,0 NEW FILE NAME
  1487. OPTION OV,0,0,-NOEQV OVERWRITE FLAG FOR COMPACTING
  1488. OPTION PF,0 PERMANENT FILE NAME
  1489. OPTION PO,0LU,TAPEPO *PO* OPTION FOR TAPE REQUESTS
  1490. OPTION RC,0,DECIMAL RECORD POSITION
  1491. OPTION RP,0LNO,0,OPYES REPLACE OPTION
  1492. OPTION RS,0 FILE RESIDENCE
  1493. OPTION TY,0,FILETY FILE TYPE (DIRECT OR INDIRECT)
  1494.  
  1495. * START OF PRIVILEGED ARGUMENTS.
  1496.  
  1497. OPTION AS,0LNO,0,OPYES PRESERVE ALTERNATE STORAGE DATA
  1498. OPTION D,0,0 TAPE DENSITY FOR DUMP
  1499. OPTION DN,0,0 DUMP FILE NAME
  1500. OPTION EI,1L#,0,NOEQV DUMP AT END OF INFORMATION
  1501. OPTION F,0,0 TAPE FORMAT
  1502. OPTION FT,0,0,-NOEQV FOREIGN TAPE FLAG
  1503. OPTION MT,0,0,-NOEQV TAPE DEVICE TYPE
  1504. OPTION NT,0,0,-NOEQV TAPE DEVICE TYPE
  1505. OPTION PW,0,0 TMS TAPE PASSWORD
  1506. OPTION TO,0,0 TMS TAPE OWNER
  1507. OPTION TN,0,0 TAPE NUMBER
  1508. OPTION UI,0,OCTAL USER INDEX (COPY/LIST/LOAD WITH TN)
  1509. OPTION UN,0 USER NAME
  1510. ARMTAB SPACE 4,10
  1511. * ARMTAB - TABLE OF ARGUMENT PROCESSER POINTERS FOR *COMCARM*.
  1512.  
  1513.  
  1514. ARMTAB BSS 0 ARGUMENT TABLE
  1515. ARMTAB HERE
  1516. ARMTABL EQU *-ARMTAB SET TABLE LENGTH
  1517. PRIVARG EQU ASA START PRIVILEGED ARGUMENTS AT ALT. STG.
  1518. DEFAULT SPACE 4,10
  1519. * DEFAULT - TABLE OF DEFAULT VALUES FOR *COMCARM*.
  1520.  
  1521.  
  1522. DEFAULT BSS 0 DEFAULT VALUES TABLE
  1523. DEFAULT HERE
  1524. VARIABL SPACE 4,10
  1525. * VARIABL - TABLE OF VARIABLES FOR *COMCARM*.
  1526.  
  1527.  
  1528. VARIABL BSS 0 VARIABLE TABLE
  1529. VARIABL HERE
  1530. TITLE DIRECTIVES/OPTIONS TABLES.
  1531. TDIR SPACE 4,10
  1532. * TDIR - TABLE OF DIRECTIVES.
  1533.  
  1534.  
  1535. TDIR BSS 0 *COMCARM* EQUIVALENCE TABLE
  1536. VFD 42/0LLIST,18/LIST
  1537. VFD 42/0LCOPY,18/COPY
  1538. VFD 42/0LDELETE,18/DELETE
  1539. VFD 42/0LDUMP,18/DUMP
  1540. VFD 42/0LRESET,18/DELETE
  1541. VFD 42/0LLOAD,18/LOAD
  1542. VFD 42/0LSET,18/SET
  1543. VFD 42/0LCOMPACT,18/COMPACT
  1544. VFD 42/0LEND,18/END
  1545. VFD 42/0LREMOVE,18/REMOVE
  1546. VFD 42/0LUPDATE,18/UPDATE
  1547. VFD 42/0LQUIT,18/END
  1548. CON 0
  1549. TDTV SPACE 4,10
  1550. * TDTV - DEVICE TYPE VALUES.
  1551.  
  1552. TDTV BSS 0 DEVICE TYPE VALUES
  1553.  
  1554. * ALL TAPE DEVICE TYPES MUST APPEAR FIRST.
  1555.  
  1556. QUAL MTX
  1557. MT VFD 48/0LMT,3/0,2/DVMT,1/0,3/0,3/TFI 7-TRACK REEL TAPE
  1558. NT VFD 48/0LNT,3/0,2/DVNT,1/0,3/0,3/TFI 9-TRACK REEL TAPE
  1559. VFD 48/0LCT,3/0,2/DVCT,1/0,3/D380,3/TFI CARTRIDGE TAPE
  1560. VFD 48/0LAT,3/0,2/DVAT,1/0,3/D380,3/TFI ACS CARTRIDGE
  1561. QUAL *
  1562. TDTET EQU * END OF TAPE DEVICE TYPE VALUES
  1563. DTMS VFD 24/0LMS,36/0 MASS STORAGE
  1564. TDTMX EQU * END OF DEVICE TYPE VALUES
  1565.  
  1566. DTMT EQU /MTX/MT
  1567. DTNT EQU /MTX/NT
  1568. TDEN SPACE 4,10
  1569. * TDEN - TAPE DENSITIES.
  1570.  
  1571.  
  1572. TDEN BSS 0 TAPE DENSITIES
  1573. QUAL MTX
  1574. VFD 48/0LHI,3/0,2/DVMT,1/0,3/D05,3/TFI 7-TRACK REEL TAPE
  1575. VFD 48/0LLO,3/0,2/DVMT,1/0,3/D02,3/TFI 7-TRACK REEL TAPE
  1576. VFD 48/0LHY,3/0,2/DVMT,1/0,3/D08,3/TFI 7-TRACK REEL TAPE
  1577. VFD 48/0LHD,3/0,2/DVNT,1/0,3/D08,3/TFI 9-TRACK REEL TAPE
  1578. VFD 48/0LPE,3/0,2/DVNT,1/0,3/D16,3/TFI 9-TRACK REEL TAPE
  1579. VFD 48/0LGE,3/0,2/DVNT,1/0,3/D62,3/TFI 9-TRACK REEL TAPE
  1580. VFD 48/0LCE,3/0,2/DVCT,1/0,3/D380,3/TFI CARTRIDGE TAPE
  1581. VFD 48/0LAE,3/0,2/DVAT,1/0,3/D380,3/TFI ACS CARTRIDGE
  1582. QUAL *
  1583. CON 0 END OF DENSITY TABLE
  1584. TFMT SPACE 4,10
  1585. * TFMT - TAPE FORMATS.
  1586.  
  1587.  
  1588. TFMT BSS 0 TAPE FORMATS
  1589. DATA 0LI
  1590. DATA 0LSI
  1591. DATA 0LF
  1592. DATA 0LS
  1593. DATA 0LL
  1594. DATA 0LLI
  1595. TFMTL EQU *-TFMT NUMBER OF TAPE FORMATS
  1596. TITLE OUTPUT HEADINGS.
  1597. SPACE 4,10
  1598. * OUTPUT HEADINGS.
  1599.  
  1600.  
  1601. HEAD1 DATA 1L1
  1602. HEADER DATA 10H RECLAIM V
  1603. VERSION VFD 18/3H"VER",42/7H OP=
  1604. OPTION DATA 10H
  1605. USER DATA 3LUN=
  1606. DATE DATA 10H
  1607. TIME DATA 10H
  1608. HEAD1.0 DATA 10H PAGE
  1609. PAGE CON 0
  1610.  
  1611. DATA 30H PFN TYPE LAST MOD DUMP DATE
  1612. HEAD2 DATA 8L LENGTH
  1613. DATA 20HSERNAME TAPE FI
  1614. DATA 8L REC
  1615.  
  1616. HEADER0 EQU *-HEADER
  1617. HLENGTH CON 0 HEADING LENGTH
  1618.  
  1619. HEADER1 DATA 8L
  1620. HEADER2 DATA 10H FI
  1621. DATA 10HLES PROCES
  1622. DATA 0LSED.
  1623. DATA 8L
  1624.  
  1625. HEADER4 EQU *-HEADER1
  1626.  
  1627. HEADER5 DATA 10H NO FI
  1628.  
  1629. HEADER6 DATA 8L NONE
  1630.  
  1631. BLANKS DATA 10H TEN BLANKS
  1632. TITLE VARIABLES.
  1633. SPACE 4,10
  1634. * GLOBAL VARIABLES.
  1635.  
  1636.  
  1637. ACCESS BSSZ 1 PRIVILEGED USER FLAG
  1638. BLOKHED BSS 1 TAPE BLOCK CONTROL WORD SCRATCH
  1639. BMSG BSS 3 B-DISPLAY MESSAGE AREA
  1640. BREAK BSSZ 1 TERMINAL DISABLE ADDRESS
  1641.  
  1642. CATSKL BSSZ 4 DUMMY PFC SKELETON FOR DUMPING LOCAL FILES
  1643. VFD 6/FCPR,6/PTRD,48/0
  1644. DATA 0
  1645. VFD 3/RSNP,3/BRNO,6/0,48/0
  1646. BSSZ 9
  1647.  
  1648. CCIN BSSZ 1 *Z* INPUT PARAMETER FLAG
  1649. COPTION BSSZ 1 CURRENT SELECTED OPTION
  1650. DBDEFLG BSS 1 DATABASE DEFINED FLAG
  1651. DBE BSSZ UDBEL DATA BASE ENTRY
  1652. DBNAM BSS 1 DATABASE FILE NAME
  1653. DBPN BSS 1 DATABASE PACK NAME
  1654. DBPW BSSZ 1 DATABASE PASSWORD
  1655. DBUN BSS 1 DATABASE USER NAME
  1656. DUMPDT BSSZ 1 TODAY-S DATE IN PACKED JULIAN
  1657. DUMPLOC DATA 0 FLAG FOR DUMPING LOCAL FILE
  1658. DUMPNUM DATA 0 PREVIOUS DUMP FILE POSITION
  1659. EOIFLG BSS 1 FLAG EOI FOR COPY (NO DATABASE)
  1660. EOR BSSZ 1 EOR FLAG FOR READING FROM BATCH INPUT
  1661. EORWORD DATA 0 EOR SECTOR TRAILER WORD
  1662. EOFWORD VFD 12/17B,48/0 EOF SECTOR TRAILER WORD
  1663. EORUN DATA 0 FLAG FOR END OF RUN IN MERGESORT
  1664.  
  1665. FIBK VFD 42/0LTAPE,6/FIBKL,12/1 *FILINFO* DATA BLOCK
  1666. FIBSTA BSSZ 1 STATUS
  1667. FIBEST BSSZ 1 EST ORDINAL
  1668. FIBLEN BSSZ 2 FILE LENGTH
  1669. FIBVSN VFD 54/0,6/4 VSN
  1670. FIBDEN VFD 54/0,6/2 DENSITY
  1671. FIBKL EQU *-FIBK LENGTH OF *FILINFO* DATA BLOCK
  1672.  
  1673. HDRJDT DATA 0 *PFDUMP* HEADER DATE CONVERTED TO JULIAN
  1674.  
  1675. HDRCTL VFD 42/0LPFDUMPR,9/1,9/HDRSZ
  1676. HDRPFD VFD 36/0LPFDUMP,24/0 DUMP HEADER ID
  1677. VFD 42/0LREEL,18/1
  1678. VFD 42/0LMASK,18/377B ALLOW ANY USER INDEX
  1679. HDRDT BSSZ 1 DUMP DATE * YY/MM/DD.*
  1680. HDRTM BSSZ 1 DUMP TIME * HH.MM.SS.*
  1681. FAMILY BSSZ 1 USER-S FAMILY
  1682. HDRPN BSSZ 1 PACK NAME / DEVICE TYPE
  1683. HDRL EQU *-HDRPFD
  1684. BSSZ /COMSPFS/AFLBL-HDRL
  1685. HDRSZ EQU *-HDRPFD
  1686.  
  1687. IDT DATA 1 TERMINAL INPUT ASSIGNMENT FLAG
  1688. INDXLEN BSSZ 1 LENGTH OF OPLD INDEX
  1689. INDXNAM BSSZ 2 USER NAME/PRU COUNT WORKING STORAGE AREA
  1690. JOBORIG BSSZ 1 JOB ORIGIN INFORMATION
  1691. LAD BSSZ 1 LAST ACCESS DATE FROM PFC IF AVAILABLE
  1692. LDFN CON 0LZZZZZG2 SCRATCH FILE LFN FOR *LOAD* PROCESSING
  1693. LINDFP DATA 10H RECLAIM: DAYFILE PREFIX FOR DIRECTIVE LINE
  1694. LINE BSSZ 9 INPUT LINE ARRAY
  1695. LN DATA 0 LINE NUMBER COUNTER REGISTER
  1696. LOADFLG DATA 0 BATCH LOAD FLAG
  1697.  
  1698. LOF DATA 3 LENGTH OF LIST-OF-FILES
  1699. VFD 42/0LOUTPUT,18/O L.O.F. ENTRY FOR *OUTPUT*
  1700. CON 0 L.O.F. TERMINATOR
  1701.  
  1702. LOFPTR VFD 12/0,18/LOF,30/1 L.O.F. POINTER WORD
  1703.  
  1704. MEMORY DATA 0
  1705. MLPP CON LINP MAXIMUM LINES PER PAGE
  1706. MRFILE DATA 0 MOST RECENT FILE PROCESSED
  1707. MRUSER DATA 0 MOST RECENT USER PROCESSED
  1708. MSV BSS 1 MASS STORAGE VARIABLE
  1709. NAP DATA 0 NO ABORT PARAMETER FLAG
  1710. NFP DATA 0 NUMBER OF FILES PROCESSED
  1711. NHV DATA 0 HEADER OPTION VARIABLE
  1712. NOEQV DATA 0L<[][]> NON-EQUIVALENCED VARIABLE FLAG
  1713. NOBREAK DATA 0 FLAG FOR PROCESSING/IGNORING BREAKS
  1714. NLVIFLG BSS 1 SET DATABASE JUST CREATED FLAG
  1715. NOPRU BSS 1 FULL PRU FLAG
  1716. NRUNS DATA 0 TOTAL RUNS FOR A GIVEN MERGESORT PASS
  1717. NVV DATA 0 DUMP FILE *NO VALIDATION* VARIABLE
  1718. ODT DATA 1 TERMINAL OUTPUT ASSIGNMENT POINTER
  1719. OLINE BSSZ OLENGTH OUTPUT LINE
  1720. OPLDH DATA 77000016000000000000B
  1721. OPNO DATA 1LN
  1722. OPNTAPE DATA 5LNTAPE
  1723. OPTAPE DATA 4LTAPE
  1724. OPYES DATA 1LY
  1725. PFCNT BSS 1 COUNTER FOR PFTAB POSITION
  1726. PG DATA 0 PAGE NUMBER COUNTER REGISTER
  1727. PPFLAG BSSZ 1 PPF CALLED FLAG
  1728. PRUHEAD VFD 6/0,18/PRUSIZE,36/0 BLANK PRU HEADER
  1729. RBPF DATA 0 REPRIEVE BYPASS FLAG
  1730. RDT BSS 1 RESIDENCE DEVICE TYPE FOR DATABASE
  1731. RECSET DATA 0 CHARACTER SET MODE CHANGED FLAG
  1732. ROLLTIM DATA 10 DEFAULT ROLLOUT TIME FOR BUSY FILES
  1733. RPCL BSS 1 COPY TO CURRENT LOCATION FLAG
  1734. SALVAGE DATA 0 FLAG FOR RESTORING DATABASE
  1735. SCRFET BSS 1 SCRATCH FET FILE NAME
  1736. SECTOR BSS PRUSIZE+2 PRU BUFFER
  1737. SITEDB DATA 0 *USERDB* VALUE IF *S* COMMAND PARAMETER
  1738. SAVEBUF BSS 1 TEMPORARY STORAGE USED IN *DFT*
  1739. SORR BSS ITEMSIZ SORT RECORD AREA
  1740. TMSTAT BSS 1 INDICATE TMS STATUS
  1741. TAPDFLT BSS 0 TAPE DEFAULT VALUES
  1742. QUAL MTX
  1743. VFD 51/0,2/DVNT,1/0,3/0,3/TFI
  1744. QUAL *
  1745. TNN BSSZ 1 NUMBER OF OCCURRENCES OF *TN*
  1746. TRAILER VFD 45/0,15/77000B END-OF-DUMP CONTROL WORD
  1747. UNLOAD DATA 0 TMS FORCED UNLOAD FLAG
  1748. UPE BSSZ UDBEL UPDATE ENTRY
  1749. USERDB DATA 1HU FLAG INDICATING USER DATABASE ACCESS
  1750. VSNR BSSZ UDBEL VSN INDEX UPDATE RECORD
  1751. VSNCV BSS 1 CURRENT VSN FOR MULTIREEL
  1752. VSNDX DATA 0L.VSNDX. DUMMY USER NAME FOR VSN INDEX
  1753. VSNFR BSS 1 FILE AND RECORD FOR MULTIREEL
  1754. VSNSV BSS 1 SET VSN FOR MULTIREEL
  1755.  
  1756. PFAC BSSZ 1 ALTERNATE CATLIST
  1757. PFNAM BSSZ 1 PERMANENT FILE NAME
  1758. PFCAT BSSZ 1 FILE CATEGORY
  1759. PFPERM BSSZ 1 PERMISSION MODE
  1760. PFUSER BSSZ 1 USER NAME
  1761. PFPASS BSSZ 1 FILE PASSWORD
  1762. PFUCW BSSZ 1 USER CONTROL WORD
  1763. PFDT BSSZ 1 DEVICE TYPE
  1764. PFSS BSSZ 1 SUBSYSTEM
  1765. TITLE ERROR MESSAGES.
  1766. *** ERROR MESSAGES.
  1767. SPACE 4,10
  1768. EREI DATA C* DUMP FILE MALFUNCTION - EOI ENCOUNTERED.*
  1769. ERFM DATA C* DUMP FILE MALFUNCTION - FILE NAME MISMATCH.*
  1770. ERFT DATA C* DUMP FILE MALFUNCTION - FILE TRUNCATED.*
  1771. ERPL DATA C* DUMP FILE MALFUNCTION - POSITION LOST.*
  1772. ERUP DATA C* DUMP FILE MALFUNCTION - UNRECOGNIZABLE PFC.*
  1773. ERND DATA C* NO DATA FOUND FOR USER NAME.*
  1774. LDNG DATA C* SEE DAYFILE - UNABLE TO LOAD XXXXXXX.*
  1775. ERTN DATA C* TN OR DN MUST BE SPECIFIED.*
  1776. TITLE MAIN LOOP.
  1777. MAIN SPACE 4,15
  1778. ** MAIN - MAIN LOOP.
  1779. *
  1780. * *MAIN* MOVES DEFAULTS INTO THE VARIABLE TABLE, READS
  1781. * THE INPUT LINE AND JUMPS TO THE DIRECTIVE SPECIFIED.
  1782. *
  1783. * ENTRY NONE.
  1784. *
  1785. * EXIT TO DIRECTIVE PROCESSOR.
  1786. * TO *END* IF EOR/EOF ENCOUNTERED ON INPUT.
  1787. *
  1788. * ERROR TO *ABT* IF NON-INTERACTIVE JOB GETS DIRECTIVE ERROR.
  1789. *
  1790. * CALLS ARM, CUP, CVP, POP, USB.
  1791. *
  1792. * MACROS BREAK, MESSAGE, READ, READC, WRITEC, WRITEW.
  1793.  
  1794.  
  1795. MAIN8 RJ CUP CLEAN UP PROCESSING
  1796.  
  1797. * PRESET VARIABLE TABLE BY MOVING *DEFAULT* TABLE INTO IT.
  1798.  
  1799. MAIN SB4 ARMTABL-1 END OF TABLE
  1800. MAIN1 SA1 DEFAULT+B4 MOVE DEFAULT VALUE TO VARIABLE TABLE
  1801. BX6 X1
  1802. SA6 VARIABL+B4
  1803. SB4 B4-B1
  1804. PL B4,MAIN1 IF MORE TO PRESET
  1805.  
  1806. * READ LINE FROM INPUT FILE.
  1807.  
  1808. SA1 IDT
  1809. NZ X1,MAIN1.1 IF NOT TERMINAL INPUT
  1810. WRITEC O,MAINB * ENTER DIRECTIVE.*
  1811. READ I,R
  1812. MAIN1.1 READC I,LINE,9
  1813. BX6 X1 SAVE EOR STATUS
  1814. SA6 EOR
  1815. NZ X6,END IF EOR FOUND
  1816. BREAK 2 PROCESS BREAK KEY
  1817. SA1 ODT CHECK FOR TERMINAL OUTPUT FILE
  1818. ZR X1,MAIN2 IF A TERMINAL OUTPUT FILE
  1819. SA1 LN
  1820. ZR X1,MAIN1.2 IF NO OUTPUT
  1821. WRITEC O,(=C*1*) ISSUE PAGE EJECT
  1822. MAIN1.2 WRITEW O,BLANKS,1 ISSUE SPACES TO MOVE LINE TO THE RIGHT
  1823. WRITEC O,LINE,9 COPY DIRECTIVE TO LISTING FILE
  1824.  
  1825. * CRACK INPUT LINE.
  1826.  
  1827. MAIN2 MESSAGE LINDFP,3,R PLACE DIRECTIVE IN DAYFILE
  1828. SX6 B0+ CLEAR PFN TABLE
  1829. SA6 PFTAB
  1830. SA6 PFCNT CLEAR POINTER TO PFTAB
  1831. SA6 NNTAB CLEAR NEW NAME TABLE
  1832. SA6 PPFLAG
  1833. SA6 MSV CLEAR MASS STORAGE FLAG
  1834. SA6 TF+TTNV CLEAR TAPE VSN IN DUMP FET
  1835. SA6 MF+TTNV CLEAR TAPE VSN IN COMPACT FET
  1836. SB2 LINE UNPACK LINE
  1837. RJ USB
  1838. SX6 X6+B1 APPEND TERMINATOR TO INPUT LINE
  1839. SA6 A6
  1840. SX6 1R.
  1841. SA6 B7+B1
  1842. RJ POP PICK OUT DIRECTIVE VERB
  1843. SA6 COPTION SAVE VERB
  1844. ZR B6,MAIN3 IF NO PARAMETERS
  1845. NG B6,MAIN6 IF NO TERMINATOR FOUND
  1846. NG B5,MAIN6 IF EXCESS PARAMETERS FOUND
  1847. SA0 B6 SET LWA IN STRING BUFFER
  1848. SB3 ARMTAB ADDRESS OF ARGUMENT TABLE
  1849. RJ ARM MULTIPLE WORD ARGUMENT TABLE
  1850. NZ X1,MAIN6 IF ERROR
  1851. MAIN3 RJ CVP CONVERT PARAMETERS IN EQUIVALENCE TABLE
  1852.  
  1853. * SEARCH TABLE FOR DIRECTIVE.
  1854.  
  1855. MX0 42
  1856. SA1 COPTION GET OPTION
  1857. SA2 TDIR START OF DIRECTIVE TABLE
  1858. MAIN4 BX3 X0*X2
  1859. ZR X3,MAIN6 IF UNIDENTIFIABLE DIRECTIVE
  1860. BX3 X1-X3
  1861. ZR X3,MAIN5 IF DIRECTIVE FOUND
  1862. SA2 A2+B1
  1863. EQ MAIN4 CHECK NEXT DIRECTIVE
  1864.  
  1865. * PRESET PAGE/LINE/NUMBER OF FILES COUNTS.
  1866. * (X2) = DIRECTORY TABLE WORD. (X0) = 42 BIT MASK.
  1867.  
  1868. MAIN5 SA1 VSNDX
  1869. BX6 X0*X1
  1870. SA6 A1 INITIALIZE VSN INDEX ID/POINTER
  1871. SA6 VSNR SET VSN INDEX ID INTO VSN RECORD
  1872. SX6 B0+
  1873. SA6 LN
  1874. SA6 NFP
  1875. SA6 MRUSER LAST USER NAME PROCESSED
  1876. SA6 MRFILE LAST PERMANENT FILE PROCESSED
  1877. SA6 PG
  1878. SA6 TNN OCCURRENCES OF TAPE NUMBER
  1879. SA6 DBDEFLG CLEAR DATABASE DEFINED FLAG
  1880. SA6 BMSG CLEAR B-DISPLAY MESSAGE AREA
  1881. BX1 -X0*X2 GET DIRECTIVE PROCESSOR ADDRESS
  1882. SB3 X1
  1883. JP B3 JUMP TO PROCESSOR
  1884.  
  1885. * PROCESS DIRECTIVE ERRORS.
  1886.  
  1887. MAIN6 MESSAGE MAINA,3 * DIRECTIVE ARGUMENT ERROR.*
  1888. WRITEC O,MAINA
  1889. MAIN7 SA1 IDT CHECK FOR TERMINAL INPUT
  1890. ZR X1,MAIN IF A TERMINAL THEN REPROMPT
  1891. EQ ABT ABORT *RECLAIM*
  1892.  
  1893.  
  1894. MAINA DATA C* DIRECTIVE ARGUMENT ERROR.*
  1895. MAINB DATA C* ENTER DIRECTIVE.*
  1896. TITLE PROCESS *COMPACT* DIRECTIVE.
  1897. COMPACT SPACE 4,20
  1898. ** COMPACT - PROCESS *COMPACT* DIRECTIVE.
  1899. *
  1900. * *COMPACT* WRITES A NEW DUMP TAPE FROM AN OLD ONE, REMOVING
  1901. * ANY DELETED OR UNSELECTED FILES IN THE PROCESS. *COMPACT*
  1902. * EITHER REQUESTS A SECOND TAPE AND WRITES THE NEW DUMP THERE,
  1903. * OR IT COPIES THE COMPACTED DUMP BACK OVER THE OLD TAPE.
  1904. *
  1905. * ENTRY NONE.
  1906. *
  1907. * EXIT DELETED FILES REMOVED. DATABASE UPDATED.
  1908. *
  1909. * USES X - ALL.
  1910. * A - ALL.
  1911. *
  1912. * CALLS CBR, CEI, LCV, LVI, MDL, PDB, PDF, POT, RDB, RNT, SBU,
  1913. * SFC, SRT, UDV, UII, UPD, ZTB.
  1914. *
  1915. * MACROS MESSAGE, MOVE, READ, READW, REWIND, SKIPF, SKIPFF,
  1916. * UNLOAD, WRITEC, WRITEF, WRITEO, WRITER, WRITEW.
  1917.  
  1918.  
  1919. COMPACT BSS 0 ENTRY
  1920.  
  1921. * CHECK FOR REQUISITE VSN.
  1922.  
  1923. SA1 TF+TTNV CHECK FOR A VSN
  1924. NZ X1,CMP1 IF A VSN WAS GIVEN
  1925. MESSAGE ERTN,3 * TN OR DN MUST BE SPECIFIED.*
  1926. WRITEC O,ERTN
  1927. EQ MAIN8 RETURN TO MAIN LOOP
  1928.  
  1929. CMP1 BX6 X1 PRESET OLD VSN FOR *NUMBERS* FILE
  1930. SA6 CMPD
  1931. SA1 OVV
  1932. NZ X1,CMP2 IF *OV* OPTION SELECTED
  1933. SA1 MF+TTNV
  1934. NZ X1,CMP2 IF *CT* OR *CN* OPTION SELECTED
  1935. MESSAGE CMPA,3 * CT, CN OR OV KEYWORD NOT PRESENT.*
  1936. WRITEC O,CMPA
  1937. EQ MAIN8 RETURN TO MAIN LOOP
  1938.  
  1939. CMP2 SX7 PTRD SET READ MODE FOR ATTACH
  1940. SA1 PDBC POINT TO WORKING USERNAME LOCATION
  1941. BX5 X5-X5 SET UP TO ABORT IF ATTACH FAILS
  1942. BX1 X1-X1 SET UP TO SCAN THE ENTIRE DATABASE
  1943. RJ PDB POSITION DATABASE
  1944. SX6 B0+ CLEAR COUNT OF FILES PROCESSED
  1945. SA6 NFP
  1946. SX6 377777B SET FILE COUNT LIMIT
  1947. RJ SFC
  1948. UNLOAD OPLDF
  1949. UNLOAD UPDATES
  1950. UNLOAD NUMBERS
  1951. REWIND CF,R
  1952. WRITE OPLDF,*
  1953. WRITE UPDATES,*
  1954. WRITE NUMBERS,*
  1955. WRITE CF,*
  1956.  
  1957. * READ DATABASE ENTRY.
  1958.  
  1959. CMP3 RJ RDB READ A DATABASE ENTRY
  1960. NZ X1,CMP4 IF NO MORE VALID ENTRIES
  1961. SA2 DBE+DBFNO ENTRY WORD WITH TAPE POSITION
  1962. MX0 -18
  1963. AX2 18 RIGHT JUSTIFY TAPE POSITION
  1964. BX6 -X0*X2 ISOLATE TAPE POSITION
  1965. WRITEO CF WRITE TAPE POSITION AS SORT KEY
  1966. WRITEO CF WRITE JUNK AS SECOND WORD OF SORT ENTRY
  1967. WRITEW CF,DBE,DBEL WRITE DATABASE ENTRY INTO SORT ENTRY
  1968. EQ CMP3 LOOP FOR ANOTHER ENTRY
  1969.  
  1970. * PROCESS END OF VALID DATABASE ENTRIES.
  1971.  
  1972. CMP4 UNLOAD DB,R
  1973. SA5 NFP
  1974. ZR X5,CMP20 IF NO FILES TO COPY
  1975. WRITER CF,R FLUSH OUT THE SORT FILE
  1976. REWIND CF,R
  1977. SX5 X5-1 CHECK IF ONLY ONE FILE TO COPY
  1978. ZR X5,CMP5 IF ONLY ONE FILE
  1979. RJ SRT SORT ENTRIES BY TAPE POSITION
  1980. CMP5 READ CF,R START UP READ ON SORTED FILE
  1981. READW CF,CMPB,ITEMSIZ GET FIRST ITEM
  1982.  
  1983. * READY TO REQUEST TAPE.
  1984.  
  1985. SA1 OVV
  1986. SA3 CMPC+DBRFL GET WORD WITH TAPE FLAGS
  1987. LX3 12
  1988. MX6 -12 SET OUTPUT FLAGS SAME AS INPUT
  1989. AX3 48
  1990. BX6 -X6*X3
  1991. SA6 MF+TFLAGS
  1992. BX7 X1 PRESET FOR RING REQUIRED ON OLD DUMP
  1993. ZR X1,CMP6 IF NOT OVERWRITING OLD DUMP
  1994. SX7 B1 SET RING REQUIRED ON OLD DUMP
  1995. CMP6 SA7 TF+TRING SET INPUT DUMP RING STATUS
  1996. NG X3,CMP9 IF NOT A TAPE DUMP
  1997. SX5 B0+ ABORT IF DATABASE NOT FOUND
  1998. SX7 PTRD SET READ MODE FOR DATABASE ATTACH
  1999. RJ LVI LOCATE VSN INDEX
  2000. SA1 OVV
  2001. NZ X1,CMP9 IF OVERWRITING OLD DUMP
  2002. NZ X6,CMP7 IF NO VSN INDEX
  2003. SA1 MF+TTNV
  2004. SA3 MF+TMSV
  2005. NZ X3,CMP7 IF COMPACTING TO MASS STORAGE
  2006. RJ LEF LOCATE EXISTING TAPE FLAGS
  2007. CMP7 SX6 X6+ ISOLATE EXISTING FLAGS
  2008. SA4 MF+TFLAGS GET DEFAULT VALUES
  2009. ZR X6,CMP8 IF NO EXISTING TAPE FLAGS
  2010. SA1 EIV
  2011. BX4 X6 DEFAULT TO EXISTING FLAGS
  2012. NZ X1,CMP8 IF DUMPING AT *EOI*
  2013. BX6 X6-X6 CLEAR EXISTING FLAGS FOR *BOI* DUMP
  2014. CMP8 SX5 MF
  2015. RJ BTF BUILD TAPE FLAGS FOR COMPACTED DUMP
  2016. CMP9 SA3 CMPC+DBRFL TAPE FLAGS FROM DUMP RECORD
  2017. LX3 -36
  2018. SA2 CMPB DESIRED FILE/RECORD
  2019. SA1 OVV
  2020. ZR X1,CMP10 IF NOT OVERWRITING OLD DUMP
  2021. SX2 10001B OVERWRITING - MUST GET FIRST REEL
  2022. CMP10 SA1 TF+TTNV DUMP VSN OR FILE NAME
  2023. RJ LCV LOCATE CURRENT VSN
  2024. SA2 OVV
  2025. SX5 MF SET OUTPUT TAPE FET ADDRESS
  2026. ZR X2,CMP11 IF NOT OVERWRITING ORIGINAL DUMP
  2027. SX6 1
  2028. SA6 FILENUM RESET *MF* FILE COUNTER
  2029. SA6 RECNUM RESET *MF* RECORD COUNTER
  2030. SA6 MF+TRING INDICATE WRITE OPERATION
  2031. SA1 MF+TDFV
  2032. RJ MDL MAKE THE SCRATCH FILE LOCAL
  2033. REWIND MF,R
  2034. EQ CMP13 BEGIN COPYING
  2035.  
  2036. CMP11 RJ ROD REQUEST AND POSITION OUTPUT TAPE
  2037. SA3 MF+TMSV
  2038. SA1 MF+TFETVSN
  2039. ZR X3,CMP12 IF COMPACTING TO TAPE
  2040. SA1 MF+TDNV
  2041. CMP12 BX6 X1
  2042. SA6 CMPD SAVE NEW VSN FOR DATABASE ENTRIES
  2043.  
  2044. * REPEAT COPY ONE FILE UNTIL SORT FILE EMPTY.
  2045.  
  2046. CMP13 SA2 CMPC+DBFNO
  2047. SA3 FILENUM OUTPUT FILE COUNT
  2048. SA4 RECNUM OUTPUT RECORD COUNT
  2049. MX0 -18 MASK FOR FILE/RECORD NUMBERS
  2050. LX0 18
  2051. BX6 X0*X2 CLEAR OLD TAPE POSITION
  2052. LX3 12 POSITION NEW FILE COUNT
  2053. BX3 X3+X4 MERGE FILE AND RECORD NUMBERS
  2054. LX3 18
  2055. BX6 X6+X3 INSERT NEW TAPE POSITION
  2056. SA1 MF+TFLAGS
  2057. MX0 -12 MASK FOR TAPE FLAGS
  2058. LX0 36
  2059. BX6 X0*X6 CLEAR OLD TAPE FLAGS
  2060. LX1 36
  2061. BX6 X1+X6 MERGE IN NEW FLAGS
  2062. SA6 A2 REWRITE POSITION WORD
  2063. SA2 CMPC+DBTNO WORD WITH VSN
  2064. SA3 CMPD GET CORRECT VSN
  2065. MX0 42
  2066. LX6 59-47
  2067. NG X6,CMP14 IF PERMANENT FILE FLAG SET
  2068. MX0 36 SET MASK FOR TAPE VSN
  2069. CMP14 BX6 -X0*X2 SAVE BOTTOM OF VSN WORD
  2070. BX3 X0*X3
  2071. BX6 X3+X6 INSERT NEW VSN
  2072. SA6 A2 REWRITE VSN WORD IN ENTRY
  2073. SA0 CMPC
  2074. RJ POT SHOW FILE BEING PROCESSED
  2075. SA5 CMPB
  2076. RJ PDF POSITION DUMP FILE
  2077. NG X5,CMP21 IF DUMP FILE POSITION ERROR
  2078.  
  2079. * READY TO DO THE COPY.
  2080.  
  2081. SX0 TF SET INPUT FILE FET ADDRESS
  2082. SX5 MF SET OUTPUT FILE FET ADDRESS
  2083. RJ CBR COPY ONE RECORD
  2084. NZ X1,CMP21 IF DUMP FILE POSITION ERROR
  2085. SA1 OVV
  2086. NZ X1,CMP15 IF OVERWRITING ORIGINAL DUMP
  2087. RJ UDV UPDATE OUTPUT DUMP VSN
  2088. CMP15 SA1 CRC
  2089. SX6 X1+B1 INCREMENT INPUT FILE RECORD COUNT
  2090. SA6 A1
  2091. SA4 RECNUM OUTPUT FILE RECORD COUNT
  2092. SX7 X4+B1 INCREMENT OUTPUT FILE RECORD COUNT
  2093. SA7 A4
  2094. WRITEW OPLDF,CMPC,UDBEL
  2095. SA1 RECNUM CHECK OUTPUT RECORD COUNTER
  2096. SX2 7777B MAXIMUM FILES PER TAPE FILE
  2097. IX2 X2-X1 COMPUTE (MAXIMUM - ACTUAL)
  2098. NZ X2,CMP16 IF HAVE NOT REACHED LIMIT
  2099. SA3 FILENUM OUTPUT FILE COUNTER
  2100. SX6 1
  2101. SX7 X3+1 INCREMENT FILE COUNTER
  2102. SA6 A1 RESET OUTPUT RECORD COUNTER
  2103. SA7 A3
  2104. WRITEW MF,TRAILER,1
  2105. WRITEF MF,R
  2106. SA1 OVV
  2107. NZ X1,CMP16 IF OVERWRITING ORIGINAL DUMP
  2108. SX5 MF POINT TO OUTPUT DUMP FET
  2109. RJ UDV UPDATE DUMP VSN
  2110. CMP16 READW CF,CMPB,ITEMSIZ GET NEXT ENTRY
  2111. ZR X1,CMP13 IF ANOTHER ENTRY THEN HANDLE IT
  2112. SA1 RECNUM OUTPUT RECORD COUNTER
  2113. SX1 X1-1 CHECK IF WAS JUST RESET
  2114. ZR X1,CMP17 IF COUNTER WAS RESET JUST ABOVE
  2115. WRITEW MF,TRAILER,1
  2116. WRITEF MF,R
  2117. SA1 OVV
  2118. NZ X1,CMP17 IF OVERWRITING ORIGINAL DUMP
  2119. SX5 MF POINT TO OUTPUT DUMP FET
  2120. RJ UDV UPDATE DUMP VSN
  2121. CMP17 UNLOAD DB,R
  2122. UNLOAD CF
  2123. REWIND TF,R
  2124. SA1 OVV OVERWRITE FLAG
  2125. ZR X1,CMP18 IF NO OVERWRITE
  2126. READ TF,R ENSURE INITIAL REEL MOUNTED
  2127. REWIND TF,R
  2128. REWIND MF,R
  2129. SX0 MF SET INPUT FET ADDRESS
  2130. SX5 TF SET OUTPUT FET ADDRESS
  2131. SA1 TF+TTNV SET OUTPUT VSN FOR OVERWRITE
  2132. RJ CEI COPY WHOLE COMPACTED FILE OVER TAPE
  2133. UNLOAD MF
  2134. EQ CMP19 JOIN WITH NEW TAPE CASE
  2135.  
  2136. * WROTE A NEW TAPE.
  2137.  
  2138. CMP18 SX5 MF SET TAPE FET ADDRESS
  2139. RJ RNT RESERVE AND UNLOAD COMPACTED TAPE
  2140. SX6 B0+ SET DUMP/COMPACT FILE POSITIONS UNKNOWN
  2141. SA6 CFC
  2142. SA6 CRC
  2143. SA6 FILENUM
  2144. SA6 RECNUM
  2145.  
  2146. * READY TO CLEAN UP AND RETURN.
  2147.  
  2148. CMP19 WRITER OPLDF,R
  2149. WRITER NUMBERS,R
  2150. RJ SBU SORT BY USER
  2151. UNLOAD OPLDF,R
  2152. SX5 B0+ FLAG ABORT ON DATABASE ATTACH
  2153. RJ UPD UPDATE DATABASE
  2154. EQ MAIN8 RETURN TO MAIN LOOP
  2155.  
  2156. * NO FILES PROCESSED.
  2157.  
  2158. CMP20 MESSAGE CMPF,3 * NO FILES SELECTED - NO ACTION TAKEN.*
  2159. WRITEC O,CMPF
  2160. EQ MAIN8 RETURN TO MAIN LOOP
  2161.  
  2162. * FILE NOT FOUND WHERE EXPECTED.
  2163.  
  2164. CMP21 UNLOAD DB,R
  2165. UNLOAD CF
  2166. UNLOAD MF
  2167. UNLOAD OPLDF
  2168. UNLOAD NUMBERS
  2169. SX5 TF
  2170. SX1 B0+
  2171. RJ RNT UNLOAD DUMP FILE IF TAPE
  2172. SA1 TF+TDNV PUT DUMP VSN OR FILE NAME INTO MESSAGE
  2173. RJ ZTB
  2174. MX0 18
  2175. SA1 CMPG+3
  2176. BX1 X0*X1
  2177. LX6 42
  2178. BX6 -X0*X6
  2179. BX6 X1+X6
  2180. SA6 A1
  2181. WRITEC O,CMPG
  2182. SA1 NAP
  2183. NZ X1,MAIN8 IF NO ABORT SELECTED
  2184. EQ MAIN7 ABORT *RECLAIM* IF NOT INTERACTIVE
  2185.  
  2186.  
  2187. CMPA DATA C* CT, CN OR OV KEYWORD NOT PRESENT.*
  2188. CMPB BSSZ ITEMSIZ-DBEL
  2189. CMPC BSSZ UDBEL UPDATE ENTRY SIZE
  2190. CMPD DATA 0 CORRECT VSN FOR NEW DATABASE ENTRIES
  2191. CMPF DATA C* NO FILES SELECTED - NO ACTION TAKEN.*
  2192. CMPG DATA C* SEE DAYFILE - UNABLE TO COMPACT XXXXXXX.*
  2193. TITLE PROCESS *COPY* DIRECTIVE.
  2194. COPY SPACE 4,20
  2195. ** COPY - PROCESS *COPY* DIRECTIVE.
  2196. *
  2197. * ENTRY PARAMETERS FROM COMMAND LINE IN *ARMTAB*.
  2198. * ENTERED AT *CPY1* FROM LOAD.
  2199. *
  2200. * EXIT SPECIFIED FILES COPIED TO DISK.
  2201. *
  2202. * ERROR TO *ABT* IF FILE COPY ERRORS AND *NA* NOT SPECIFIED.
  2203. *
  2204. * USES X - ALL.
  2205. * A - 0, 1, 2, 3, 5, 6, 7.
  2206. *
  2207. * CALLS CDF, CTF, PDB, PDF, POT, RDB, RNT, SFC, SRT, UPD, ZTB.
  2208. *
  2209. * MACROS BREAK, MESSAGE, READ, READW, REWIND, SKIPF, SKIPFF,
  2210. * WRITEC, WRITEO, WRITER, WRITEW, UNLOAD.
  2211.  
  2212.  
  2213. COPY BSS 0 ENTRY
  2214. SA1 =10H COPYING, SET UP B-DISPLAY MESSAGE
  2215. BX6 X1
  2216. SA6 BMSG
  2217. SX6 B0+ COPY FLAG
  2218. CPY1 SA6 LOADFLG SAVE LOAD/COPY STATUS
  2219. BX7 X7-X7
  2220. SX6 B1
  2221. SA7 TF+TRING
  2222. SA7 CPYA CLEAR *COPY* TAPE FLAGS
  2223. SA6 LVV ENSURE ONLY LATEST VERSION PROCESSED
  2224. SX6 7777B SET MAXIMUM FILES PROCESSED
  2225. RJ SFC SET FILE COUNT
  2226. SA4 TAPDFLT TAPE DEFAULTS FOR *BTF*
  2227. SX5 TF
  2228. SX6 B0+ IGNORE EXISTING TAPE FLAGS
  2229. RJ BTF BUILD TAPE FLAGS
  2230. SA1 DV
  2231. ZR X1,CPY2 IF DENSITY NOT SPECIFIED
  2232. SA6 CPYA SAVE TAPE FLAGS FOR LATER USE
  2233. CPY2 SA1 DBNAM DATA BASE NAME
  2234. NZ X1,CPY6 IF DATA BASE SPECIFIED
  2235.  
  2236. * PROCESS WITH NO DATABASE
  2237.  
  2238. SA1 TF+TTNV TAPE NAME VARIABLE
  2239. NZ X1,CPY3 IF *TN* OR *DN* WAS GIVEN
  2240. MESSAGE ERTN,3 * TN OR DN MUST BE SPECIFIED.*
  2241. WRITEC O,ERTN
  2242. EQ MAIN8 RETURN TO MAIN LOOP
  2243.  
  2244. CPY3 SX5 TF
  2245. RJ RNT REQUEST NEW TAPE
  2246. REWIND TF,R
  2247. SA1 PFV PERMANENT FILE VARIABLE
  2248. SA2 FNV LOCAL FILE VARIABLE
  2249. BX2 X2+X1
  2250. SX6 B1
  2251. SA6 CFC RESET FILE NUMBER COUNTER
  2252. SX6 B0+
  2253. SA6 CRC RESET RECORD NUMBER COUNTER
  2254. ZR X2,CPY4 IF PF OR NF NOT SET
  2255. RJ PPF PROCESS PERMANENT FILE NAMES
  2256.  
  2257. * CLEAR 6 WORD ENTRY FOR CTF CALL
  2258.  
  2259. CPY4 SX6 B0+
  2260. SA6 SORR
  2261. SA6 A6+B1
  2262. SA6 A6+B1
  2263. SA6 A6+B1
  2264. SA6 A6+B1
  2265. SA6 A6+B1
  2266. SA6 EOIFLG CLEAR EOI ON DUMP FLAG
  2267. SA1 CRC
  2268. SX6 X1+B1 INCREMENT RECORD COUNTER
  2269. MX0 -12
  2270. BX6 -X0*X6
  2271. SA6 A1
  2272. NZ X6,CPY5 IF NOT A PSEUDO FILE POINT
  2273. SA1 CFC
  2274. SX6 X6+B1
  2275. SA6 A1
  2276. CPY5 SA5 SORR
  2277. RJ CTF
  2278. SA1 EOIFLG EOI ON DUMP ENCOUNTERED FLAG
  2279. NZ X1,MAIN8 IF EOI ENCOUNTERED THEN CLEAR UP
  2280. EQ CPY4 LOOP FOR NEXT ENTRY
  2281.  
  2282. CPY6 SA1 UNV
  2283. SA2 TF+TTNV
  2284. BX5 X1 SET DB CREATION MODE VIA UN OPTION
  2285. ZR X2,CPY7 IF TN WAS NOT ENTERED
  2286. SA1 PDBC POINT TO WORKING USER NAME LOCATION
  2287. SX1 B0+ SET UP TO SCAN THE ENTIRE DATABASE
  2288. CPY7 SX7 PTRD
  2289. RJ PDB POSITION DATA BASE
  2290.  
  2291. * WRITE FILE OF DATABASE ENTRIES TO PROCESS.
  2292.  
  2293. WRITE CF,* PRESET WRITE FUNCTION
  2294. CPY8 RJ RDB READ ENTRY FROM DATA BASE
  2295. NZ X1,CPY10 IF NO MORE
  2296. BREAK CHECK FOR INTERRUPT
  2297. SA1 DBE+DBPFN EXTRACT FILE NAME
  2298. BX6 X0*X1
  2299. SA1 DBE+DBFTY
  2300. LX1 24
  2301. BX2 -X0*X1
  2302. BX6 X2+X6
  2303. SA6 SORR
  2304. LX1 18
  2305. BX6 -X0*X1
  2306. SA2 DBE+DBFLG WORD WITH TAPE FLAGS
  2307. LX2 59-47
  2308. NG X2,CPY9 IF PERMANENT FILE FLAG SET
  2309. MX0 36 SET MASK FOR TAPE VSN
  2310. CPY9 SA1 DBE+DBTNO GET TN
  2311. BX1 X0*X1
  2312. BX6 X1+X6
  2313. WRITEO CF
  2314. WRITEW CF,SORR,1
  2315. WRITEW CF,DBE,DBEL
  2316. EQ CPY8 LOOP FOR NEXT ENTRY
  2317.  
  2318. CPY10 UNLOAD DB,R
  2319. SA1 NFP
  2320. NZ X1,CPY11 IF THERE ARE FILES TO COPY/LOAD
  2321. SA1 USERDB
  2322. ZR X1,MAIN8 IF NOT A USER DATABASE
  2323. SA1 TF+TTNV
  2324. ZR X1,MAIN8 IF NO *TN* PARAMETER
  2325. SA1 TNN OCCURRENCES OF TN ON DATABASE
  2326. NZ X1,MAIN8 IF VSN FOUND ON DATABASE
  2327. NG X1,MAIN8 IF VSN FOUND FOR OTHER USER NAME
  2328. SA1 UNV
  2329. ZR X1,MAIN8 IF UN=0 WAS SPECIFIED
  2330. RJ CDF CREATE DATABASE FILE
  2331. SA1 TNN
  2332. ZR X1,MAIN8 IF NO FILES ADDED TO DATA BASE
  2333. SX5 -1 FLAG DEFINE ONLY
  2334. RJ UPD UPDATE DATABASE
  2335. SA1 LOADFLG
  2336. BX6 X1 SET COPY
  2337. EQ CPY1 RESTART THIS COPY
  2338.  
  2339. CPY11 WRITER CF,R
  2340. REWIND CF,R
  2341. RJ SRT MERGE SORT THE ENTRIES
  2342. READ CF
  2343. SX5 B0+ ABORT IF DATABASE NOT FOUND
  2344. SX7 PTRD SET READ MODE FOR DATABASE ATTACH
  2345. RJ LVI LOCATE VSN INDEX
  2346.  
  2347. * WHILE NOT EOF(CF) DO ONE ENTRY.
  2348.  
  2349. CPY12 BREAK
  2350. READW CF,SORR,ITEMSIZ
  2351. NZ X1,CPY14 IF END OF RECORD/FILE/INFO
  2352. SA0 SORR+2 ADDRESS OF DATABASE ENTRY
  2353. RJ POT TELL WHAT FILE WE ARE DOING
  2354. SA1 SORR
  2355. SA2 CPYA
  2356. SA3 A1+B1 GET TAPE FLAGS
  2357. ZR X2,CPY13 IF DENSITY NOT SPECIFIED
  2358. BX6 X2-X3
  2359. SX5 4400B CHECK DISK/TAPE AND NT/MT
  2360. BX6 X5*X6
  2361. NZ X6,CPY13 IF DISK/TAPE OR NT/MT MISMATCH
  2362. BX3 X2 SUBSTITUTE SPECIFIED FLAGS
  2363. CPY13 BX2 X1 GET FILE AND RECORD NUMBER INTO X2
  2364. RJ LCV LOCATE CURRENT VSN, REQUEST TAPE
  2365. SA5 SORR
  2366. RJ PDF POSITION DUMP FILE
  2367. NG X5,CPY15 IF AN ERROR HAS OCCURRED
  2368. SA5 SORR
  2369. RJ CTF
  2370. SA1 CRC INCREMENT CURRENT RECORD COUNT
  2371. SX6 X1+B1
  2372. SA6 A1
  2373. SX5 TF
  2374. RJ UFV UPDATE FET VSN
  2375. EQ CPY12 PROCESS NEXT ENTRY
  2376.  
  2377. CPY14 UNLOAD CF,R
  2378. UNLOAD DB,R UNLOAD DATABASE
  2379. EQ MAIN8 RETURN TO MAIN LOOP
  2380.  
  2381. * COPY ABORT.
  2382.  
  2383. CPY15 REWIND TF,R
  2384.  
  2385. * BUILD ERROR MESSAGE.
  2386.  
  2387. SA1 SORR+1
  2388. MX0 42
  2389. BX1 X0*X1 FILE NAME
  2390. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  2391. MX0 42
  2392. SA1 LDNG+3
  2393. BX6 X0*X6 EXTRACT TOP SEVEN CHARACTERS
  2394. BX1 -X0*X1 BOTTOM OF MESSAGE
  2395. BX6 X6+X1 MERGE PIECES TOGETHER
  2396. SA6 LDNG+3
  2397.  
  2398. * CHECK RA+0 TO SEE IF WE TOOK AN ERROR EXIT OR FELL
  2399. * THROUGH FROM *CPY15*. IF THERE WAS NO ERROR EXIT THEN
  2400. * ENSURE TAPE AND VARIABLES SHOW -EOR- ON TAPE.
  2401.  
  2402. SA2 B0 FETCH RA+0
  2403. AX2 24 IGNORE SENSE SWITCHES, IF ANY
  2404. NZ X2,CPY17 IF THERE WAS AN ERROR EXIT THEN STOP NOW
  2405. WRITEC O,LDNG * SEE DAYFILE - UNABLE TO LOAD XXXXXXX.*
  2406. RJ ILC INCREMENT LINE COUNT
  2407. MX0 -7 WIDTH OF *CIO* FUNCTION CODE
  2408. SA1 TF
  2409. LX0 2 SKIP BINARY/CODED AND COMPLETE BITS
  2410. BX1 -X0*X1 EXTRACT FUNCTION CODE/STATUS
  2411. SX1 X1-17B POS. IF EOR/EOF, NEG. IF COMPLETE READ
  2412. PL X1,CPY16 IF READ HIT AN EOR/EOF
  2413. SKIPF TF,1,R SKIP TO END OF CURRENT RECORD
  2414. CPY16 SA1 CRC CURRENT RECORD COUNT
  2415. SX6 X1+B1 INCREMENT RECORD COUNT
  2416. SA6 A1 JUST IN CASE *NA* SET
  2417. SA1 NAP
  2418. NZ X1,CPY12 IF NO ABORT PARAMETER SELECTED
  2419. CPY17 UNLOAD CF
  2420. EQ ABT ABORT *RECLAIM*
  2421.  
  2422.  
  2423. CPYA BSS 1 STORAGE FOR SPECIFIED TAPE FLAGS
  2424. TITLE PROCESS *DELETE*/*RESET* DIRECTIVES.
  2425. DELETE SPACE 4,20
  2426. ** DELETE - PROCESS *DELETE*/*RESET* DIRECTIVES.
  2427. *
  2428. * ENTRY *COPTION* INDICATES *DELETE* OR *RESET* DIRECTIVE.
  2429. *
  2430. * EXIT *DELETE*/*RESET* COMPLETE.
  2431. *
  2432. * USES X - 0, 1, 2, 3, 5, 6, 7.
  2433. * A - 0, 1, 2, 3, 5, 6, 7.
  2434. * B - 4.
  2435. *
  2436. * CALLS CRI, PDB, POT, SFC.
  2437. *
  2438. * MACROS CLEAR, READ, REWRITE, REWRITER.
  2439.  
  2440.  
  2441. DELETE BSS 0 ENTRY
  2442. SX7 PTWR SET WRITE MODE FOR ATTACH
  2443. SX5 B0+ FLAG ABORT IF ATTACH FAILS
  2444. SA1 UNV SET FOR CURRENT USER NAME
  2445. RJ PDB POSITION DATA BASE
  2446. PL X5,DLT1 IF USER RECORD FOUND
  2447. MESSAGE ERND,3 * NO DATA FOUND FOR USER NAME.*
  2448. WRITEC O,ERND
  2449. EQ MAIN8 RETURN TO MAIN LOOP
  2450.  
  2451. DLT1 SX6 B1
  2452. ZR X5,DLT2 IF USERNAME NOT SELECTION CRITERION
  2453. BX6 X5 SAVE RANDOM ADDRESS OF USER
  2454. DLT2 SA6 DLTA SAVE RANDOM INDEX
  2455. SX6 377777B SET DEFAULT FILE COUNT
  2456. RJ SFC SET FILE COUNT
  2457. SX6 B0+
  2458. SA6 DLTC
  2459. SA6 DLTB
  2460. SA6 LAD
  2461. SA5 PFV
  2462. MX6 -1
  2463. LX5 6
  2464. SA6 DLTD
  2465. SX5 X5-1R*
  2466. NZ X5,DLT4 IF NO PF=*
  2467. RJ PPF PROCESS PERMANENT FILES
  2468. EQ DLT4 CHECK FOR EOI ON DATABASE
  2469.  
  2470. * SAVE RANDOM INDEX FROM PREVIOUS READ.
  2471.  
  2472. DLT3 CLEAR DB CLEAR FET POINTERS
  2473. MX0 30
  2474. SA1 DB+6
  2475. BX6 X0*X1 CURRENT RANDOM INDEX
  2476. LX6 30
  2477. SA6 DLTA
  2478. READ DB,R
  2479.  
  2480. * CHECK FOR EOI ON DATABASE.
  2481.  
  2482. DLT4 SA5 DB
  2483. LX5 59-9
  2484. NG X5,DLT14 IF HIT EOI
  2485. SX6 B0 RESET DELETE COUNT FOR CURRENT BUFFER
  2486. SA6 DLTC
  2487. LX5 9-59 MOVE FET FIRST WORD BACK IN PLACE
  2488. MX0 -6
  2489. BX5 -X0*X5 EXTRACT BUFFER FULL/EOR/EOF STATUS
  2490. SX6 X5-17B .GT. 0 IF SHORT PRU, .LT. 0 IF BUFFER FULL
  2491. SA6 DLTD SAVE RESULT FOR REWRITE
  2492. SA1 DB+3 OUT
  2493. SX6 X1-DBEL
  2494. SA6 DLTB ADDRESS OF CURRENT RECORD BEING READ
  2495.  
  2496. * CHECK FOR EMPTY READ -- I.E. DISK ERROR.
  2497.  
  2498. SA2 DB+2 IN
  2499. BX1 X1-X2
  2500. ZR X1,DLT3 IF EMPTY READ
  2501.  
  2502. * IF *RESET* SET DELETE VARIABLE TO FOOL *CRI*.
  2503.  
  2504. SA1 COPTION
  2505. SA2 =0LRESET
  2506. BX6 X1-X2
  2507. NZ X6,DLT5 IF *DELETE* DIRECTIVE*
  2508. SX6 B1+
  2509. SA6 DEV
  2510. DLT5 SA1 DLTB
  2511. SA2 DB+2 IN
  2512. SX6 X1+DBEL
  2513. IX2 X6-X2
  2514. PL X2,DLT14 IF CURRENT BUFFER EXHAUSTED
  2515. SA6 A1
  2516. SA0 X6 KEEP *CRI* HAPPY
  2517. SX5 -1 PRESET EXIT FLAG
  2518. MX0 42
  2519. SA1 X6
  2520. SA2 OPLDH OPLD HEADER
  2521. BX2 X1-X2
  2522. BX1 X0*X1 USER NAME
  2523. ZR X2,DLT14 IF OPLD RECORD (NO MORE USER NAMES)
  2524. SA2 VSNDX VSN INDEX IDENTIFIER
  2525. BX2 X1-X2
  2526. ZR X2,DLT14 IF VSN INDEX (NO MORE USER NAMES)
  2527. SA2 UNV
  2528. ZR X2,DLT6 IF UN=0 IN EFFECT
  2529. BX2 X0*X2 STRIP PRU COUNT
  2530. BX1 X1-X2
  2531. NZ X1,DLT14 IF DONE PROCESSING SELECTED USER NAME
  2532. DLT6 RJ CRI CHECK CRITERIA
  2533.  
  2534. * IF *CRI* RETURNS A NONZERO RESULT (CRITERIA NOT MET) THE
  2535. * RESULT MAY BE NEGATIVE. THIS MUST BE REMOVED FOR THE
  2536. * TEST AT *DLT17*.
  2537.  
  2538. SX1 B0+
  2539. IX5 X5+X1 REMOVE ANY NEGATIVE ZERO, JUST IN CASE
  2540. CX5 X5 MAKE POSSIBLY NEGATIVE RESULT POSITIVE
  2541. NZ X5,DLT5 IF CURRENT RECORD DOES NOT MEET CRITERIA
  2542.  
  2543. * DECIDE WHETHER *RESET* OR *DELETE* WAS CALLED.
  2544.  
  2545. SA3 DEV IF SET -- RESET OPTION CALLED
  2546. MX7 1 PRESET DELETE BIT
  2547. SA1 A0+DBFLG
  2548. NZ X3,DLT7 IF RESET
  2549. NG X1,DLT5 IF FILE DELETED PREVIOUSLY
  2550. BX7 X7+X1 SET DELETE FLAG
  2551. EQ DLT8 CHECK FILE LIMIT
  2552.  
  2553. DLT7 PL X1,DLT5 IF FILE NOT DELETED
  2554. BX7 -X7*X1 CLEAR DELETE FLAG
  2555.  
  2556.  
  2557. * CHECK FILE LIMIT/INCREMENT FILE COUNT.
  2558.  
  2559. DLT8 SA2 PFV
  2560. LX2 6
  2561. SX2 X2-1R*
  2562. NZ X2,DLT12 IF NOT PF=*
  2563. SA2 PFTAB-1
  2564. MX0 42
  2565. SA3 A0+DBPFN
  2566. BX3 X0*X3
  2567. DLT9 SA2 A2+B1
  2568. ZR X2,DLT10 IF END OF PFTAB TABLE
  2569. BX6 X0*X2
  2570. BX6 X6-X3
  2571. NZ X6,DLT9 IF NOT CORRECT FILE IN TABLE
  2572. SA3 DEV DELETE FLAG
  2573. ZR X1,DLT11 IF NOT *RESET*
  2574. SA3 EXV EXCEPTION PROCESSING FLAG
  2575. ZR X3,DLT11 IF NOT EXCEPTION PROCESSING
  2576. IX5 X5-X5 CLEAR ALL DONE FLAG
  2577. EQ DLT14 DO NOT PROCESS THIS FILE
  2578.  
  2579. DLT10 SA3 DEV DELETE FLAG
  2580. ZR X3,DLT12 IF NOT *RESET*
  2581. SA3 EXV EXCEPTION FLAG
  2582. NZ X3,DLT12 IF NOT EXCEPTION PROCESSING
  2583. IX5 X5-X5 CLEAR ALL DONE FLAG
  2584. EQ DLT14 DO NOT PROCESS THIS FILE
  2585.  
  2586. DLT11 BX2 -X0*X2
  2587. SA3 NFP
  2588. SX6 X3+1
  2589. IX3 X6-X2
  2590. SA2 NFV
  2591. IX2 X2-X3
  2592. SX2 X2-1
  2593. NG X2,DLT14 IF FILE LIMIT EXCEEDED FOR THIS FILE
  2594. EQ DLT13 INCREMENT FILE COUNT
  2595.  
  2596. DLT12 SA2 NFV
  2597. SA3 NFP
  2598. SX6 X3+1
  2599. IX5 X2-X6
  2600. NG X5,DLT14 IF FILE LIMIT EXCEEDED -- EXIT FLAG SET
  2601. DLT13 SA6 A3
  2602. SX6 B1 SET CURRENT BUFFER DELETE/RESET FLAG
  2603. SA6 DLTC
  2604.  
  2605. * SET DELETE/RESET FLAG.
  2606.  
  2607. SA7 A1
  2608. RJ POT PROCESS OUTPUT
  2609. EQ DLT5 CONTINUE BUFFER PROCESSING
  2610.  
  2611. * REWRITE CURRENT BUFFER IF RECORDS TO BE CHANGED.
  2612.  
  2613. DLT14 SA1 DLTC DELETE FLAG FOR CURRENT BUFFER
  2614. SB4 X1
  2615. ZR B4,DLT17 IF NO DELETES FOR THIS BUFFER
  2616.  
  2617. * PREPARE REWRITE - MOVE PREVIOUS RANDOM REWRITE VALUE
  2618. * AND SET REWRITE BIT IN FET+6.
  2619.  
  2620. SA1 DLTA
  2621. SX6 B1
  2622. LX6 29
  2623. BX6 X6+X1
  2624. SA6 DB+6
  2625.  
  2626. * REWRITE CURRENT BUFFER -- IF EOR STATUS PERFORM *REWRITER*.
  2627.  
  2628. SA1 DLTD
  2629. PL X1,DLT15 IF A SHORT PRU
  2630. REWRITE DB,R
  2631. EQ DLT16 REJOIN WITH REWRITER
  2632.  
  2633. * SHORT PRU TO REWITE.
  2634.  
  2635. DLT15 REWRITER DB,R
  2636. SX6 -1
  2637. SA6 DLTD RESET TO FULL PRU JUST IN CASE
  2638.  
  2639. * CLEAR RANDOM REWRITE BIT.
  2640.  
  2641. DLT16 SA1 DB+6
  2642. MX0 30
  2643. BX6 X0*X1
  2644. SA6 A1
  2645. DLT17 NG X5,MAIN8 IF ALL DONE
  2646. EQ DLT3 READ NEXT BUFFER
  2647.  
  2648.  
  2649. DLTA DATA 0 PREVIOUS RANDOM INDEX ON DATABASE
  2650. DLTB DATA 0 ADDRESS OF CURRENT RECORD BEING READ
  2651. DLTC DATA 0 DELETE FLAG FOR CURRENT BUFFER
  2652. DLTD DATA -1 DEFAULT FULL PRU REWRITE
  2653. TITLE PROCESS *DUMP* DIRECTIVE.
  2654. DUMP SPACE 4,20
  2655. ** DUMP - PROCESS *DUMP* DIRECTIVE.
  2656. *
  2657. * ENTRY NONE.
  2658. *
  2659. * EXIT FILES DUMPED TO TAPE.
  2660. *
  2661. * ERROR TO *ABT* IF TAPE ALREADY HAS 63 DUMPS ON IT.
  2662. *
  2663. * USES X - ALL.
  2664. * A - 0, 1, 2, 3, 5, 6, 7.
  2665. *
  2666. * CALLS ADB, BTF, CDF, CDR, CRI, CVT, DFT, POT,
  2667. * RNT, SDE, SFC, UPD.
  2668. *
  2669. * MACROS BREAK, CATLIST, CLEAR, MESSAGE, READ, READO, REWIND,
  2670. * SKIPFF, UNLOAD, WRITEC, WRITEF, WRITER, WRITEW.
  2671.  
  2672.  
  2673. DUMP BSS 0 ENTRY
  2674. SA1 =10H DUMPING, SET UP B-DISPLAY MESSAGE
  2675. BX6 X1
  2676. SA6 BMSG
  2677. SX6 7777B MAXIMUM FILES DUMPED PER DIRECTIVE
  2678. RJ SFC SET FILE COUNT LIMIT
  2679. SA1 USERDB
  2680. NZ X1,DMP1 IF A USER DATABASE
  2681. SA1 ACCESS
  2682. NZ X1,DMP1 IF A PRIVILEGED USER
  2683. MESSAGE DMPA,3 * DUMP DENIED FOR SPECIFIED DATABASE.*
  2684. WRITEC O,DMPA
  2685. EQ MAIN RETURN TO MAIN LOOP
  2686.  
  2687. DMP1 SA1 TF+TMSV MASS STORAGE VARIABLE
  2688. NZ X1,DMP2 IF DUMP FILE IS MASS STORAGE
  2689. SA1 TF+TTNV TAPE NAME VARIABLE
  2690. NZ X1,DMP2 IF TN SPECIFIED
  2691. MESSAGE ERTN,3 * TN OR DN MUST BE SPECIFIED.*
  2692. WRITEC O,ERTN
  2693. EQ MAIN RETURN TO MAIN LOOP
  2694.  
  2695. DMP2 SX7 PTWR SET TO ATTACH DATA BASE IN WRITE MODE
  2696. SX5 -1 SET TO CREATE DATA BASE IF NOT FOUND
  2697. RJ LVI SET DATABASE IN WRITE MODE AT VSN INDEX
  2698. NZ X6,DMP3 IF NO VSN INDEX
  2699. SA1 TF+TTNV
  2700. SA3 TF+TMSV
  2701. RJ LEF LOCATE EXISTING TAPE FLAGS
  2702. DMP3 SX6 X6+
  2703. SA4 TAPDFLT SET DEFAULT TAPE FLAGS
  2704. ZR X6,DMP4 IF NO EXISTING TAPE FLAGS
  2705. SA1 EIV
  2706. BX4 X6 DEFAULT TO EXISTING FLAGS
  2707. NZ X1,DMP4 IF DUMPING AT *EOI*
  2708. BX6 X6-X6 CLEAR EXISTING FLAGS FOR *BOI* DUMP
  2709. DMP4 SX5 TF
  2710. RJ BTF BUILD TAPE FLAGS
  2711. SA1 PFV PERMANENT FILE VARIABLE
  2712. SA2 FNV LOCAL FILE VARIABLE
  2713. IX6 X1+X2
  2714. ZR X6,DMP5 IF NOT PART OF CRITERIA
  2715. RJ PPF PROCESS PERMANENT FILE CRITERIA
  2716. DMP5 WRITE OPLDF,* PRESET WRITE FUNCTION
  2717. SA0 DBE
  2718. MX6 0
  2719. SA6 CAT+CFPN CLEAR CATLIST FILE NAME
  2720. DMP6 SA1 PFTAB
  2721. ZR X1,DMP9 IF NO PERMANENT FILE LIST
  2722. SA1 EXV
  2723. NZ X1,DMP9 IF EXCEPTION PROCESSING IN EFFECT
  2724. SA2 PFCNT GET PFTAB POINTER
  2725. SA1 PFTAB+X2 PFTAB(PFCNT)
  2726. ZR X1,DMP21 IF ALL FILES PROCESSED
  2727. MX0 42
  2728. BX6 -X0*X1
  2729. BX1 X0*X1 ISOLATE FILE NAME
  2730. LX6 58 POSITION TO LOCAL FILE FLAG
  2731. PL X6,DMP8 IF FILE NOT LOCAL
  2732. SA2 CATSKL
  2733. BX2 -X0*X2 ISOLATE USER INDEX
  2734. BX6 X1+X2 MERGE FILE NAME AND USER INDEX
  2735. SA6 CATBUF
  2736. SA2 FIBK
  2737. BX2 -X0*X2
  2738. BX6 X1+X2
  2739. SA6 A2+ SET FILE NAME INTO *FILINFO* BUFFER
  2740. FILINFO FIBK
  2741. SA1 FIBLEN GET FILE LENGTH IN SECTORS
  2742. MX0 24
  2743. BX6 X0*X1
  2744. SA1 TYV TYPE VARIABLE
  2745. LX1 6
  2746. SX2 X1-1RI
  2747. ZR X2,DMP7 IF FILE IS TO BE INDIRECT
  2748. SX2 4000B DIRECT FLAG
  2749. BX6 X2+X6
  2750. DMP7 SA6 CATBUF+FCLF SAVE FILE SIZE AND TYPE
  2751. MOVE NWCE-2,CATSKL+2,CATBUF+2 MOVE REST OF DUMMY PFC
  2752. EQ DMP11 PROCESS CATLIST INFORMATION
  2753.  
  2754. DMP8 BX6 X1
  2755. SA6 CATBUF SAVE FILE NAME
  2756. SX0 4+1 SET *SA* AND *EP* BITS IN FET
  2757. LX0 44
  2758. SA1 CAT+B1 FET +1
  2759. BX6 X0+X1
  2760. SA6 A1
  2761. CATLIST CAT,CATBUF
  2762. MOVE NWCE,CLSBUF,CATBUF MOVE TO WORKING BUFFER
  2763. CLEAR CAT
  2764. SA2 CAT+1 CLEAR *SA* AND *EP* BITS
  2765. SX0 4+1
  2766. LX0 44
  2767. BX6 -X0*X2
  2768. SA6 A2+
  2769. SA1 CAT CHECK FOR ERRORS
  2770. MX0 8
  2771. LX0 17-59 POSITION MASK FOR ERROR CODE FIELD
  2772. BX2 X0*X1
  2773. ZR X2,DMP11 IF NO ERROR
  2774. SA1 PFCNT POINTER IN PFTAB
  2775. SX6 X1+B1
  2776. SA6 A1 INCREMENT COUNTER
  2777. EQ DMP6 PROCESS NEXT ENTRY
  2778.  
  2779. DMP9 CATLIST CAT FILL *CATLIST* BUFFER
  2780.  
  2781. DMP10 READW CAT,CATBUF,NWCE READ CATALOG ENTRY
  2782. ZR X1,DMP11 IF ENTRY AVAILABLE
  2783. SX1 X1+2
  2784. ZR X1,DMP21 IF END OF CATALOG
  2785. EQ DMP9 REFILL BUFFER
  2786.  
  2787. DMP11 SA3 CATBUF
  2788. RJ CDR CREATE DATABASE RECORD FROM CATLIST
  2789. SA5 RSV
  2790. ZR X5,DMP14 IF FILE RESIDENCE NOT SPECIFIED
  2791. LX5 59-4 CHECK FOR DISK RESIDENCE
  2792. PL X5,DMP12 IF DISK RESIDENCE NOT SPECIFIED
  2793. MX0 -12
  2794. SA1 CATBUF+FCBT
  2795. LX0 12
  2796. BX1 -X0*X1
  2797. NZ X1,DMP14 IF DISK RESIDENT
  2798. DMP12 LX5 59-3-59+4 CHECK FOR CARTRIDGE RESIDENCE
  2799. MX0 -36
  2800. PL X5,DMP13 IF CARTRIDGE RESIDENCE NOT SPECIFIED
  2801. SA1 CATBUF+FCAA
  2802. BX0 -X0*X1
  2803. LX1 59-48
  2804. ZR X0,DMP13 IF NOT CARTRIDGE RESIDENT
  2805. PL X1,DMP14 IF CARTRIDGE COPY NOT OBSOLETE
  2806. DMP13 LX5 59-20-59+3
  2807. MX0 -24
  2808. PL X5,DMP15 IF RESIDENCE CRITERIA NOT MET
  2809. SA1 CATBUF+FCTV
  2810. BX1 -X0*X1
  2811. ZR X1,DMP15 IF RESIDENCE CRITERIA NOT MET
  2812. DMP14 RJ CRI CHECK CRITERIA
  2813. ZR X5,DMP16 IF CRITERIA MET
  2814. DMP15 SA1 PFTAB PERMANENT FILE TABLE
  2815. ZR X1,DMP10 IF NO FILES SPECIFIED
  2816. SA1 EXV
  2817. NZ X1,DMP10 IF EXCEPTION PROCESSING IN EFFECT
  2818. SA1 PFCNT POINTER TO CURRENT FILE IN PFTAB
  2819. SX6 X1+B1 INCREMENT POINTER
  2820. SA6 A1
  2821. EQ DMP6 GET NEXT FILE NAME
  2822.  
  2823. DMP16 SA1 NFV NUMBER OF FILES PROCESSED
  2824. SA2 NFP NUMBER OF FILES PROCESSED
  2825. SX6 X2+1
  2826. IX5 X1-X6
  2827. NG X5,DMP21 IF USER LIMIT EXCEEDED
  2828. SX1 7777B MAXIMUM FILES DUMPED AT ONCE
  2829. IX5 X1-X6 COMPUTE (MAXIMUM-ACTUAL)
  2830. NG X5,DMP21 IF IMPOSED FILE LIMIT EXCEEDED
  2831. NZ X2,DMP17 IF TAPE ALREADY ASSIGNED
  2832. SX5 TF
  2833. RJ ROD REQUEST AND POSITION DUMP
  2834. SA1 DBE+DBFNO
  2835. SA2 CFC GET ACTUAL POSITION FOR DATABASE ENTRY
  2836. SA3 CRC
  2837. MX0 -30 MASK FOR TAPE FLAGS, FILE AND RECORD
  2838. LX0 18 POSITION MASK FOR FLAGS, FILE AND RECORD
  2839. BX1 X0*X1 REMOVE ANY DEBRIS
  2840. LX2 30 POSITION FILE NUMBER
  2841. LX3 18 POSITION RECORD NUMBER
  2842. BX6 X2+X3 MERGE FILE AND RECORD NUMBERS
  2843. SA2 TF+TFLAGS GET TAPE FLAGS, WHICH MAY HAVE CHANGED
  2844. BX6 X1+X6
  2845. LX2 36
  2846. BX6 X2+X6 MERGE IN NEW TAPE FLAGS
  2847. SA6 A1+
  2848. DMP17 RJ DFT DUMP FILE TO TAPE
  2849. NZ X1,DMP20 IF ERROR IN DUMPING FILE
  2850. SX5 TF
  2851. RJ UDV UPDATE DUMP VSN
  2852. SA1 CRC
  2853. SX6 X1+B1
  2854. SA6 A1 UPDATE RECORD NUMBER
  2855. SA1 NFP
  2856. SX6 X1+B1
  2857. SA6 A1 UPDATE NUMBER OF FILES PROCESSED
  2858. MX0 42
  2859. SA1 NNV NEW NAME VARIABLE
  2860. BX6 X0*X1
  2861. NZ X6,DMP18 IF NO NEW NAME
  2862. SA1 DBE+DBUNM NNTAB OFFSET
  2863. BX6 -X0*X1
  2864. ZR X6,DMP19 IF NO NEW NAME
  2865. SA1 X6
  2866. BX6 X0*X1
  2867. DMP18 SA1 DBE+DBPFN GET THE OLD FILE NAME
  2868. BX1 -X0*X1 MASK OFF DUMP DATE
  2869. BX6 X6+X1 NEW PFN AND DUMP DATE
  2870. SA6 A1
  2871. DMP19 SA1 TF+TTNV GET VSN IN CASE ASSIGNED BY TMS
  2872. MX0 42
  2873. BX6 X0*X1 ISOLATE VSN
  2874. SA1 DBE+DBTNO VSN IN DATABASE RECORD
  2875. BX1 -X0*X1 CLEAR THE VSN FIELD
  2876. BX6 X1+X6 MERGE IN SET VSN
  2877. SA6 A1
  2878. WRITEW OPLDF,A0,UDBEL
  2879. SX6 1 IGNORE BREAKS
  2880. SA6 NOBREAK
  2881. RJ POT
  2882. SX6 B0+ DEAL WITH BREAKS AGAIN
  2883. SA6 NOBREAK
  2884. SA1 BREAK
  2885. NZ X1,DMP21 IF USER INTERRUPT FLAG SET
  2886. DMP20 SA1 PFTAB PERMANENT FILE TABLE
  2887. ZR X1,DMP10 IF FILE NAME NOT PART OF CRITERIA
  2888. SA1 EXV
  2889. NZ X1,DMP10 IF EXCEPTION PROCESSING IN EFFECT
  2890. EQ DMP6 PROCESS NEXT FILE
  2891.  
  2892. DMP21 SA1 NFP CHECK NUMBER OF FILES DUMPED
  2893. ZR X1,DMP23 IF NOTHING DUMPED DO NOT UPDATE DATA BASE
  2894. WRITEW TF,TRAILER,B1 END-OF-DUMP CONTROL WORD
  2895. WRITEF TF,R
  2896. SX5 TF
  2897. RJ UDV UPDATE DUMP VSN
  2898. WRITER OPLDF,R CLOSE OFF DATABASE UPDATE FILE
  2899. WRITER NUMBERS,R CLOSE OFF TAPE NUMBERS FILE
  2900. RJ SDE SORT DATABASE RECORDS
  2901. CLEAR NEW
  2902. UNLOAD OPLDF,R
  2903. SA1 EIV CHECK IF EOI DUMP
  2904. ZR X1,DMP22 IF AN INITIAL DUMP
  2905. SA1 DBDEFLG
  2906. ZR X1,DMP22 IF DATABASE WAS NOT DEFINED
  2907. RJ CDF CREATE UPDATES FOR WHOLE TAPE
  2908. SX5 B0+ SET ABORT IF ATTACH FAILS
  2909. DMP22 RJ UPD UPDATE DATABASE
  2910. DMP23 MX6 2 SET END OF INFORMATION INDICATOR
  2911. LX6 1
  2912. SA6 CRC
  2913. EQ MAIN8 RETURN TO MAIN LOOP
  2914.  
  2915.  
  2916. DMPA DATA C* DUMP DENIED FOR SPECIFIED DATABASE.*
  2917. TITLE PROCESS *END* DIRECTIVE.
  2918. END SPACE 4,15
  2919. ** END - PROCESS *END* DIRECTIVE.
  2920. *
  2921. * ENTRY NONE.
  2922. *
  2923. * EXIT TAPE UNLOADED.
  2924. * OUTPUT BUFFER FLUSHED.
  2925. * * RECLAIM COMPLETE.* ISSUED TO DAYFILE.
  2926. * *RECLAIM* TERMINATED.
  2927. *
  2928. * USES X - 1, 5.
  2929. *
  2930. * CALLS RNT.
  2931. *
  2932. * MACROS ENDRUN, MESSAGE, WRITER.
  2933.  
  2934.  
  2935. END BSS 0 ENTRY
  2936. SA1 TF+TFLAGS CURRENT TAPE FLAGS
  2937. LX1 59-11
  2938. NG X1,END1 IF MASS STORAGE FILE
  2939. SX5 TF SET TAPE FET ADDRESS
  2940. SX1 B0+ FLAG ONLY UNLOAD TAPE
  2941. RJ RNT RESERVE TAPE IF NECESSARY AND UNLOAD
  2942. END1 SA1 RECSET
  2943. ZR X1,END2 IF CHARACTER SET MODE NOT CHANGED
  2944. CSET RESTORE RESTORE ORIGINAL CHARACTER SET MODE
  2945. END2 WRITER O,R
  2946. MESSAGE ENDA,3 * RECLAIM COMPLETE.*
  2947. ENDRUN
  2948.  
  2949.  
  2950. ENDA DATA C* RECLAIM COMPLETE.*
  2951. TITLE PROCESS *LIST* DIRECTIVE.
  2952. LIST SPACE 4,15
  2953. ** LIST - PROCESS *LIST* DIRECTIVE.
  2954. *
  2955. * ENTRY NONE.
  2956. *
  2957. * EXIT LIST PRODUCED.
  2958. * INFORMATION RECOVERY ATTEMPTED FOR *TN* IF NOT FOUND
  2959. * IN DATABASE.
  2960. *
  2961. * USES X - 1, 5, 6, 7.
  2962. * A - 0, 1.
  2963. *
  2964. * CALLS CDF, PDB, POT, RDB, SFC, UPD.
  2965.  
  2966.  
  2967. LIST BSS 0 ENTRY
  2968.  
  2969. * POSITION FOR DATABASE READING.
  2970.  
  2971. SA1 DBNAM
  2972. ZR X1,LST3 IF NO DATA BASE
  2973. SA1 UNV
  2974. SA2 TF+TTNV
  2975. BX5 X1 SET DB CREATION MODE VIA UN OPTION
  2976. ZR X2,LIST0 IF TN WAS NOT ENTERED
  2977. SA1 PDBC POINT TO WORKING USER NAME LOCATION
  2978. SX1 B0+ SET UP TO SCAN THE ENTIRE DATABASE
  2979. LIST0 SX7 PTRD
  2980. RJ PDB POSITION DATABASE
  2981. SX6 377777B SET FILE COUNT
  2982. RJ SFC
  2983.  
  2984. * PRINT NEXT DATABASE ENTRY MEETING SPECIFIED CRITERIA.
  2985.  
  2986. LST1 RJ RDB READ NEXT DATABASE ENTRY
  2987. NZ X1,LST2 IF ALL DONE
  2988. SA0 DBE PROCESS OUTPUT
  2989. RJ POT
  2990. EQ LST1 READ NEXT ENTRY
  2991.  
  2992. * CHECK IF NOTHING FOUND IN DATABASE FOR SPECIFIED *TN*.
  2993.  
  2994. LST2 SA1 NFP
  2995. NZ X1,MAIN8 IF SOME FILES LISTED
  2996. SA1 USERDB
  2997. ZR X1,MAIN8 IF NOT A USER DATABASE
  2998. SA1 TF+TTNV
  2999. ZR X1,MAIN8 IF NO *TN* PARAMETER
  3000. SA1 TNN OCCURRENCES OF SPECIFIED TN ON DATABASE
  3001. NZ X1,MAIN8 IF TN FOUND AT LEAST ONCE
  3002. NG X1,MAIN8 IF VSN FOUND FOR OTHER USER NAME
  3003. SA1 UNV
  3004. ZR X1,MAIN8 IF UN=0 WAS SPECIFIED
  3005.  
  3006. * NO FILES FOR SPECIFIED *TN* ON DATABASE. ATTEMPT RECOVERY.
  3007.  
  3008. RJ CDF CREATE DATABASE FILE
  3009. SA1 TNN
  3010. ZR X1,MAIN8 IF NO FILES ADDED TO DATA BASE
  3011. SX5 -1 FLAG DEFINE ONLY FOR UPD
  3012. RJ UPD UPDATE DATABASE
  3013. EQ LIST RESTART *LIST* COMMAND
  3014.  
  3015. * LIST FILES ON DUMP FILE ONLY
  3016.  
  3017. LST3 RJ CDF
  3018. EQ MAIN8 RETURN
  3019. TITLE PROCESS *LOAD* DIRECTIVE.
  3020. LOAD SPACE 4,10
  3021. ** LOAD - PROCESS *LOAD* DIRECTIVE.
  3022. *
  3023. * ENTRY NONE.
  3024. *
  3025. * EXIT TO *CPY1* TO PROCESS LOAD.
  3026. *
  3027. * USES X - 6.
  3028.  
  3029.  
  3030. LOAD BSS 0 ENTRY
  3031. SA1 =10H LOADING, SET UP B-DISPLAY MESSAGE
  3032. BX6 X1
  3033. SA6 BMSG
  3034. SX6 B1 *LOAD* FLAG
  3035. EQ CPY1 PROCESS *LOAD*
  3036. TITLE PROCESS *REMOVE* DIRECTIVE.
  3037. REMOVE SPACE 4,15
  3038. ** REMOVE - PROCESS *REMOVE* DIRECTIVE.
  3039. *
  3040. * ENTRY NONE.
  3041. *
  3042. * EXIT TAPE REMOVED FROM DATABASE.
  3043. *
  3044. * USES X - 1, 5, 7.
  3045. * A - 1, 7.
  3046. *
  3047. * CALLS UPD.
  3048. *
  3049. * MACROS MESSAGE, WRITEC, WRITER, WRITEW.
  3050.  
  3051.  
  3052. REMOVE BSS 0 ENTRY
  3053.  
  3054. * ENSURE *TN* SPECIFIED.
  3055.  
  3056. MX0 6*6 MASK FOR TAPE VSN
  3057. SA1 TF+TMSV
  3058. ZR X1,RMV0 IF MASS STORAGE DUMP NOT SPECIFIED
  3059. MX0 7*6 MASK FOR MASS STORAGE FILE NAME
  3060. RMV0 SA1 TF+TTNV
  3061. NZ X1,RMV1 IF TAPE NUMBER SPECIFIED
  3062. MESSAGE ERTN,3 * TN OR DN MUST BE SPECIFIED.*
  3063. WRITEC O,ERTN
  3064. EQ MAIN RETURN TO MAIN LOOP
  3065.  
  3066. * VALIDATE ACCESS TO THIS DATABASE.
  3067.  
  3068. RMV1 BX6 X0*X1
  3069. SA1 USERDB
  3070. NZ X1,RMV2 IF A USER DATABASE SPECIFIED
  3071. SA1 ACCESS
  3072. NZ X1,RMV2 IF USER HAS PRIVILEGES
  3073. MESSAGE RMVB,3 * REMOVE DENIED FOR SPECIFIED DATABASE.*
  3074. WRITEC O,RMVB
  3075. EQ MAIN RETURN TO MAIN LOOP
  3076.  
  3077. RMV2 WRITEO NUMBERS TAPE NUMBER TO REMOVE
  3078. WRITER NUMBERS,R
  3079. SX5 B0+ FLAG ABORT IF ATTACH FAILS
  3080. RJ UPD UPDATE DATABASE
  3081. EQ MAIN8 RETURN TO MAIN LOOP
  3082.  
  3083.  
  3084. RMVB DATA C* REMOVE DENIED FOR SPECIFIED DATABASE.*
  3085. TITLE PROCESS *SET* DIRECTIVE.
  3086. SET SPACE 4,15
  3087. ** SET - PROCESS *SET* DIRECTIVE.
  3088. *
  3089. * ENTRY (A0) = ADDRESS OF FIRST PARAMETER IN STRING BUFFER.
  3090. *
  3091. * EXIT DEFAULT OPTIONS RESET.
  3092. *
  3093. * USES X - 0, 1, 2, 6.
  3094. * A - 1, 6.
  3095. * B - 2, 3, 4, 6.
  3096. *
  3097. * CALLS ARM.
  3098.  
  3099.  
  3100. SET BSS 0 ENTRY
  3101.  
  3102. * ZERO OUT VARIABLE TABLE.
  3103.  
  3104. SX6 B0+
  3105. SB3 VARIABL BEGINNING OF VARIABLE TABLE
  3106. SB4 ARMTABL-1 LENGTH OF TABLE
  3107. SET1 SA1 B3+B4 CLEAR NEXT VARIABLE
  3108. SA6 A1
  3109. SB4 B4-B1
  3110. GE B4,B0,SET1 IF MORE IN TABLE TO CLEAR
  3111.  
  3112. * PROCESS ARGUMENTS.
  3113.  
  3114. SB3 ARMTAB
  3115. SB6 A0
  3116. RJ ARM PROCESS DIRECTIVE ARGUMENTS
  3117. SB2 DEFAULT BEGINNING OF DEFAULT TABLE
  3118. SB3 VARIABL
  3119. SB4 ARMTABL-1 END OF TABLE
  3120.  
  3121. * CHECK NEXT OPTION.
  3122.  
  3123. SET2 SA1 B3+B4 CURRENT TABLE ENTRY
  3124. ZR X1,SET6 IF WORD OF ALL ZEROES
  3125.  
  3126. * CHECK FOR DISPLAY CODE ZERO.
  3127.  
  3128. MX0 -6
  3129. SB6 11D
  3130. SET3 SB6 B6-B1
  3131. ZR B6,SET5 IF FULL WORD COMPLETED
  3132. BX2 -X0*X1
  3133. SX2 X1-1R0
  3134. NZ X2,SET4 IF INCOMING CHARACTER NOT DISPLAY ZERO
  3135. SX1 X1-33B
  3136. SET4 LX1 6
  3137. EQ SET3 CHECK NEXT CHARACTER
  3138.  
  3139. SET5 BX6 X1 PUT CONTENTS OF OPTION INTO DEFAULT TABLE
  3140. SA6 B2+B4
  3141. SET6 SB4 B4-B1 DECREMENT TABLE
  3142. GE B4,B0,SET2 IF MORE TO CHECK
  3143. EQ MAIN RETURN TO MAIN LOOP
  3144. TITLE PROCESS *UPDATE* DIRECTIVE.
  3145. UPDATE SPACE 4,15
  3146. ** UPDATE - PROCESS *UPDATE* DIRECTIVE.
  3147. *
  3148. * ENTRY FILE *UPDATES* CONTAINS ENTRIES TO ADD TO DATABASE.
  3149. * FILE *NUMBERS* CONTAINS TAPE VSN-S.
  3150. *
  3151. * EXIT UPDATE COMPLETE.
  3152. *
  3153. * USES X - 5.
  3154. *
  3155. * CALLS UPD.
  3156. *
  3157. * NOTE UPDATES FILE MUST BE SORTED.
  3158.  
  3159.  
  3160. UPDATE BSS 0 ENTRY
  3161. SX5 -1 FLAG DEFINE DATABASE IF POSSIBLE
  3162. RJ UPD UPDATE DATABASE
  3163. EQ MAIN8 RETURN TO MAIN LOOP
  3164. TITLE PRIMARY SUBROUTINES.
  3165. ABT SPACE 4,10
  3166. ** ABT - ABORT PROCESSING.
  3167. *
  3168. * ENTRY SOME ERROR DETECTED.
  3169. *
  3170. * EXIT ALL FILES RETURNED.
  3171. * ERROR MESSAGES ISSUED.
  3172. * *RECLAIM* ABORTED.
  3173. *
  3174. * MACROS ABORT, MESSAGE, UNLOAD, WRITEC, WRITER.
  3175.  
  3176.  
  3177. ABT BSS 0 ENTRY
  3178. SX6 1 SET EOR ON INPUT FLAG
  3179. SA6 EOR
  3180. SA1 RPVBLK+3 GET THE REPRIEVE ERROR CODE
  3181. MX0 48
  3182. BX1 -X0*X1
  3183. ZR X1,ABT1 IF NO ERROR EXIT
  3184.  
  3185. * ISSUE ERROR MESSAGE.
  3186.  
  3187. SA1 RPVBLK+3 GET ERROR CODE
  3188. MX0 -12
  3189. BX1 -X0*X1 ISOLATE ERROR CODE
  3190. SB1 1 JUST IN CASE
  3191. SB2 B1+B1 BUILD SHIFT COUNT
  3192. LX0 X1,B2 COMPUTE WORD OFFSET OF MESSAGE
  3193. SX0 X0+ABTA SET MESSAGE ADDRESS
  3194. MESSAGE X0,3 ISSUE ERROR MESSAGE
  3195. WRITEC O,X0
  3196.  
  3197. * SET COMPLETE BITS IN FETS.
  3198.  
  3199. SA1 TF
  3200. SA2 DB
  3201. SA3 UPDATES
  3202. SA4 NUMBERS
  3203. SX5 1
  3204. BX6 X1+X5
  3205. BX7 X2+X5
  3206. SA6 A1
  3207. SA7 A2
  3208. BX6 X3+X5
  3209. BX7 X4+X5
  3210. SA6 A3
  3211. SA7 A4
  3212. SA1 NEW
  3213. SA2 CF
  3214. SA3 MF
  3215. SA4 SF
  3216. BX6 X1+X5
  3217. BX7 X2+X5
  3218. SA6 A1
  3219. SA7 A2
  3220. BX6 X3+X5
  3221. BX7 X4+X5
  3222. SA6 A3
  3223. SA7 A4
  3224.  
  3225. * UNLOAD ALL FILES (EXCEPT LOCAL FILE BEING DUMPED).
  3226.  
  3227. SA1 DUMPLOC
  3228. NZ X1,ABT0 IF A LOCAL FILE WAS BEING DUMPED
  3229. UNLOAD NEW
  3230. ABT0 UNLOAD CF
  3231. UNLOAD MF
  3232. UNLOAD SF
  3233. UNLOAD NUMBERS
  3234. UNLOAD UPDATES
  3235. UNLOAD DB
  3236.  
  3237. * ABORT *RECLAIM*.
  3238.  
  3239. ABT1 SA1 RECSET
  3240. ZR X1,ABT2 IF CHARACTER SET MODE NOT CHANGED
  3241. CSET RESTORE RESTORE ORIGINAL CHARACTER SET MODE
  3242. ABT2 WRITER O,R
  3243. ABORT ABTB * RECLAIM ABORTED.*
  3244.  
  3245.  
  3246. ABTA INDEX ERROR EXIT MESSAGES
  3247. INDEX /COMSRPV/NTEC,( NORMAL TERMINATION. )
  3248. INDEX /COMSRPV/TLEC,( TIME LIMIT. )
  3249. INDEX /COMSRPV/EEEC,( CPU ERROR EXIT. )
  3250. INDEX /COMSRPV/PPEC,( PP ABORT. )
  3251. INDEX /COMSRPV/CPEC,( CPU ABORT. )
  3252. INDEX /COMSRPV/PCEC,( PP CALL ERROR. )
  3253. INDEX /COMSRPV/ODEC,( OPERATOR DROP. )
  3254. INDEX /COMSRPV/OKEC,( OPERATOR KILL. )
  3255. INDEX /COMSRPV/RREC,( OPERATOR RERUN. )
  3256. INDEX /COMSRPV/ECEC,( EXTENDED MEMORY PARITY ERROR. )
  3257. INDEX /COMSRPV/RCEC,( JOB HUNG IN AUTO RECALL. )
  3258. INDEX /COMSRPV/MLEC,( MASS STORAGE LIMIT. )
  3259. INDEX /COMSRPV/SREC,( I/O LIMITS EXCEEDED. )
  3260. INDEX /COMSRPV/TIEC,( TERMINAL INTERRUPT. )
  3261. INDEX /COMSRPV/TIEC+1 END OF TABLE
  3262. ABTB DATA C* RECLAIM ABORTED.*
  3263. ADB SPACE 4,25
  3264. ** ADB - ATTACH DATABASE.
  3265. *
  3266. * ENTRY (X7) = ATTACH MODE.
  3267. * (X5) = 0 IF *RECLAIM* IS TO ABORT IF ATTACH FAILS.
  3268. * (X5) .NE. 0 IF *ADB* IS TO ATTEMPT TO DEFINE THE
  3269. * DATABASE SHOULD THE ATTACH FAIL.
  3270. * CHECKED ONLY IF *TN* SPECIFIED.
  3271. *
  3272. * EXIT DATABASE ATTACHED.
  3273. * (X5) = 0 IF ATTACH WORKED.
  3274. * (X5) .NE. 0 IF DEFINED (UNCHANGED FROM ENTRY VALUE).
  3275. *
  3276. * ERROR TO *ABT* IF ATTACH FAILED AND NO RECOVERY.
  3277. *
  3278. * USES X - 0, 1, 2, 3, 5, 6, 7.
  3279. * A - 1, 2, 6, 7.
  3280. *
  3281. * MACROS ATTACH, BREAK, DEFINE, MESSAGE, RECALL, ROLLOUT,
  3282. * WRITEC, WRITER.
  3283. *
  3284. * DEFINE (X5) = FLAG FOR DEFINING DATABASE WHEN NOT FOUND.
  3285.  
  3286.  
  3287. ADB10 SA1 DB+1 CLEAR *SA* BIT
  3288. SX6 1
  3289. LX6 46
  3290. BX6 -X6*X1
  3291. SA6 A1+
  3292.  
  3293. ADB SUBR ENTRY/EXIT
  3294. SA7 ADBD ACCESS MODE
  3295. SX6 ROLLFBS MAXIMUM ROLLOUTS BEFORE TAPE UNLOAD
  3296. SA6 ADBH
  3297. ADB1 SA1 DB+1
  3298. SX6 4+1 SET *SA* AND *EP* BITS
  3299. LX6 44
  3300. BX6 X6+X1
  3301. SA6 A1+
  3302. SA1 DBNAM GET DATABASE NAME
  3303. NZ X1,ADB1.1 IF DATABASE .NE. 0
  3304. SX5 B0+ ACT LIKE ATTACH WORKED
  3305. EQ ADB10 CLEAR *SA* BIT AND RETURN
  3306.  
  3307. ADB1.1 ATTACH DB,DBNAM,DBUN,DBPW,ADBD,DBPN,RDT ATTACH DATABASE
  3308.  
  3309. * CHECK ERROR CODE RETURNED FROM *PFM*.
  3310.  
  3311. SA1 DB
  3312. SX0 X1
  3313. AX0 10
  3314. NZ X0,ADB2 IF ATTACH FAILED
  3315. SX5 B0+ SET ATTACH SUCCESSFUL
  3316. EQ ADB10 CLEAR *SA* BIT AND RETURN
  3317.  
  3318. * ATTACH FAILED. CHECK *PFM* STATUS.
  3319.  
  3320. ADB2 SX3 X0-/ERRMSG/FBS CHECK FOR FILE BUSY
  3321. ZR X3,ADB5 IF BUSY
  3322. SX3 X0-/ERRMSG/PFA CHECK FOR PF UTILITY ACTIVE
  3323. ZR X3,ADB5 IF ACTIVE
  3324. SX3 X0-/ERRMSG/FNF CHECK FOR FILE NOT FOUND
  3325. SA1 USERDB
  3326. NZ X3,ADB7 IF FILE FOUND BUT SOME OTHER STATUS
  3327. NZ X1,ADB3 IF A USER DATABASE
  3328. MESSAGE ADBA,3 * CONTACT CUSTOMER SERVICES...*
  3329. WRITEC O,ADBA
  3330. EQ ABT ABORT *RECLAIM*
  3331.  
  3332. * ATTEMPT TO DEFINE THE DATABASE FILE IF NECESSARY.
  3333.  
  3334. ADB3 ZR X5,ADB4 IF RECLAIM IS TO ABORT
  3335. SA1 TF+TTNV
  3336. ZR X1,ADB4 IF *TN* NOT SPECIFIED
  3337. SA2 DBUN
  3338. NZ X2,ADB4 IF ALTERNATE USER DATABASE
  3339. SA2 DBNAM
  3340. ZR X2,ADB10 IF DB=0 (PROCESS WITHOUT DATABASE)
  3341.  
  3342. * DEFINE DATABASE FILE.
  3343.  
  3344. MESSAGE ADBB,3 * DATABASE NOT FOUND...*
  3345. WRITEC O,ADBB
  3346. DEFINE DB,DBNAM,DBPW,,RDT,,,DBPN
  3347. SA1 DB CHECK *PFM* STATUS
  3348. SX1 X1
  3349. AX1 10
  3350. NZ X1,ADB4 IF ERROR DEFINING DATABASE
  3351. SX6 B1
  3352. SA6 DBDEFLG SET DATABASE DEFINED FLAG
  3353. EQ ADB10 CLEAR *SA* BIT AND RETURN WITH (X5) INTACT
  3354.  
  3355. * ATTACH FAILED - ABORT *RECLAIM*.
  3356.  
  3357. ADB4 MESSAGE ADBC,3 * USER DATABASE MISSING.*
  3358. WRITEC O,ADBC
  3359. RJ ABT ABORT *RECLAIM*
  3360.  
  3361. * DISPLAY *WAITING* MESSAGE IF IAOT AND OUTPUT IS TT EQUIPMENT.
  3362.  
  3363. ADB5 BREAK
  3364. SA1 JOBORIG ORIGIN TYPE
  3365. SX1 X1-IAOT TIMESHARING ORIGIN TYPE
  3366. NZ X1,ADB6 IF NOT INTERACTIVE USER
  3367. SA1 ODT TERMINAL OUTPUT STATUS POINTER
  3368. NZ X1,ADB6 IF OUTPUT NOT ASSIGNED TO TERMINAL
  3369. WRITEC O,ADBE * WAITING FOR DATABASE NON-BUSY.*
  3370. RJ ILC INCREMENT LINE COUNT
  3371. WRITER O,R
  3372. WRITE X2,* PRESET FUNCTION IN FET
  3373.  
  3374. * PF TEMPORARILY UNAVAILABLE - WAIT A BIT AND TRY AGAIN.
  3375. * UNLOAD DUMP TAPE IF THERE IS AN EXTREMELY LONG WAIT,
  3376. * AS THIS COULD INDICATE A POSSIBLE DEADLOCK SITUATION.
  3377.  
  3378. ADB6 SX6 X0-/ERRMSG/PFA
  3379. NZ X6,ADB6.1 IF NOT FILE BUSY
  3380. SA1 ADBH
  3381. ZR X1,ADB6.1 IF TAPE ALREADY UNLOADED
  3382. SX6 X1-1 DECREMENT RETRY COUNT
  3383. SA6 A1+
  3384. NZ X6,ADB6.1 IF NOT TIME TO UNLOAD TAPE
  3385. SA2 TF+TFETVSN
  3386. AX2 18
  3387. SX1 B0
  3388. ZR X2,ADB6.1 IF NO TAPE ASSIGNED
  3389. SX5 TF
  3390. RJ RNT UNLOAD THE TAPE
  3391. SX6 B0+ SET FILE POSITION UNKNOWN
  3392. SA6 CFC
  3393. SA6 CRC
  3394. SA6 FILENUM
  3395. SA6 RECNUM
  3396. ADB6.1 ROLLOUT ROLLTIM WAIT FOR PF FREE
  3397. RECALL WAIT FOR ROLLOUT COMPLETION IF TERMINAL
  3398. BREAK
  3399. EQ ADB1 ACQUIRE THE FILE AGAIN
  3400.  
  3401. * ABORT -- ERROR BEYOND PROGRAM CONTROL. (X1) = (USERDB).
  3402.  
  3403. ADB7 NZ X1,ADB9 IF USER DATABASE
  3404. MESSAGE ADBF,3 * CONTACT CUSTOMER SERVICES -- DB ERROR.*
  3405. WRITEC O,ADBF
  3406. EQ ABT ABORT *RECLAIM*
  3407.  
  3408. ADB9 MESSAGE ADBG,3 * ERROR IN ATTACHING USER DATABASE.*
  3409. WRITEC O,ADBG
  3410. RJ ABT ABORT *RECLAIM*
  3411.  
  3412.  
  3413. ADBA DATA C* CONTACT CUSTOMER SERVICES -- DB MISSING.*
  3414. ADBB DATA C* DATABASE NOT FOUND -- DEFINING NEW ONE.*
  3415. ADBC DATA C* USER DATABASE MISSING.*
  3416. ADBD DATA 0 PF ATTACH MODE
  3417. ADBE DATA C* WAITING FOR DATABASE NON-BUSY.*
  3418. ADBF DATA C* CONTACT CUSTOMER SERVICES -- DB ERROR.*
  3419. ADBG DATA C* ERROR IN ATTACHING USER DATABASE.*
  3420. ADBH BSS 1 FILE BUSY ROLLOUT COUNT
  3421. ADBM BSSZ 3 ERROR RETURNED BY *PFM*
  3422. BTF SPACE 4,15
  3423. ** BTF - BUILD TAPE FLAGS.
  3424. *
  3425. * ENTRY (X4) = TAPE FLAG DEFAULT VALUES.
  3426. * (X5) = FET ADDRESS ASSOCIATED WITH TAPE FLAGS.
  3427. * (X6) = EXISTING TAPE FLAGS.
  3428. *
  3429. * EXIT ((X5)+TFLAGS) = TAPE FLAGS.
  3430. * (X6) = TAPE FLAGS.
  3431. *
  3432. * ERROR TO *MAIN* IF TAPE OPTION ERRORS OR MISMATCH.
  3433. *
  3434. * USES X - 0, 1, 2, 3, 6.
  3435. * A - 1, 2, 6.
  3436. *
  3437. * MACROS MESSAGE, WRITEC.
  3438.  
  3439.  
  3440. BTF SUBR ENTRY/EXIT
  3441. SA1 X5+TMSV MASS STORAGE VARIABLE FOR THIS FET
  3442. SX3 B0+ INITIALIZE TAPE PARAMETERS MASK
  3443. ZR X1,BTF1 IF NOT MASS STORAGE
  3444. MX6 1
  3445. LX6 11-59 SET *MASS STORAGE RESIDENT* INDICATOR
  3446. BTF1 SA6 X5+TFLAGS MASS STORAGE FLAG OR EXISTING TAPE FLAGS
  3447. NZ X1,BTFX IF MASS STORAGE, RETURN
  3448. SA1 TMSTAT
  3449. SA2 FTV
  3450. SX6 2S9 PRESET FOR LABELED TAPE
  3451. ZR X1,BTF1.1 IF *TMS* NOT ACTIVE
  3452. ZR X2,BTF1.1 IF *FT* NOT SPECIFIED
  3453. SX6 X6+1S9 SET *FOREIGN TAPE* FLAG
  3454.  
  3455. * CHECK TAPE DENSITY.
  3456.  
  3457. BTF1.1 SA1 DV TAPE DENSITY
  3458. ZR X1,BTF3 IF NO DENSITY SPECIFIED
  3459. SX3 70B SET MASK FOR DENSITY
  3460. SA2 TDEN
  3461. BTF2 BX0 X1-X2
  3462. AX0 36
  3463. ZR X0,BTF4 IF MATCHING DENSITY
  3464. SA2 A2+1
  3465. NZ X2,BTF2 IF MORE DENSITIES TO CHECK
  3466. MESSAGE BTFA,3 * INCORRECT TAPE DENSITY.*
  3467. WRITEC O,BTFA
  3468. EQ MAIN RETURN TO MAIN LOOP
  3469.  
  3470. * SET DENSITY, DEVICE TYPE BASED ON *DT*, *MT* OR *NT* VALUES.
  3471.  
  3472. BTF3 SA1 DTV
  3473. ZR X2,BTF3.2 IF *DT* NOT SPECIFIED
  3474. SA2 TDTV SEARCH DEVICE TYPE VALUES TABLE
  3475. BTF3.1 BX0 X1-X2
  3476. AX0 36
  3477. ZR X0,BTF3.3 IF CORRECT VALUE
  3478. SA2 A2+1
  3479. SX0 A2-TDTET
  3480. NZ X0,BTF3.1 IF MORE TAPE DEVICES TO CHECK
  3481. BTF3.2 SA1 MTV CHECK *MT* VARIABLE
  3482. SA2 DTMT
  3483. NZ X1,BTF3.3 IF 7-TRACK TAPE SPECIFIED
  3484. SA1 NTV CHECK *NT* VARIABLE
  3485. SA2 DTNT
  3486. NZ X1,BTF3.3 IF 9-TRACK SPECIFIED
  3487. SX2 X4+ USE DEFAULT VALUES
  3488. EQ BTF4 CONTINUE CHECKING
  3489.  
  3490. BTF3.3 SX3 X3+700B SET MASK FOR DEVICE TYPE
  3491. BTF4 SX1 7
  3492. SX2 X2+ REMOVE SEARCH ARGUMENT FROM SELECTION
  3493. BX0 X1*X4
  3494. NZ X0,BTF4.1 IF DEFAULT FORMAT GIVEN
  3495. BX0 X1*X2 DEFAULT TO FORMAT FROM SELECTION
  3496. BTF4.1 BX2 -X1*X2 REMOVE FORMAT FROM SELECTION
  3497. BX6 X2+X6 SET TAPE DEVICE TYPE, DENSITY
  3498.  
  3499. * CHECK TAPE FORMAT.
  3500.  
  3501. SA1 FV FORMAT VARIABLE
  3502. ZR X1,BTF6 IF FORMAT NOT SPECIFIED
  3503. SX3 X3+7B SET MASK FOR FORMAT
  3504. SX0 B0+
  3505. BTF5 SA2 X0+TFMT
  3506. BX2 X1-X2
  3507. ZR X2,BTF6 IF MATCHING TAPE FORMAT
  3508. SX0 X0+1
  3509. SX2 X0-TFMTL
  3510. NG X2,BTF5 IF MORE FORMATS TO CHECK
  3511. SX2 BTFB * INCORRECT TAPE FORMAT.*
  3512. EQ BTF7 ISSUE MESSAGE AND RETURN TO MAIN LOOP
  3513.  
  3514. * SET FLAGS INTO *TFLAGS* FOLLOWING FET AND EXIT.
  3515.  
  3516. BTF6 BX6 X0+X6
  3517. SA1 X5+TFLAGS CHECK EXISTING TAPE FLAGS
  3518. SA6 A1
  3519. ZR X1,BTFX IF NO EXISTING TAPE FLAGS
  3520. BX0 X1-X6
  3521. BX0 X3*X0
  3522. ZR X0,BTFX IF EXISTING TAPE FLAGS MATCH
  3523. SX2 BTFC * TAPE DENSITY/DEVICE/FORMAT MISMATCH.*
  3524. BTF7 MESSAGE X2,3 ISSUE APPROPRIATE ERROR MESSAGE
  3525. WRITEC O,X2
  3526. EQ MAIN RETURN TO MAIN LOOP
  3527.  
  3528.  
  3529. BTFA DATA C* INCORRECT TAPE DENSITY.*
  3530. BTFB DATA C* INCORRECT TAPE FORMAT.*
  3531. BTFC DATA C* TAPE DENSITY/DEVICE/FORMAT MISMATCH.*
  3532. CBR SPACE 4,15
  3533. ** CBR - COPY BINARY RECORD.
  3534. *
  3535. * *CBR* COPIES ONE SYSTEM LOGICAL RECORD FROM ONE FILE
  3536. * TO ANOTHER.
  3537. *
  3538. * ENTRY (X0) = ADDRESS OF INPUT FILE FET.
  3539. * (X5) = ADDRESS OF OUTPUT FILE FET.
  3540. * (CMPC+DBPFN) = NAME OF DESIRED FILE RECORD TO COPY.
  3541. *
  3542. * EXIT (X1) = 0 IF RECORD COPIED.
  3543. * (X1) = 1 IF RECORD NOT FOUND.
  3544. *
  3545. * USES X - 1, 2, 3, 6.
  3546. * A - 2, 3, 6.
  3547. *
  3548. * MACROS MESSAGE, READ, READW, RECALL, WRITER, WRITEW.
  3549.  
  3550.  
  3551.  
  3552. CBR SUBR ENTRY/EXIT
  3553. RECALL X0 WAIT FOR PREVIOUS ACTIVITY TO STOP
  3554. RECALL X5
  3555. READ X0,R START UP THE READ ON THE INPUT FILE
  3556. WRITE X5,* SET WRITE FUNCTION
  3557. READW X0,WSA,WSAL
  3558. NG X1,CBR3 IF NOT A COMPLETED TRANSFER
  3559. SA3 WSA EXAMINE CATALOG CONTROL WORD
  3560. SX6 X3-11000B CHECK FOR NORMAL *PFC*
  3561. AX6 9
  3562. SX2 ERUP * DUMP FILE MALFUNC - UNRECOGNIZABLE PFC.*
  3563. NZ X6,CBR4 IF NOT A VALID CATALOG RECORD
  3564. SA2 CMPC+DBPFN
  3565. BX6 X2-X3
  3566. AX6 18
  3567. SX2 ERFM * DUMP FILE MALFUNC - FILE NAME MISMATCH.*
  3568. NZ X6,CBR4 IF NOT THE RIGHT FILE NAME
  3569. NZ X1,CBR2 IF RECORD SMALLER THAN BUFFER
  3570.  
  3571. * MOVE AN ENTIRE BUFFER IF POSSIBLE.
  3572.  
  3573. CBR1 WRITEW X5,WSA,WSAL
  3574. READW X0,WSA,WSAL
  3575. ZR X1,CBR1 IF COMPLETED TRANSFER
  3576.  
  3577. * FOUND AN EOR/EOF/EOI.
  3578.  
  3579. CBR2 RECALL X5 LET OTHER WRITE FINISH
  3580. SX1 B6 SET LWA OF DATA IN BUFFER
  3581. WRITEW X5,WSA,X1-WSA MOVE LAST BIT OF RECORD
  3582. WRITER X5,R COMPLETE THE WRITTEN RECORD
  3583. SX1 B0+ INDICATE COPY SUCCESSFUL
  3584. EQ CBRX RETURN
  3585.  
  3586. CBR3 SX6 X1+2
  3587. SX2 ERPL * DUMP FILE MALFUNCTION - POSITION LOST.*
  3588. NZ X6,CBR4 IF NOT AT END OF INFORMATION
  3589. SX2 EREI * DUMP FILE MALFUNC - EOI ENCOUNTERED.*
  3590. CBR4 MESSAGE X2,3,R
  3591. SX1 B1
  3592. EQ CBRX RETURN WITH ERROR INDICATION
  3593. CDF SPACE 4,15
  3594. ** CDF - CREATE DATABASE FILE.
  3595. *
  3596. * ENTRY NONE.
  3597. *
  3598. * EXIT SORTED UPDATE RECORDS READY FOR UPDATE.
  3599. *
  3600. * ERROR TO *ABT* IF TAPE HAS NO VALID DUMP ON IT.
  3601. *
  3602. * USES X - ALL.
  3603. * A - 0, 1, 2, 3, 5, 6, 7.
  3604. *
  3605. * CALLS CCE, CDR, CRI, CTJ, CVH, POT, RNT, SDE, UDV, UII, ZTB.
  3606. *
  3607. * MACROS BREAK, CLEAR, MESSAGE, READSKP, RECALL, REWIND,
  3608. * UNLOAD, WRITEC, WRITER, WRITEW.
  3609.  
  3610.  
  3611. CDF SUBR ENTRY/EXIT
  3612. SX6 777 FLAG TAPE RECOVERY FOR *CDR*
  3613. SA6 SALVAGE
  3614. SA1 JOBORIG JOB ORIGIN TYPE
  3615. SX1 X1-IAOT
  3616. NZ X1,CDF1 IF NOT INTERACTIVE SKIP MESSAGES
  3617. WRITEC O,CDFA * NO FILES FOUND FOR VSN *
  3618. WRITEC O,CDFB * WAITING FOR REQUESTED TAPE *
  3619. WRITER O,R
  3620. WRITE X2,* PRESET FUNCTION IN FET
  3621. CDF1 BX6 X6-X6
  3622. SX7 B1
  3623. SA6 CRC CLEAR RECORD COUNT
  3624. SA7 CFC SET FILE COUNT
  3625. SA6 HDRJDT CLEAR DUMP DATE
  3626. UNLOAD NUMBERS,R
  3627. UNLOAD UPDATES,R
  3628. UNLOAD OPLDF,R
  3629. WRITE NUMBERS,*
  3630. WRITE UPDATES,*
  3631. WRITE OPLDF,*
  3632. RECALL TF
  3633. SA1 TF+TMSV MASS STORAGE VARIABLE
  3634. ZR X1,CDF1.1 IF NOT MASS STORAGE
  3635. MX6 1
  3636. LX6 11-59 SET *MASS STORAGE RESIDENT* INDICATOR
  3637. SA6 TF+TFLAGS
  3638. CDF1.1 SX6 B0+
  3639. SA6 TF+TRING FLAG DON-T CARE ABOUT WRITE RING
  3640. SA1 TF+TTNV
  3641. SX5 TF SET TAPE FET ADDRESS
  3642. RJ RNT REQUEST NEW TAPE
  3643. BREAK
  3644. RJ CVH CHECK FOR VALID DUMP HEADER
  3645. NZ X1,CDF8 IF TAPE HAS NO VALID DUMP
  3646. SA0 DBE DATA ENTRY ADDRESS
  3647. SA1 TF+TTNV
  3648. SX5 TF FET ADDRESS
  3649. RJ UII WRITE INITIAL VSN INDEX RECORD
  3650.  
  3651. * READ RECORD UNTIL EOI.
  3652.  
  3653. CDF2 CLEAR TF RESET FET POINTERS FOR READSKP
  3654. READSKP TF,0,R
  3655. BREAK
  3656. SA1 CRC INCREMENT RECORD COUNT
  3657. SX6 X1+B1
  3658. MX0 -12
  3659. BX6 -X0*X6
  3660. SA6 A1
  3661. NZ X6,CDF3 IF NOT A PSEUDO FILE POINT
  3662. SA1 CFC
  3663. SX6 X1+B1 INCREMENT FILE NUMBER
  3664. SA6 A1
  3665. CDF3 SX5 TF
  3666. RJ UDV UPDATE DUMP VSN
  3667. SA1 TF+2 IN POINTER
  3668. SA2 A1+B1 OUT
  3669. IX1 X1-X2
  3670. NZ X1,CDF4 IF NOT AN EMPTY RECORD - PROBABLY A PFC
  3671. SA1 TF
  3672. LX1 59-9 LEFT JUSTIFY EOI BIT
  3673. NG X1,CDF7 IF END-OF-TAPE - ALL DONE
  3674. LX1 -59+9 MOVE BACK TO ORIGINAL POSITION
  3675. MX0 -10
  3676. BX1 -X0*X1 ISOLATE STATUS BITS
  3677. SX1 X1-33B COMPARE WITH 1033B(EOI), 33B(EOF)
  3678. NG X1,CDF6 IF EOR ENCOUNTERED
  3679. NZ X1,CDF7 IF EOI ENCOUNTERED
  3680.  
  3681. * EOF ENCOUNTERED, SO INCREMENT RECORD/FILE COUNTS.
  3682.  
  3683. SA1 CRC
  3684. ZR X1,CDF2 IF PSEUDO FILE POINT JUST PROCESSED
  3685. BX6 X6-X6
  3686. SA6 A1
  3687. SA1 CFC INCREMENT FILE COUNT
  3688. SX6 X1+B1
  3689. SA6 A1
  3690. EQ CDF2 LOOP FOR NEXT FILE
  3691.  
  3692. * PROCESS RECORD.
  3693.  
  3694. CDF4 SA1 TFBUF
  3695. SX2 X1-11000B CHECK FOR NORMAL *PFC*
  3696. AX2 9
  3697. ZR X2,CDF4.2 IF A VALID CATALOG HEADER
  3698. SA2 HDRPFD
  3699. BX2 X1-X2
  3700. AX2 24
  3701. ZR X2,CDF4.1 IF *PFDUMP* OR CURRENT *RECLAIM* HEADER
  3702. SA2 =7LRECLAIM
  3703. BX2 X1-X2
  3704. AX2 18
  3705. NZ X2,CDF2 IF NOT INTERIM *RECLAIM* HEADER
  3706. CDF4.1 SA5 /COMSPFS/DAAL+TFBUF+1 SAVE DUMP DATE
  3707. RJ CTJ CONVERT TO JULIAN
  3708. SA6 HDRJDT
  3709. EQ CDF2 GET NEXT RECORD
  3710.  
  3711. * PROCESS PFC.
  3712.  
  3713. CDF4.2 MX0 -9
  3714. BX1 -X0*X1 EXTRACT LENGTH OF THIS TABLE
  3715. SX1 X1-NWCE COMPARE WITH PFC SIZE
  3716. ZR X1,CDF5 IF SIZE IS CORRECT
  3717. SX4 TFBUF+1
  3718. RJ CCE CONVERT CATALOG ENTRY TO CORRECT FORMAT
  3719. CDF5 SA1 UIV
  3720. ZR X1,CDF5.1 IF *UI* NOT SPECIFIED
  3721. SA2 TFBUF+FCUI+1 PFC USER INDEX
  3722. MX0 -18
  3723. BX0 -X0*X2
  3724. BX1 X0-X1
  3725. NZ X1,CDF2 IF NOT THE SPECIFIED USER INDEX
  3726. CDF5.1 SA1 TNN INCREMENT DATABASE ADDITIONS FROM TAPE
  3727. SX6 X1+B1
  3728. SA6 A1
  3729. SA3 TFBUF+1 FW OF PFC HEADER
  3730. RJ CDR CREATE DATABASE RECORD
  3731. SA1 DBNAM
  3732. NZ X1,CDF6 IF DATA BASE SET
  3733. RJ CRI CHECK CRITERIA
  3734. NZ X5,CDF2 IF CRITERIA DOES NOT MATCH
  3735. RJ POT
  3736. SA1 NFP NUMBER OF FILES PROCESSED
  3737. SX6 X1+B1
  3738. SA6 A1
  3739. EQ CDF2 GET NEXT PFC FROM TAPE
  3740.  
  3741. * WRITE UNSORTED UPDATE RECORD.
  3742.  
  3743. CDF6 SA1 DBNAM DATABASE NAME
  3744. ZR X1,CDF2 IF NO DATABASE NAME
  3745. WRITEW OPLDF,A0,UDBEL
  3746. EQ CDF2 GET NEXT PFC
  3747.  
  3748. * EOI ENCOUNTERED. SORT DATABASE RECORDS.
  3749.  
  3750. CDF7 SA1 DBNAM DATABASE NAME
  3751. ZR X1,CDFX IF NO DATABASE NAME
  3752. MX6 2 SET EOI INDICATOR AND RECORD COUNT
  3753. LX6 1
  3754. SA1 CFC
  3755. SA6 CRC
  3756. SX7 X1-1 DECREMENT FILE COUNT
  3757. SA7 A1
  3758. WRITER OPLDF,R
  3759. WRITER NUMBERS,R
  3760. SA1 TNN
  3761. NZ X1,CDF7.0 IF ANY FILES FOR THE DATABASE
  3762. UNLOAD OPLDF,R
  3763. UNLOAD NUMBERS,R
  3764. EQ CDFX RETURN
  3765.  
  3766. CDF7.0 RJ SDE SORT DATABASE ENTRIES
  3767. MX0 24D
  3768. SA1 TF+TTNV
  3769. SA2 TF+TMSV
  3770. SA3 =10H ADDING TA
  3771. ZR X2,CDF7.1 IF TAPE FILE
  3772. SA3 =10H ADDING FI
  3773. CDF7.1 BX6 X3
  3774. SA6 CDFC
  3775. RJ ZTB CONVERT ZEROS TO BLANKS
  3776. SA1 TF+TMSV
  3777. SA2 =2CPE
  3778. ZR X1,CDF7.2 IF TAPE FILE
  3779. SA2 =2CLE
  3780. CDF7.2 MX1 -48
  3781. LX6 41-59
  3782. BX6 -X1*X6
  3783. BX6 X6+X2
  3784. SA6 CDFC+1
  3785. MESSAGE CDFC,3 * ADDING TAPE VVVVVV TO DATABASE.*
  3786. * MESSAGE CDFC,3 * ADDING FILE FFFFFFF TO DATABASE.*
  3787. WRITEC O,CDFC
  3788. MX0 42
  3789. SA1 UNV CURRENT USER NAME
  3790. BX6 X0*X1
  3791. SA6 A1 CLEAR USER ADDRESS ON DATABASE
  3792. SX6 B0 RESUME NORMAL DATABASE CREATION
  3793. SA6 SALVAGE
  3794. EQ CDFX RETURN
  3795.  
  3796. * TAPE DOES NOT CONTAIN A DUMP.
  3797.  
  3798. CDF8 MESSAGE CDFD,3 * NO VALID DUMP ON TAPE.*
  3799. WRITEC O,CDFD
  3800. EQ ABT ABORT *RECLAIM*
  3801.  
  3802.  
  3803. CDFA DATA C* NO FILES FOUND FOR SPECIFIED DUMP FILE. *
  3804. CDFB DATA C* REQUESTING DUMP FILE. *
  3805. CDFC DATA C* ADDING TAPE TO DATABASE.*
  3806. CDFD DATA C* NO VALID DUMP FOUND ON DUMP FILE. *
  3807. CDR SPACE 4,15
  3808. ** CDR - CREATE DATABASE RECORD.
  3809. *
  3810. * ENTRY (A0) = ADDRESS OF RECORD BUFFER.
  3811. * (A3) = FWA OF CATLIST/PFC BUFFER.
  3812. * (X5) = RECORD COUNT OF FILE ON TAPE.
  3813. * (SALVAGE) = DATABASE RECOVERY FLAG.
  3814. * (HDRJDT) = DUMP DATE FROM HEADER IF NON-ZERO.
  3815. *
  3816. * EXIT ((A0)) = DATABASE RECORD CREATED FROM PFC.
  3817. * (LAD) = LAST ACCESS DATE FROM PFC.
  3818. *
  3819. * USES X - 0, 1, 2, 5, 6.
  3820. * A - 1, 2, 6.
  3821. *
  3822. * CALLS CVD.
  3823.  
  3824.  
  3825. CDR SUBR ENTRY/EXIT
  3826. MX0 42 SAVE USER NAME IN DATABASE RECORD
  3827. SA1 UNV
  3828. BX6 X0*X1
  3829. SA6 A0+DBUNM FIRST WORD OF DATABASE RECORD
  3830. SA1 DUMPDT CURRENT DATE IN PACKED JULIAN
  3831. SA2 SALVAGE
  3832. ZR X2,CDR1 IF NORMAL DATABASE RECORD CREATION
  3833. SA1 HDRJDT
  3834. NZ X1,CDR1 IF DUMP DATE FROM HEADER
  3835. SA1 A3+FCPW
  3836. BX1 -X0*X1 GET DUMP DATE FROM TAPE PFC
  3837. CDR1 SA2 A3+FCFN FILE NAME + USER INDEX
  3838. BX6 X0*X2
  3839. BX6 X6+X1
  3840. SA6 A0+DBPFN SECOND WORD OF DATABASE RECORD
  3841. SA2 A3+FCPW SAVE PASSWORD
  3842. BX6 X0*X2
  3843. BX6 X6+X1 MERGE DUMP DATE
  3844. SA6 A2 SAVE DUMP DATE IN PFC
  3845. SA1 A3+FCMD LAST MODIFICATION DATE
  3846. AX1 18
  3847. BX5 -X0*X1
  3848. RJ CVD
  3849. SA1 TF+TTNV TAPE NUMBER
  3850. MX2 42
  3851. BX1 X2*X1 ISOLATE DUMP FILE NAME
  3852. BX6 X6+X1
  3853. SA6 A0+DBTNO THIRD WORD OF DATABASE RECORD
  3854. SA1 A3+FCBS DIRECT/INDIRECT FLAG (ON SECTOR COUNT)
  3855. LX1 24
  3856. MX0 -24
  3857. BX2 -X0*X1
  3858. LX1 24
  3859. SX6 1RI
  3860. PL X1,CDR2 IF AN INDIRECT ACCESS FILE
  3861. SX6 1RD
  3862. CDR2 LX6 12
  3863. SA1 TF+TFLAGS TAPE FLAGS BUILT BY *BTF*
  3864. BX6 X1+X6
  3865. LX6 6
  3866. SA1 CFC DUMP FILE FILE NUMBER
  3867. BX6 X1+X6
  3868. LX6 12
  3869. SA1 CRC DUMP FILE RECORD NUMBER
  3870. BX1 -X0*X1 REMOVE POSSIBLE EOI INDICATOR (BIT 59)
  3871. BX6 X1+X6
  3872. LX6 18
  3873. MX1 -18 SPLIT OFF UPPER 5 BITS OF FILE SIZE
  3874. BX1 X1*X2 UPPER 5 BITS OF FILE SIZE
  3875. BX2 X2-X1 LOWER 18 BITS OF FILE SIZE
  3876. BX6 X2+X6 MERGE LOWER 18 BITS INTO DATABASE RECORD
  3877. LX1 59-23
  3878. BX6 X1+X6 MERGE UPPER 5 BITS INTO DATABASE RECORD
  3879. SA6 A0+DBFLG FOURTH WORD OF DATABASE
  3880. SA1 FAMILY THE CURRENT FAMILY
  3881. BX6 X1
  3882. SA6 A0+UDBFAM THE FAMILY NAME
  3883. SA1 A3+FCAD LAST ACCESS DATE FROM PFC
  3884. AX1 18
  3885. BX5 -X0*X1
  3886. RJ CVD
  3887. SA6 LAD
  3888. EQ CDRX RETURN
  3889. CEI SPACE 4,15
  3890. ** CEI - COPY A FILE TO END-OF-INFORMATION.
  3891. *
  3892. * *CEI* COPIES AN ENTIRE FILE TO ANOTHER. COPYING STARTS
  3893. * AT THE CURRENT POSITION FOR BOTH THE INPUT AND OUTPUT
  3894. * FILES, SO THE CALLER MUST REWIND BOTH FILES WHEN NECESSARY.
  3895. *
  3896. * ENTRY (X0) = ADDRESS OF INPUT FILE FET.
  3897. * (X5) = ADDRESS OF OUTPUT FILE FET.
  3898. * (X1) = SET VSN FOR OUTPUT FILE.
  3899. *
  3900. * EXIT EOI FOUND ON INPUT FET. FILE COPIED.
  3901. * (CFC) = CORRECT FILE COUNT FOR DUMP FILE.
  3902. * (CRC) = END OF DUMP INDICATOR.
  3903. *
  3904. * USES X - 1, 6.
  3905. * A - 0, 1, 6.
  3906. *
  3907. * CALLS UDV, UII.
  3908. *
  3909. * MACROS RECALL, READ, READW, WRITE, WRITEF, WRITER, WRITEW.
  3910.  
  3911.  
  3912. CEI SUBR ENTRY/EXIT
  3913. RJ UII WRITE INITIAL VSN INDEX RECORD
  3914. SX6 1
  3915. SA6 CFC INITIALIZE FILE NUMBER
  3916. SA6 CRC INITIALIZE RECORD NUMBER
  3917. RECALL X0 WAIT COMPLETION OF PREVIOUS ACTIVITY
  3918. RECALL X5
  3919. CEI1 READ X0,R REPEAT READ UNTIL EOI
  3920. WRITE X5,*
  3921. CEI2 READW X0,WSA,WSAL WHILE NOT EOR/EOF/EOI MOVE A CHUNK
  3922. NZ X1,CEI3 IF NOT *TRANSFER COMPLETE*
  3923. RECALL X5 WAIT FOR ALL QUIET
  3924. WRITEW X5,WSA,WSAL
  3925. EQ CEI2 LOOP FOR ANOTHER CHUNK
  3926.  
  3927. * EOR/EOF/EOI FOUND.
  3928.  
  3929. CEI3 SX1 X1+B1
  3930. NG X1,CEI5 IF END OF INFORMATION
  3931. SA0 X1
  3932. RECALL X5 WAIT FOR ALL QUIET
  3933. SX1 B6 SET LWA OF DATA IN BUFFER
  3934. WRITEW X5,WSA,X1-WSA
  3935. SX1 A0
  3936. ZR X1,CEI4 IF EOF RATHER THAN EOR
  3937. WRITER X5,R
  3938. RJ UDV UPDATE DUMP VSN
  3939. SA1 CRC
  3940. SX6 X1+1
  3941. SA6 A1 INCREMENT RECORD NUMBER
  3942. EQ CEI1 LOOP FOR NEXT RECORD
  3943.  
  3944. * END OF FILE FOUND.
  3945.  
  3946. CEI4 WRITEF X5,R
  3947. RJ UDV UPDATE DUMP VSN
  3948. SA1 CFC
  3949. SX6 X1+1
  3950. SA6 A1 INCREMENT FILE NUMBER
  3951. SX6 1
  3952. SA6 CRC INITIALIZE RECORD NUMBER
  3953. EQ CEI1 LOOP FOR NEXT THING AFTER EOF
  3954.  
  3955. * END-OF-INFORMATION FOUND.
  3956.  
  3957. CEI5 MX6 2 SET END OF DUMP INDICATOR
  3958. LX6 1
  3959. SA6 CRC
  3960. SA1 CFC ADJUST FILE POSITION
  3961. SX6 X6-1
  3962. SA6 A1
  3963. EQ CEIX RETURN
  3964. CFJ SPACE 4,10
  3965. ** CFJ - CONVERT FROM JULIAN (BINARY) TO DISPLAY *YYMMDD*.
  3966. *
  3967. * ENTRY (X1) = BINARY JULIAN DATE.
  3968. *
  3969. * EXIT (X6) = DISPLAY CODE DATE.
  3970. *
  3971. * USES X - 1, 2, 3, 4, 6, 7.
  3972. * A - 4.
  3973. *
  3974. * CALLS CDD.
  3975.  
  3976.  
  3977. CFJ SUBR ENTRY/EXIT
  3978.  
  3979. * ISOLATE YEAR IN X1.
  3980.  
  3981. SX4 1000
  3982. BX2 X4
  3983. BX3 X1 SAVE JULIAN DATE
  3984. IX1 X1/X2 YYDDD / 1000 = YEAR
  3985. IX4 X1*X4
  3986. IX3 X3-X4 REMAINDER = DDD
  3987.  
  3988. * COMPUTE MONTH IN X2.
  3989.  
  3990. MX7 58 CHECK FOR LEAP YEAR
  3991. BX7 -X7*X1 IS YEAR DIVISIBLE BY 4
  3992. SX2 12
  3993. CFJ1 SX2 X2-1
  3994. SA4 MONTH+X2
  3995. NZ X7,CFJ2 IF NOT A LEAP YEAR
  3996. LX4 30
  3997. CFJ2 SX4 X4
  3998. IX6 X3-X4
  3999. NG X6,CFJ1 IF NOT THIS MONTH
  4000. SX2 X2+B1
  4001.  
  4002. * ISOLATE DAY IN X3.
  4003.  
  4004. IX3 X3-X4
  4005. SX3 X3+B1
  4006.  
  4007. * BUILD FINAL RESULT.
  4008.  
  4009. SX1 X1+100 BIAS TO ACCOMODATE YEARS .GE. 2000
  4010. SX6 10000
  4011. IX1 X1*X6 YY*10000
  4012. SX6 100
  4013. IX6 X2*X6 MM*100
  4014. IX1 X1+X6 YY + MM
  4015. IX1 X1+X3 YYMM + DD
  4016. RJ CDD CONVERT TO DECIMAL DISPLAY
  4017.  
  4018. * INSERT SLASHES.
  4019.  
  4020. SX2 1R/
  4021. MX7 -12D
  4022. LX4 18 YY
  4023. BX6 -X7*X4
  4024. LX6 6 /
  4025. BX6 X2+X6
  4026. LX4 12 MM
  4027. BX1 -X7*X4
  4028. LX6 12
  4029. BX6 X1+X6
  4030. LX6 6 /
  4031. BX6 X2+X6
  4032. MX7 48 DD
  4033. LX4 12
  4034. BX1 -X7*X4
  4035. LX1 12
  4036. LX6 24
  4037. BX6 X1+X6
  4038. SX1 2R INSERT 2 SPACES
  4039. BX6 X1+X6
  4040. LX6 54 POSITION FINAL RESULT
  4041. EQ CFJX RETURN
  4042.  
  4043.  
  4044. MONTH BSS 0
  4045. VFD 30/001,30/001 JANUARY
  4046. VFD 30/032,30/032 FEBRUARY
  4047. VFD 30/061,30/060 MARCH
  4048. VFD 30/092,30/091 APRIL
  4049. VFD 30/122,30/121 MAY
  4050. VFD 30/153,30/152 JUNE
  4051. VFD 30/183,30/182 JULY
  4052. VFD 30/214,30/213 AUGUST
  4053. VFD 30/245,30/244 SEPTEMBER
  4054. VFD 30/275,30/274 OCTOBER
  4055. VFD 30/306,30/305 NOVEMBER
  4056. VFD 30/336,30/335 DECEMBER
  4057. COE SPACE 4,10
  4058. ** COE - CALCULATE OPLD ENTRY.
  4059. *
  4060. * ENTRY (X2) = FET OF RANDOM FILE.
  4061. *
  4062. * EXIT OPLD ENTRY CREATED.
  4063. *
  4064. * USES X - 0, 1, 3, 5, 6.
  4065. * A - 1, 3, 6.
  4066. *
  4067. * MACROS WRITEW.
  4068.  
  4069.  
  4070. COE SUBR ENTRY/EXIT
  4071. BX5 X2
  4072. SA1 INDXLEN
  4073. NZ X1,COE1 IF INDEX HAS BEEN CREATED
  4074.  
  4075. * CREATE INDEX RECORD.
  4076.  
  4077. SX6 2
  4078. SA6 A1 SAVE INDEX LENGTH
  4079. SX6 B1
  4080. SA6 INDXNAM+1
  4081. WRITEW OPLDF,INDXNAM,2
  4082. EQ COE2 SAVE RANDOM INDEX
  4083.  
  4084. COE1 SX6 X1+2
  4085. SA6 A1 INCREASE INDEX LENGTH
  4086. WRITEW OPLDF,INDXNAM,2
  4087.  
  4088. * SAVE RANDOM INDEX.
  4089.  
  4090. COE2 SA3 X5+6 GET RANDOM INDEX
  4091. LX3 30
  4092. MX0 30
  4093. BX6 -X0*X3 EXTRACT PRU ADDRESS
  4094. SX6 X6+B1
  4095. SA6 INDXNAM+1
  4096. EQ COEX RETURN
  4097. CRF SPACE 4,15
  4098. ** CRF - CHECK RESERVED FILE NAMES.
  4099. *
  4100. * ENTRY (X6) = FILE NAME TO BE CHECKED AGAINST RESERVED LIST.
  4101. * (TF) = LFN IN USE FOR DUMP FILE.
  4102. *
  4103. * EXIT (X6) = 0 IF FILE NAME IS IN RESERVED LIST.
  4104. * (X6) = FILE NAME IF NOT IN RESERVED LIST.
  4105. *
  4106. * USES X - 0, 1, 3, 6, 7.
  4107. * A - 1, 3, 7.
  4108. * B - 3.
  4109. *
  4110. * CALLS IMI.
  4111.  
  4112.  
  4113. CRF SUBR ENTRY/EXIT
  4114. SA1 TF GET CURRENT DUMP FILE LFN
  4115. SA3 CRFA-1 SET UP FOR RESERVED FILE NAME CHECK
  4116. MX0 42
  4117. BX7 X0*X1
  4118. SA7 A3+1 SET DUMP FILE LFN INTO TABLE
  4119. CRF1 SA3 A3+1 CHECK NEXT RESERVED NAME
  4120. ZR X3,CRFX IF ALL RESERVED NAMES CHECKED
  4121. BX3 X3-X6
  4122. NZ X3,CRF1 IF NO MATCH
  4123. MX7 6
  4124. CRF2 LX7 -6
  4125. BX3 X6*X7
  4126. NZ X3,CRF2 IF END OF FILE NAME NOT REACHED
  4127. SA3 =8L........
  4128. BX7 X3*X7
  4129. BX7 X6+X7
  4130. SA7 CRFB+4
  4131. SB3 CRFB
  4132. SA1 COPTION
  4133. RJ IMI ISSUE RESERVED FILE MESSAGE
  4134. SX6 B0+ INDICATE RESERVED FILE NAME MATCH
  4135. EQ CRFX RETURN
  4136.  
  4137.  
  4138. CRFA BSS 0 RESERVED FILE NAME TABLE
  4139. DATA 0LTAPE (REPLACED BY CURRENT DUMP FILE LFN)
  4140. DATA 0LINPUT
  4141. DATA 0LOUTPUT
  4142. DATA 0LZZZZZG0
  4143. DATA 0LZZZZZG1
  4144. DATA 0LZZZZZG2
  4145. DATA 0LZZZZZG3
  4146. DATA 0LZZZZZG4
  4147. DATA 0LZZZZZG5
  4148. DATA 0LZZZZZG6
  4149. DATA 0LZZZZZG7
  4150. DATA 0LZZZZZG8
  4151. DATA 0LZZZZZG9
  4152. CON 0 END OF RESERVED FILE NAME TABLE
  4153. CRFB DATA C* !!!! NOT ALLOWED OF RESERVED FILE NAME XXXXXXX.*
  4154. CRI SPACE 4,15
  4155. ** CRI - CRITERIA CHECKER.
  4156. *
  4157. * ENTRY (A0) = STARTING ADDRESS OF 4 WORD ENTRY.
  4158. * (LAD) = LAST ACCESS DATE FROM PFC.
  4159. * = 0 IF PFC NOT AVAILABLE.
  4160. *
  4161. * EXIT (X5) = 0 IF CURRENT RECORD MEETS CRITERIA.
  4162. *
  4163. * USES X - ALL.
  4164. * A - 1, 2, 5, 6, 7.
  4165. * B - 2.
  4166. *
  4167. * CALLS PFN.
  4168.  
  4169.  
  4170. CRI SUBR ENTRY/EXIT
  4171. SA1 UNV CHECK USERNAME
  4172. ZR X1,CRI0.4 IF *UN=0* OPTION
  4173. SA2 A0+DBUNM
  4174. MX0 42
  4175. BX1 X1-X2
  4176. BX1 X0*X1
  4177. ZR X1,CRI0.4 IF SPECIFIED USER NAME
  4178. SA5 A0+DBFLG FIND TYPE OF DUMP
  4179. SA2 TF+TMSV GET MASS STORAGE FLAG FOR DUMP
  4180. LX5 59-47
  4181. ZR X2,CRI0.1 IF LOOKING FOR TAPE
  4182. PL X5,CRI19 IF A TAPE DUMP
  4183. EQ CRI0.2 CHECK DUMP FILE
  4184.  
  4185. CRI0.1 NG X5,CRI19 IF A MASS STORAGE DUMP
  4186. MX0 36 SET MASK FOR TAPE VSN
  4187. CRI0.2 SA1 TF+TTNV
  4188. SA2 A0+DBTNO
  4189. BX5 X1-X2
  4190. BX5 X0*X5
  4191. NZ X5,CRI19 IF NOT SAME TAPE
  4192. SA1 TNN
  4193. SA2 COPTION
  4194. NZ X1,CRI0.3 IF VSN OCCURS UNDER CURRENT USER
  4195. MX6 -0 MARK VSN FOUND FOR OTHER USER
  4196. SA6 A1
  4197.  
  4198. * FOR *COMPACT* DIRECTIVES FOR A SPECIFIC USER NAME, ALL FILES
  4199. * ON THE DUMP FILE FOR OTHER USER NAMES MUST BE SELECTED.
  4200.  
  4201. CRI0.3 SA1 =0LCOMPACT
  4202. BX1 X1*X2
  4203. NZ X1,CRI19 IF NOT PROCESSING *COMPACT*
  4204. EQ CRI22 CHECK EXCEPTION PROCESSING
  4205.  
  4206. * CHECK FOR DELETED FILES.
  4207.  
  4208. CRI0.4 SA5 DEV DELETED FILE VARIABLE
  4209. SA1 A0+DBFLG
  4210. PL X1,CRI1 IF FILE HAS NOT BEEN DELETED
  4211. NZ X5,CRI2 IF USER PROCESSING DELETED FILES ONLY
  4212. EQ CRI19 DELETED FILE ENCOUNTERED
  4213.  
  4214. CRI1 NZ X5,CRI19 IF PROCESSING ONLY DELETED FILES
  4215.  
  4216. * IS LATEST VERSION OPTION SET.
  4217.  
  4218. CRI2 SA5 TF+TTNV TAPE NUMBER VARIABLE
  4219. ZR X5,CRI2.2 IF DUMP NAME/VSN NOT SELECTED
  4220. SA1 A0+DBFLG WORD WITH TAPE FLAGS
  4221. LX1 59-47
  4222. MX0 42
  4223. SA2 TF+TMSV
  4224. PL X1,CRI2.0 IF A TAPE DUMP
  4225. NZ X2,CRI2.1 IF LOOKING FOR MASS STORAGE DUMP
  4226. EQ CRI19 NO MATCH - WRONG TYPE OF DUMP
  4227.  
  4228. CRI2.0 NZ X2,CRI19 IF LOOKING FOR MASS STORAGE DUMP
  4229. MX0 36
  4230. CRI2.1 SA1 A0+DBTNO DUMP FILE NAME/VSN ON DATABASE
  4231. BX5 X1-X5
  4232. BX5 X0*X5
  4233. NZ X5,CRI19 IF NO MATCH
  4234. SA1 TNN NUMBER OF TIMES SPECIFIED VSN ENCOUNTERED
  4235. SX6 X1+B1
  4236. SA6 A1 INCREMENT COUNT
  4237. CRI2.2 SA1 A0+DBPFN PERMANENT FILE NAME ON DATABASE
  4238. MX0 42
  4239. SA2 LVV LATEST VERSION VARIABLE
  4240. ZR X2,CRI3 IF LATEST VERSION NOT PART OF CRITERIA
  4241. SA5 MRUSER LAST USER NAME PROCESSED
  4242. SA2 A0+DBUNM
  4243. BX4 X0*X2
  4244. BX7 X0*X1
  4245. BX5 X4-X5
  4246. NZ X5,CRI3 IF LAST USER NAME NOT EQUAL CURRENT
  4247. SA5 MRFILE LAST PERMANENT FILE PROCESSED
  4248. BX5 X7-X5
  4249. ZR X5,CRI19 IF FILE NAME EQUAL TO LAST ONE PROCESSED
  4250.  
  4251. * CHECK PERMANENT FILE NAME.
  4252.  
  4253. CRI3 SA5 TF+TMSV MASS STORAGE VARIABLE
  4254. ZR X5,CRI3.0 IF NOT MASS STORAGE DUMP
  4255. SA2 TF+TDNV DUMP NAME VARIABLE
  4256. BX2 X1-X2
  4257. BX2 X0*X2
  4258. ZR X2,CRI19 IF DUMPING TO THE DUMP FILE
  4259. CRI3.0 SA5 PFV PERMANENT FILE VARIABLE
  4260. SA4 FNV
  4261. BX5 X5+X4
  4262. ZR X5,CRI5 IF NOT SET
  4263. BX2 X1-X5
  4264. BX2 X0*X2
  4265. ZR X2,CRI5 IF A MATCH
  4266.  
  4267. * CHECK FOR PF=*.
  4268.  
  4269. LX5 6
  4270. SX5 X5-1R*
  4271. NZ X5,CRI19 IF NOT PF=*
  4272. SA5 PFTAB CHECK IF PFN TABLE IS NOT EMPTY
  4273. NZ X5,CRI3.1 IF PFN TABLE IS OCCUPIED
  4274. RJ PPF PROCESS PERMANENT FILE LIST
  4275. SA1 A0+DBPFN DATABASE ENTRY PFN
  4276. MX0 6*7
  4277. CRI3.1 SA5 PFTAB-1
  4278. BX1 X0*X1
  4279. CRI4 SA5 A5+B1
  4280. ZR X5,CRI19 IF END OF TABLE
  4281. BX6 X0*X5
  4282. BX2 X6-X1
  4283. NZ X2,CRI4 IF FILE NAME NOT IN TABLE
  4284. SX1 A5-PFTAB *NNTAB* OFFSET
  4285. SX1 X1+NNTAB POSITION IN *NNTAB*
  4286. SA2 X1 NEW NAME ADDRESS
  4287. ZR X2,CRI5 IF NO NEW FILE NAME
  4288. SA2 A0+DBUNM WORD 1 OF DATABASE ENTRY
  4289. BX2 X0*X2
  4290. BX1 -X0*X1
  4291. BX7 X2+X1 42/UN,18/NEW NAME ADDR
  4292. SA7 A2 WORD 1 OF DATABASE ENTRY
  4293.  
  4294. * CHECK LAST MODIFICATION DATE.
  4295.  
  4296. CRI5 SA5 MDV LAST MODIFICATION
  4297. SA1 A0+DBLMO
  4298. BX1 -X0*X1
  4299. ZR X5,CRI6 IF *MD* NOT SPECIFIED
  4300. BX5 X1-X5
  4301. NZ X5,CRI19 IF NO MATCH
  4302.  
  4303. * CHECK MODIFIED AFTER DATE.
  4304.  
  4305. CRI6 SX1 X1-70000
  4306. PL X1,CRI6.1 IF YEAR .LT. 2000
  4307. SX1 X1+100000
  4308. CRI6.1 SA5 MAV MODIFIED AFTER
  4309. ZR X5,CRI7 IF NOT SET
  4310. SX5 X5-70000
  4311. PL X5,CRI6.2 IF YEAR .LT. 2000
  4312. SX5 X5+100000
  4313. CRI6.2 IX5 X5-X1
  4314. PL X5,CRI19 IF MODIFY DATE .LE. SPECIFIED DATE
  4315.  
  4316. * CHECK MODIFIED BEFORE DATE.
  4317.  
  4318. CRI7 SA5 MBV MODIFIED BEFORE
  4319. ZR X5,CRI8 IF NOT SET
  4320. SX5 X5-70000
  4321. PL X5,CRI7.1 IF YEAR .LT. 2000
  4322. SX5 X5+100000
  4323. CRI7.1 IX5 X1-X5
  4324. PL X5,CRI19 IF MODIFY DATE .GE. REQUESTED
  4325.  
  4326. * CHECK LAST ACCESS DATE.
  4327.  
  4328. CRI8 SA1 LAD
  4329. SA5 ADV LAST ACCESS
  4330. ZR X1,CRI9 IF LAST ACCESS DATE NOT AVAILABLE
  4331. BX1 -X0*X1
  4332. ZR X5,CRI8.0 IF *AD* NOT SPECIFIED
  4333. BX5 X1-X5
  4334. NZ X5,CRI19 IF NO MATCH
  4335.  
  4336. * CHECK ACCESSED AFTER DATE.
  4337.  
  4338. CRI8.0 SX1 X1-70000
  4339. PL X1,CRI8.1 IF YEAR .LT. 2000
  4340. SX1 X1+100000
  4341. CRI8.1 SA5 AAV ACCESSED AFTER
  4342. ZR X5,CRI8.3 IF NOT SET
  4343. SX5 X5-70000
  4344. PL X5,CRI8.2 IF YEAR .LT. 2000
  4345. SX5 X5+100000
  4346. CRI8.2 IX5 X5-X1
  4347. PL X5,CRI19 IF ACCESS DATE .LE. SPECIFIED DATE
  4348.  
  4349. * CHECK ACCESSED BEFORE DATE.
  4350.  
  4351. CRI8.3 SA5 ABV ACCESSED BEFORE
  4352. ZR X5,CRI9 IF NOT SET
  4353. SX5 X5-70000
  4354. PL X5,CRI8.4 IF YEAR .LT. 2000
  4355. SX5 X5+100000
  4356. CRI8.4 IX5 X1-X5
  4357. PL X5,CRI19 IF ACCESS DATE .GE. SPECIFIED DATE
  4358.  
  4359. * CHECK FILE TYPE.
  4360.  
  4361. CRI9 SA5 TYV FILE TYPE
  4362. ZR X5,CRI10 IF NOT A MATCH CRITERION
  4363. MX2 1
  4364. SA1 A0+DBFTY
  4365. LX1 12
  4366. MX3 -6
  4367. BX1 -X3*X1
  4368. LX5 6
  4369. BX5 X1-X5
  4370. NZ X5,CRI19 IF NO MATCH
  4371.  
  4372. * CHECK DUMP DATE.
  4373.  
  4374. CRI10 SA5 DDV DUMP DATE
  4375. SA1 A0+DBDDT
  4376. BX1 -X0*X1
  4377. ZR X5,CRI11 IF NOT SET
  4378. BX5 X5-X1
  4379. NZ X5,CRI19 IF NO MATCH
  4380.  
  4381. * CHECK DUMPED BEFORE DATE.
  4382.  
  4383. CRI11 SX1 X1-70000
  4384. PL X1,CRI11.1 IF YEAR .LT. 2000
  4385. SX1 X1+100000
  4386. CRI11.1 SA5 DBV DUMPED BEFORE
  4387. ZR X5,CRI12 IF NOT SET
  4388. SX5 X5-70000
  4389. PL X5,CRI11.2 IF YEAR .LT. 2000
  4390. SX5 X5+100000
  4391. CRI11.2 IX5 X1-X5
  4392. PL X5,CRI19 IF DATE GREATER THAN REQUESTED
  4393.  
  4394. * CHECK DUMPED AFTER DATE.
  4395.  
  4396. CRI12 SA5 DAV DUMPED AFTER
  4397. ZR X5,CRI13 IF NOT SET
  4398. SX5 X5-70000
  4399. PL X5,CRI12.1 IF YEAR .LT. 2000
  4400. SX5 X5+100000
  4401. CRI12.1 IX5 X5-X1
  4402. PL X5,CRI19 IF DATE LESS THAN REQUESTED
  4403.  
  4404. * CHECK LESS THAN FIELD.
  4405.  
  4406. CRI13 SA5 LTV FILE SIZE LESS THAN
  4407. SA1 A0+DBLEN
  4408. BX1 -X0*X1
  4409. ZR X5,CRI14 IF NOT SET
  4410. IX5 X5-X1
  4411. NG X5,CRI19 IF SIZE TOO BIG
  4412. ZR X5,CRI19 IF SAME VALUE AS THAT ISSUED BY USER
  4413.  
  4414. * CHECK GREATER THAN FIELD.
  4415.  
  4416. CRI14 SA5 GTV FILE SIZE GREATER THAN
  4417. NG X5,CRI15 IF *GT=0* SELECTED
  4418. ZR X5,CRI16 IF *GT* OPTION OMITTED
  4419. CRI15 IX5 X5-X1
  4420. PL X5,CRI19 IF SIZE TOO SMALL
  4421. ZR X5,CRI19 IF SAME VALUE AS THAT ISSUED BY USER
  4422.  
  4423. * CHECK RECORD NUMBER.
  4424.  
  4425. CRI16 SA1 RCV RECORD NUMBER VARIABLE
  4426. SA2 A0+DBLEN
  4427. AX2 18
  4428. ZR X1,CRI17 IF NOT SET
  4429. MX0 -12D
  4430. BX5 -X0*X2
  4431. BX5 X5-X1
  4432. NZ X5,CRI19 IF RC ON DATABASE .NE. RCV
  4433.  
  4434. * CHECK FILE NUMBER.
  4435.  
  4436. CRI17 SA1 FIV FILE NUMBER VARIABLE
  4437. ZR X1,CRI18 IF NOT SET
  4438. MX0 -6
  4439. AX2 12D
  4440. BX5 -X0*X2
  4441. BX5 X5-X1
  4442. NZ X5,CRI19 IF FILE POSITION ON DB .NE. FIV
  4443. ZR X1,CRI20 IF NOT SET
  4444.  
  4445. * CHECK LATEST VERSION.
  4446.  
  4447. CRI18 SA1 LVV LATEST VERSION VARIABLE
  4448. SA1 A0+DBUNM
  4449. MX0 42
  4450. BX6 X0*X1
  4451. SA1 A0+DBPFN
  4452. BX7 X0*X1
  4453. SA6 MRUSER
  4454. SA7 MRFILE
  4455. EQ CRI20 DONT SET ERROR FLAG
  4456.  
  4457. * MATCH CRITERIA WERE NOT MET.
  4458.  
  4459. CRI19 SX5 B1 CRITERIA UNMET STATUS
  4460. EQ CRI22 CHECK FOR EXCEPTION PROCESSING
  4461.  
  4462. * SET FILE SELECTED FLAG IF PF IS PART OF CRITERIA
  4463.  
  4464. CRI20 SA1 PFTAB PERMANENT FILE TABLE
  4465. SA2 PPFLAG VERIFY FILE NAME IS PART OF CRITERIA
  4466. BX5 X5-X5 SET CRITERIA MET STATUS
  4467. BX1 X1+X2
  4468. ZR X1,CRI22 IF FILE NAME NOT PART OF CRITERIA
  4469. SA2 A0+DBPFN
  4470. MX0 6*7
  4471. BX2 X0*X2
  4472. SA1 PFTAB-1
  4473. CRI21 SA1 A1+B1
  4474. ZR X1,CRI19 IF END OF FILE LIST
  4475. BX3 X0*X1
  4476. BX3 X2-X3
  4477. NZ X3,CRI21 IF NO MATCH
  4478. SX6 B1
  4479. BX6 X6+X1 SET FILE SELECTED FLAG IN BIT ZERO
  4480. SA6 A1 SAVE IN PFTAB
  4481.  
  4482. * CHECK FOR CRITERIA EXCEPTION PROCESSING
  4483.  
  4484. CRI22 SA1 EXV EXCEPTION VARIABLE
  4485. ZR X1,CRIX IF NO EXCEPTION PROCESSING
  4486. SX1 B1
  4487. BX5 X1-X5 REVERSE ZERO/NON-ZERO EXIT CONDITION
  4488. EQ CRIX RETURN
  4489. CTF SPACE 4,20
  4490. ** CTF - COPY *PFDUMP* FILE TO DISK AND REMOVE CONTROL WORDS.
  4491. *
  4492. * ENTRY (A5) = ADDRESS OF 6-WORD SORT RECORD.
  4493. *
  4494. * EXIT FILE COPIED TO DISK.
  4495. *
  4496. * ERROR TO *ABT* IF INCORRECT DATA TYPE.
  4497. *
  4498. * USES X - ALL.
  4499. * A - 1, 2, 3, 4, 5, 6, 7.
  4500. * B - 5.
  4501. *
  4502. * CALLS CCE, CDR, CRF, CRI, CTJ, ICF, ILC, POT, PPB, ZTB.
  4503. *
  4504. * MACROS MEMORY, MESSAGE, PURGE, READ, READW, RECALL, SAVE,
  4505. * SKIPF, UNLOAD, WRITE, UNLOAD, WRITEW, WRITECW.
  4506.  
  4507.  
  4508. CTF SUBR ENTRY/EXIT
  4509. RECALL TF
  4510. SX6 TFBUF RESET TAPE BUFFER POINTERS
  4511. SA6 X2+2
  4512. SA6 A6+B1
  4513. READ X2,R
  4514. READW X2,WSA,B1 READ 1ST WORD OF FILE
  4515. BX6 X1 SAVE READ STATUS FOR LATER EXAMINATION
  4516. SA6 CTFA
  4517. SX6 PRMITB FLAG NO PERMITS
  4518. SA6 CTFPLWA
  4519. SA1 LDFN PRESET SCRATCH FILE NAME
  4520. SA2 LOADFLG
  4521. MX0 42 SET LFN IN COPY OUTPUT FET
  4522. BX6 X1
  4523. NZ X2,CTF1 IF A LOAD USE SCRATCH NAME
  4524. SA1 DBNAM DATABASE NAME
  4525. ZR X1,CTF1.1 IF NOT USING DATABASE
  4526. SA1 A5+B1
  4527. SA2 NNV NEW NAME VARIABLE
  4528. BX6 X0*X1
  4529. NZ X2,CTF0 IF ALTERNATE LFN/PFN SPECIFIED
  4530. SA2 A1+B1 WORD 3 OF SORTED RECORD
  4531. BX1 -X0*X2
  4532. BX2 X6
  4533. ZR X1,CTF0 IF NO NEW NAME
  4534. SA2 X1
  4535. CTF0 BX6 X0*X2 NEW FILE NAME
  4536. RJ CRF CHECK RESERVED FILE NAMES
  4537. ZR X6,CTF15 IF A RESERVED FILE NAME
  4538. RJ ICF INITIALIZE COPY FET
  4539. EQ CTF1.1 CONTINUE PROCESSING
  4540.  
  4541. CTF1 SA1 SF GET CODE/STATUS
  4542. BX1 -X0*X1
  4543. BX6 X1+X6
  4544. SA6 A1
  4545. CTF1.0 UNLOAD SF,R PREVENT ANY *PFM* ERRORS
  4546. WRITECW SF,R PRESET *WRITECW* FUNCTION
  4547. CTF1.1 SA1 CTFA CHECK INITIAL READ STATUS
  4548. ZR X1,CTF2 IF DATA ENCOUNTERED
  4549. SA2 DBNAM
  4550. NZ X2,CTF1.2 IF NOT DB=0
  4551. SX3 X1+2 CHECK FOR EOI ON FILE
  4552. ZR X3,CTF2.2 IF EOI ON FILE
  4553. SX3 X1+B1 CHECK FOR EOF ON FILE
  4554. NZ X3,CTF16 IF NOTE EOF ON READ
  4555. SA1 CRC
  4556. ZR X1,CTF16 IF PSEUDO FILE POINT JUST PROCESSED
  4557. BX6 X6-X6 RESET RECORD NUMBER
  4558. SA6 A1
  4559. SA2 CFC INCREMENT FILE COUNTER
  4560. SX6 X2+B1
  4561. SA6 A2
  4562. EQ CTF16 TRY AGAIN
  4563.  
  4564. CTF1.2 MESSAGE EREI,3,R * DUMP FILE MALFUNC - EOI ENCOUNTERED.*
  4565. EQ CTF15 FINISH UP
  4566.  
  4567. CTF2 SA1 TFBUF READ CATALOG CONTROL WORD
  4568. SX2 X1-11000B CHECK FOR NORMAL *PFC*
  4569. AX2 9
  4570. ZR X2,CTF2.3 IF VALID CATALOG CODE
  4571. SA2 DBNAM DATABASE NAME
  4572. NZ X2,CTF2.1 IF USING DATABASE - ERROR
  4573. SA2 HDRPFD
  4574. BX2 X1-X2
  4575. AX2 24
  4576. ZR X2,CTF2.0 IF *PFDUMP* OR CURRENT *RECLAIM* HEADER
  4577. SA2 =7LRECLAIM
  4578. BX2 X1-X2
  4579. AX2 18
  4580. NZ X2,CTF16 IF NOT INTERIM *RECLAIM* HEADER
  4581. CTF2.0 READW TF,WSA+1,HDRSZ
  4582. SA5 /COMSPFS/DAAL+WSA+1 GET DUMP DATE FROM HEADER
  4583. RJ CTJ CONVERT TO JULIAN
  4584. SA6 HDRJDT
  4585. EQ CTF16 GO ON TO NEXT RECORD
  4586.  
  4587. CTF2.1 MESSAGE ERUP,3,R * DUMP FILE MALFUNC - UNRECOGNIZABLE PFC.*
  4588. EQ CTF15 FINISH UP
  4589.  
  4590. CTF2.2 SX6 B1+
  4591. SA6 EOIFLG SET EOIFLG FOR COPY
  4592. EQ CTFX RETURN
  4593.  
  4594. CTF2.3 SA2 DBNAM
  4595. ZR X2,CTF3 IF NO DATA BASE
  4596. SA2 A5+B1 VERIFY FILE NAME
  4597. BX2 X2-X1
  4598. MX0 42
  4599. BX2 X0*X2
  4600. ZR X2,CTF3 IF FILE NAME MATCHES OK
  4601. MESSAGE ERFM,3,R * DUMP FILE MALFUNC - FILE NAME MISMATCH.*
  4602. EQ CTF15 FINISH UP
  4603.  
  4604. CTF3 BX6 X6-X6 CLEAR PREVIOUS PERMIT TABLE
  4605. SA6 PRMITB
  4606. EQ CTF5 PROCESS THIS RECORD
  4607.  
  4608. * GET NEXT TAPE BLOCK HEADER.
  4609.  
  4610. CTF4 READW TF,WSA,B1 READ CONTROL WORD
  4611. NZ X1,CTF9.9 IF NO MORE DATA
  4612. CTF5 MX0 -9
  4613. SA1 WSA
  4614. BX5 X1
  4615. BX1 -X0*X1 EXTRACT LENGTH
  4616. SB5 X1 READ IN REMAINDER OF CATALOG IMAGE BLOCK
  4617. LX5 48
  4618. MX0 -3
  4619. BX3 -X0*X5 EXTRACT CODE
  4620.  
  4621. * DETERMINE CURRENT BLOCK TYPE.
  4622.  
  4623. SX2 X3-1
  4624. NZ X2,CTF6 IF NOT *CATALOG* BLOCK HEADER
  4625. READW TF,WSA+1,B5
  4626. ZR X1,CTF5.0 IF PFC BLOCK IS CORRECT SIZE
  4627. MESSAGE ERUP,3,R * DUMP FILE MALFUNC - UNRECOGNIZABLE PFC.*
  4628. EQ CTF15 FINISH UP
  4629.  
  4630. CTF5.0 LX5 12 EXTRACT SIZE OF THIS BLOCK
  4631. MX0 -9
  4632. BX5 -X0*X5
  4633. SX5 X5-NWCE COMPARE WITH PFC SIZE
  4634. ZR X5,CTF5.1 IF SIZE IS CORRECT
  4635. SX4 WSA+1 FWA OF PFC
  4636. RJ CCE CONVERT PFC TO CORRECT FORMAT
  4637. CTF5.1 SA3 DBNAM
  4638. NZ X3,CTF5.6 IF A DATA BASE
  4639. SA1 UIV
  4640. ZR X1,CTF5.2 IF *UI* NOT SPECIFIED
  4641. SA2 TFBUF+FCUI+1 PFC USER INDEX
  4642. MX0 -18
  4643. BX0 -X0*X2
  4644. BX1 X0-X1
  4645. NZ X1,CTF16 IF NOT THE SPECIFIED USER INDEX
  4646. CTF5.2 SA0 SORR+2 SET TO DUMMY DATABASE ENTRY
  4647. SA3 TFBUF+1 FWA OF PFC ENTRY INFO
  4648. SX5 B1
  4649. RJ CDR CREATE DATA BASE RECORD
  4650. SX5 B0+
  4651. RJ CRI CHECK THE CRITERIA
  4652. NZ X5,CTF16 IF CRITERIA DOES NOT MATCH
  4653. RJ POT PRINT OUT FILE BEING PROCESSED
  4654. SA1 NFP NUMBER OF FILES PROCESSED COUNTER
  4655. SX6 X1+1
  4656. SA6 A1 INCREMENT FILE PROCESSED COUNTER
  4657.  
  4658. * SET UP FIRST TWO WORDS IN SIX WORD ENTRY
  4659.  
  4660. MX0 42
  4661. SA1 A0+DBPFN GET PF
  4662. BX6 X0*X1
  4663. BX7 X6
  4664. SA1 LOADFLG CHECK IF LOAD OR COPY
  4665. NZ X1,CTF5.5 IF A LOAD
  4666. SA2 NNV NEW NAME VARIABLE
  4667. NZ X2,CTF5.4 IF NEW NAME SPECIFIED
  4668. BX2 X7 RESET FILE NAME
  4669. SA1 PFV PERMANENT FILE VARIABLE
  4670. ZR X1,CTF5.4 IF NO FILE NAMES
  4671. SX3 -1 PRESET COUNTER
  4672. CTF5.3 SX3 X3+1 INCREMENT COUNTER
  4673. SA1 PFTAB+X3 FILE NAME TABLE ENTRY
  4674. ZR X1,CTF5.4 IF END OF TABLE
  4675. BX4 X0*X1 ISOLATE FILE NAME
  4676. BX4 X6-X4
  4677. NZ X4,CTF5.3 IF PFNS DO NOT MATCH
  4678. SA2 NNTAB+X3 CORRESPONDING ADDRESS IN NNTAB
  4679. NZ X2,CTF5.4 IF NEW NAME SPECIFIED
  4680. BX2 X6
  4681. CTF5.4 BX6 X0*X2
  4682. RJ CRF CHECK RESERVED FILE NAMES
  4683. ZR X6,CTF15 IF A RESERVED FILE NAME
  4684. RJ ICF INITIALIZE COPY FET
  4685. SA2 SF RESTORE FILE NAME
  4686. BX6 X0*X2
  4687. CTF5.5 SA1 A0+DBFTY
  4688. LX1 24
  4689. BX2 -X0*X1
  4690. BX6 X6+X2 WORD TWO OF SIX WORD ENTRY
  4691. SA6 SORR+1
  4692. LX1 18
  4693. BX6 -X0*X1
  4694. SA1 A0+DBTNO GET TN
  4695. BX1 X0*X1
  4696. BX6 X1+X6
  4697. SA6 SORR
  4698. SA5 A6 SET POINTER FOR SIX WORD ENTRY
  4699. CTF5.6 RJ MFP MAKE FILE PERMANENT
  4700. NZ X1,CTF15 IF AN ERROR CREATING FILE
  4701. WRITECW SF,* PRESET WRITE FUNCTION
  4702. EQ CTF4 GET NEXT TAPE BLOCK HEADER
  4703.  
  4704. * MOVE PERMIT BLOCK TO PERMITS HOLDING TABLE.
  4705.  
  4706. CTF6 SX2 X3-2
  4707. NZ X2,CTF7 IF NOT *PERMIT* BLOCK HEADER
  4708. SA1 MEMORY GET CURRENT FIELD LENGTH
  4709. SA4 CTFPLWA GET CURRENT PERMIT BUFFER LWA
  4710. SB5 B5-NWPH DISCOUNT PERMIT HEADER
  4711. AX1 30
  4712. SX6 X4+B5 COMPUTE NEW PERMIT BUFFER LWA
  4713. SA6 A4
  4714. IX7 X1-X6 CHECK BUFFER LWA AGAINST FIELD LENGTH
  4715. SX7 X7-8
  4716. PL X7,CTF6.1 IF SUFFICIENT MEMORY TO HOLD PERMITS
  4717. ERRNG 64-PRMITBWC PERMIT BLOCK WORD COUNT TOO LARGE
  4718. SX6 X1+100B INCREASE FIELD LENGTH
  4719. LX6 30
  4720. SA6 MEMORY
  4721. MEMORY CM,MEMORY,R
  4722. CTF6.1 SX0 X4 SKIP PERMIT HEADER
  4723. READW TF,X4,NWPH
  4724. LX5 12 RESTORE WORD COUNT
  4725. MX1 -9
  4726. BX1 -X1*X5
  4727. SB5 X1-NWPH
  4728. READW TF,X0,B5 READ PERMITS TO BUFFER
  4729. NZ X1,CTF13 IF PFC MISMATCH
  4730. EQ CTF4 GET NEXT TAPE BLOCK HEADER
  4731.  
  4732. CTF7 SX0 X3-3 CHECK FOR DATA CONTROL WORD
  4733. ZR X0,CTF8 IF A DATA BLOCK
  4734. READW TF,WSA,B5 SKIP EXTRANEOUS TAPE BLOCK
  4735. NZ X1,CTF13 IF TRANSFER NOT NORMAL ISSUE ERROR
  4736. EQ CTF4 GET NEXT TAPE BLOCK HEADER
  4737.  
  4738. CTF8 LX5 3 RIGHT JUSTIFY BLOCK TYPE
  4739. MX0 -3 ISOLATE PLAIN/EOR/EOF/EOI CODE
  4740. BX3 -X0*X5
  4741. SX6 PRUSIZE PRESET PRU FREE SPACE COUNTER
  4742. SA6 CTFD
  4743. SX1 B0+
  4744. SX3 X3-4 CHECK FOR SYSTEM SECTOR
  4745. NZ X3,CTF9 IF NOT A SYSTEM SECTOR BLOCK
  4746. READW TF,WSA,B5 SKIP SYSTEM SECTOR BLOCK
  4747. NZ X1,CTF13 IF SKIP FAILED THEN ISSUE ERROR
  4748. CTF8.1 READW TF,WSA,1 READ DATA BLOCK HEADER
  4749.  
  4750. * PICK TAPE BLOCKS APART INTO PRU-S AND WRITE THEM TO DISK.
  4751.  
  4752. CTF9 NZ X1,CTF9.9 IF NO MORE DATA
  4753. SA1 WSA
  4754. MX0 -9 ISOLATE TAPE BLOCK LENGTH
  4755. BX6 -X0*X1
  4756. SA6 CTFB SAVE BLOCK WORD COUNT
  4757. MX0 -3 POSITION AND ISOLATE DATA BLOCK TYPE
  4758. AX1 9
  4759. BX7 -X0*X1
  4760. SA7 CTFC SAVE TYPE
  4761. SA2 CTFD PRU FREE SPACE COUNTER
  4762. SX3 X2-PRUSIZE
  4763. ZR X3,CTF9.3 IF ALL FREE SPACE
  4764. IX3 X6-X2 COMPUTE TAPE BLOCK SIZE - FREE SPACE
  4765. PL X3,CTF9.2 IF BLOCK SIZE .GE. FREE SPACE
  4766. ZR X6,CTF9.3 IF TAPE BLOCK IS EMPTY
  4767. SX5 SECTOR+PRUSIZE SET LWA+1 OF SECTOR
  4768. IX5 X5-X2 COMPUTE FWA OF SECTOR FREE SPACE
  4769. READW TF,X5,X6 MOVE TAPE BLOCK INTO SECTOR
  4770. EQ CTF9.5 JOIN WITH FS > WC
  4771.  
  4772. * THERE IS DATA IN *SECTOR* FROM THE PREVIOUS TAPE BLOCK, AND
  4773. * THE CURRENT TAPE BLOCK IS BIGGER THAN THE CURRENT FREE SPACE.
  4774.  
  4775. CTF9.2 SX5 SECTOR+PRUSIZE LWA+1 OF SECTOR
  4776. IX5 X5-X2 FWA OF FREE SPACE
  4777. SB5 X2 REMEMBER FREE SPACE SIZE
  4778. READW TF,X5,B5 FILL SECTOR
  4779. SA4 CTFB BLOCK WORD COUNT
  4780. SA2 CTFD SECTOR FREE SPACE
  4781. IX6 X4-X2 COMPUTE NEW WC = WC - FS
  4782. SX7 PRUSIZE
  4783. SA6 A4
  4784. SA7 A2 RESET TO FULL FREE SPACE
  4785. SX5 X7 SET AMOUNT TO COPY
  4786. RJ WRS WRITE SECTOR TO DISK
  4787.  
  4788. * NOW *SECTOR* IS EMPTY, AND THERE STILL MAY BE DATA LEFT IN
  4789. * THE TAPE BLOCK TO BREAK APART INTO PRU-S.
  4790.  
  4791. CTF9.3 SA4 CTFB CURRENT BLOCK WORD COUNT
  4792. SX3 X4-PRUSIZE CHECK FOR LESS THAN A FULL PRU
  4793. NG X3,CTF9.4 IF LESS THAN A SECTOR LEFT TO COPY
  4794. READW TF,SECTOR,PRUSIZE MOVE A WHOLE PRU
  4795. SX5 PRUSIZE SET AMOUNT TO WRITE OUT
  4796. RJ WRS WRITE SECTOR TO DISK
  4797. SA4 CTFB UPDATE WORD COUNT
  4798. SX6 X4-PRUSIZE SUBTRACT AMOUNT JUST WRITTEN
  4799. SA6 A4
  4800. EQ CTF9.3 LOOP FOR NEXT FULL SECTOR
  4801.  
  4802. CTF9.4 ZR X4,CTF9.6 IF TAPE BLOCK IS NOW EMPTY
  4803. READW TF,SECTOR,X4 COPY TAIL END OF BLOCK
  4804. CTF9.5 SA4 CTFB
  4805. SA2 CTFD
  4806. IX6 X2-X4 COMPUTE NEW FS = FS - WC
  4807. SA3 CTFC DATA BLOCK TYPE
  4808. SA6 A2
  4809. SX2 X3-1 CHECK FOR EOR BLOCK
  4810. NZ X2,CTF12 IF NOT EOR
  4811. SX7 PRUSIZE
  4812. IX5 X7-X6 COMPUTE SIZE OF SHORT PRU
  4813. SA7 A2 RESET FREE SPACE
  4814. RJ WRS WRITE SHORT PRU TO DISK
  4815. EQ CTF8.1 JOIN WITH EMPTY BLOCK CASE
  4816.  
  4817. CTF9.6 SA3 CTFC DATA BLOCK TYPE
  4818. SX2 X3-1 CHECK FOR EOR BLOCK
  4819. NZ X2,CTF9.7 IF NOT EOR BLOCK
  4820. SX5 B0+ WRITE ZERO-LENGTH PRU TO DISK
  4821. RJ WRS
  4822. EQ CTF8.1 JOIN WITH EOF AND EOI CASES
  4823.  
  4824. CTF9.7 SX2 X3-2 CHECK FOR EOF BLOCK
  4825. NZ X2,CTF9.8 IF NOT EOF BLOCK
  4826. WRITEW SF,PRUHEAD,1 WRITE EOF SECTOR
  4827. WRITEW SF,EOFWORD,1
  4828. EQ CTF8.1 JOIN WITH EOI CASE
  4829.  
  4830. CTF9.8 SX2 X3-3 CHECK FOR EOI BLOCK
  4831. NZ X2,CTF12 IF NOT EOI BLOCK
  4832. WRITECW SF,R FLUSH CIRCULAR BUFFER
  4833. WRITE SF,* SET WRITE FUNCTION
  4834. SA5 CTFB LEFTOVER WORD COUNT
  4835. ZR X5,CTF10 IF NOTHING LEFT TO COPY
  4836. READW TF,WSA,X5
  4837. WRITEW SF,WSA,X5
  4838. WRITE SF,R FLUSH LAST OF FILE
  4839. EQ CTF10 CLEAN UP AND RETURN
  4840.  
  4841. * HIT EOR/EOF/EOI ON TAPE.
  4842.  
  4843. CTF9.9 NG X1,CTF12.1 IF EOF OR EOI WHEN EOR EXPECTED
  4844. CTF10 WRITECW SF,R FLUSH CIRCULAR BUFFER
  4845. SA1 LOADFLG
  4846. ZR X1,CTFX IF A COPY
  4847. SX2 1RI
  4848. BX3 X2-X1 COMPARE WITH DATABASE TYPE
  4849. NZ X3,CTF11 IF NOT AN INDIRECT ACCESS FILE
  4850. SA1 SF
  4851. MX0 -8 WIDTH OF *PFM* ERROR CODE
  4852. LX0 17-7 POSITION TO LOCATION IN FET
  4853. BX6 X0*X1 CLEAR ANY PREVIOUS CODE
  4854. SA6 A1
  4855. SA1 A1+B1
  4856. SX0 4+1 SET *SA* AND *EP* BITS
  4857. LX0 44
  4858. BX6 X0+X1
  4859. MX0 12 CLEAR THE *DT* FIELD
  4860. BX6 -X0*X6
  4861. SA6 A1
  4862. SAVE SF,PFNAM,PFPASS,PFUCW,PFCAT,PFPERM,,,,PFSS,,,,,,PFAC
  4863. SA2 SF+1
  4864. SX0 4+1 CLEAR *SA* AND *EP* BITS
  4865. LX0 44
  4866. BX6 -X0*X2
  4867. SA6 A2
  4868. SA1 A2-B1
  4869. SX1 X1 EXAMINE BOTTOM 18 BITS
  4870. AX1 10 RIGHT JUSTIFY *PFM* ERROR CODE
  4871. NZ X1,CTF15 IF AN ERROR SAVING FILE
  4872. CTF11 RJ PPB PROCESS PERMIT BLOCK
  4873. UNLOAD SF,R
  4874. EQ CTFX RETURN
  4875.  
  4876. CTF12 ZR X3,CTF8.1 IF DATA TYPE IS NOT 5 OR 6 OR 7
  4877. CTF12.1 MESSAGE ERFT,3,R * DUMP FILE MALFUNC - FILE TRUNCATED.*
  4878. EQ CTF13.1 FINISH UP
  4879.  
  4880. CTF13 MESSAGE ERUP,3,R * DUMP FILE MALFUNC - UNRECOGNIZABLE PFC.*
  4881. CTF13.1 SA1 LOADFLG
  4882. ZR X1,CTF15 IF A COPY
  4883. SX2 1RI
  4884. BX3 X2-X1
  4885. ZR X3,CTF14 IF AN INDIRECT FILE
  4886. PURGE SF
  4887. CTF14 UNLOAD SF,R
  4888. CTF15 MX0 42
  4889. SA1 A5+B1 ENTRY WORD WITH PFN
  4890. BX1 X0*X1
  4891. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  4892. MX0 42
  4893. SA1 LDNG+3
  4894. BX6 X0*X6
  4895. BX1 -X0*X1
  4896. BX6 X6+X1 INSERT NAME IN MESSAGE
  4897. SA6 LDNG+3
  4898. WRITEC O,LDNG * SEE DAYFILE - UNABLE TO LOAD XXXXXXX.*
  4899. RJ ILC INCREMENT LINE COUNT
  4900.  
  4901. * SKIP FORWARD IF NOT AT EOR/EOI.
  4902.  
  4903. CTF16 SA1 TF CHECK STATUS
  4904. MX0 -18
  4905. BX1 -X0*X1
  4906. SX1 X1-13B
  4907. NZ X1,CTFX IF ALREADY AT EOR/EOF/EOI
  4908. SKIPF TF,,R
  4909. EQ CTFX RETURN
  4910.  
  4911.  
  4912. CTFA BSS 1 INITIAL DUMP FILE STATUS
  4913. CTFB BSS 1 BLOCK WORD COUNT
  4914. CTFC BSS 1 DATA BLOCK TYPE
  4915. CTFD BSS 1 PRU FREE SPACE COUNTER
  4916. CTFPLWA DATA 0 LWA OF PERMIT BUFFER
  4917. CTJ SPACE 4,15
  4918. ** CTJ - CONVERT DISPLAY DATE TO BINARY JULIAN DATE.
  4919. *
  4920. * ENTRY (X5) = DISPLAY DATE 36/0LYYMMDD,24/0.
  4921. * OR FORMATTED * YY/MM/DD.*.
  4922. * EXIT (X6) = BINARY JULIAN DATE.
  4923. * (X6) = 0 IF CONVERSION ERROR.
  4924. *
  4925. * USES X - 1, 2, 3, 4, 5, 6, 7.
  4926. * A - 4.
  4927. * B - 7.
  4928. *
  4929. * CALLS DXB.
  4930.  
  4931.  
  4932. CTJ2 SX6 B0+ SET ERROR STATUS
  4933.  
  4934. CTJ SUBR ENTRY/EXIT
  4935. MX4 -24
  4936. BX2 -X4*X5
  4937. ZR X2,CTJ0 IF YYMMDD FORMAT
  4938. MX4 12 CONVERT * YY/MM/DD.* FORMAT
  4939. LX5 6
  4940. BX3 X4*X5 ISOLATE YY
  4941. LX5 18
  4942. BX2 X4*X5 ISOLATE MM
  4943. LX5 18
  4944. BX5 X4*X5 ISOLATE DD
  4945. LX5 -12
  4946. BX5 X5+X2 MERGE TO MMDD
  4947. LX5 -12
  4948. BX5 X5+X3 MERGE TO YYMMDD
  4949. CTJ0 SB7 B1+
  4950. RJ DXB CONVERT (DECIMAL) DISPLAY TO BINARY
  4951. NZ X4,CTJ2 IF AN ERROR IN DATE
  4952.  
  4953. * EXTRACT YEAR AND STORE IN X1.
  4954.  
  4955. SX7 10000
  4956. BX1 X6
  4957. BX2 X7
  4958. IX1 X1/X2 DIVIDE JULIAN DATE BY 10000
  4959. IX2 X1*X7
  4960. IX6 X6-X2 GET REMAINDER AND STORE IN X6
  4961.  
  4962. * EXTRACT MONTH AND STORE IN X2.
  4963.  
  4964. SX7 100
  4965. BX2 X6
  4966. BX3 X7
  4967. IX2 X2/X3 DIVIDE REMAINDER BY 100
  4968.  
  4969. * EXTRACT DAY AND STORE IN X3.
  4970.  
  4971. IX3 X2*X7 GET REMAINDER AND STORE IN X3
  4972. IX3 X6-X3
  4973.  
  4974. * GET NUMBER OF DAYS IN FULL MONTHS.
  4975.  
  4976. SA4 MONTH-1+X2
  4977. MX7 -2 CHECK FOR LEAP YEAR
  4978. BX6 -X7*X1
  4979. NZ X6,CTJ1 IF NOT A LEAP YEAR
  4980. LX4 30
  4981.  
  4982. * BUILD FINAL RESULT.
  4983.  
  4984. CTJ1 SX4 X4-1
  4985. SX2 1000
  4986. IX6 X1*X2 YEAR*1000
  4987. IX6 X4+X6 ADD ON DAYS FOR FULL MONTHS
  4988. IX6 X3+X6 ADD ON DAYS FOR PARTIAL MONTH
  4989. EQ CTJX RETURN
  4990. CUP SPACE 4,15
  4991. ** CUP - CLEAN UP AFTER DIRECTIVE PROCESSING.
  4992. *
  4993. * ENTRY NONE.
  4994. *
  4995. * EXIT NONE.
  4996. *
  4997. * USES X - 0, 1, 2, 5, 6.
  4998. * A - 1, 2, 5, 6.
  4999. * B - 3.
  5000. *
  5001. * CALLS CDD, IMI.
  5002. *
  5003. * MACROS BREAK, CLEAR, MESSAGE, UNLOAD, WRITEC, WRITEW.
  5004.  
  5005.  
  5006. CUP SUBR ENTRY/EXIT
  5007. CLEAR DB
  5008. UNLOAD DB,R
  5009. CLEAR UPDATES
  5010. CLEAR NUMBERS
  5011. SX6 B0+ REMOVE DEBRIS OF PREVIOUS DUMP
  5012. SA6 INDXLEN
  5013. SA6 INDXNAM
  5014. SA6 INDXNAM+1
  5015. SA6 NEW+6
  5016. SA6 CAT+6
  5017. SA6 DB+6
  5018. SA6 UPE
  5019. SA6 DBE
  5020. MX2 13
  5021. SA1 DB+1
  5022. BX6 -X2*X1 REMOVE DEVICE TYPE AND RANDOM BIT
  5023. SA6 A1+
  5024. SA1 CAT REMOVE EOI CODE
  5025. MX2 6*7
  5026. BX6 X2*X1
  5027. SX5 3
  5028. BX6 X6+X5
  5029. SA6 A1
  5030.  
  5031.  
  5032. * WARN USER OF FILES SPECIFIED BUT NOT PROCESSED
  5033.  
  5034. MX0 42
  5035. MX6 0
  5036. SA6 PFCNT CLEAR PFTAB POINTER
  5037. SA6 CUPB CLEAR FLAG WORD
  5038. CUP0 SA2 PFCNT
  5039. SA1 PFTAB+X2 PFTAB(PFCNT)
  5040. ZR X1,CUP0.1 IF END OF LIST
  5041. SX6 X2+B1
  5042. SA6 PFCNT INCREMENT COUNTER
  5043. BX6 X1
  5044. LX6 59 POSITION TO SELECTED FLAG
  5045. NG X6,CUP0 IF FILE WAS SELECTED
  5046. SA6 CUPB NOTE THAT A FILE WAS MISSED
  5047. BX1 X0*X1 EXTRACT THE FILE NAME
  5048. SB3 CUPA * FILE NOT FOUND OR FAILED CRITERIA.*
  5049. RJ IMI ISSUE MESSAGE INSERTING NAME
  5050. RJ ILC INCREMENT LINE COUNT
  5051. EQ CUP0 PROCESS NEXT FILE
  5052.  
  5053. * RESET BREAK CONDITION.
  5054.  
  5055. CUP0.1 SA2 NFP NUMBER OF FILES PROCESSED
  5056. BX6 X6-X6
  5057. SA1 BREAK
  5058. SA6 A1
  5059. NZ X1,CUPX IF USER HAS INTERRUPTED
  5060. SA1 EOR
  5061. NZ X1,CUP4 IF EOR/EOF ENCOUNTERED ON INPUT
  5062.  
  5063. * CHECK FOR NO HEADER -- LO=N -- REQUEST.
  5064.  
  5065. SA1 NHV HEADER OPTION VARIABLE
  5066. ZR X1,CUP1 IF EXIT HEADER WANTED
  5067. NZ X2,CUP4 IF AT LEAST ONE FILE HAS BEEN PROCESSED
  5068. WRITEC O,HEADER6
  5069. EQ CUP4 FINISH UP OUTPUT PROCESSING
  5070.  
  5071. * DISPLAY EXIT MESSAGE.
  5072.  
  5073. CUP1 SA5 HEADER2
  5074. ZR X2,CUP2 IF NO FILES PROCESSED
  5075. BX1 X2
  5076. RJ CDD CONVERT TO DECIMAL
  5077. LX6 18
  5078. MX0 42
  5079. BX6 X0*X6
  5080. BX1 -X0*X5
  5081. BX6 X1+X6
  5082. EQ CUP3 SAVE FILE COUNT AND ISSUE MESSAGE
  5083.  
  5084. CUP2 SA1 HEADER5 NO FILES PROCESSED
  5085. BX6 X1
  5086. CUP3 SA6 A5
  5087. WRITEW O,HEADER1,HEADER4 FILES PROCESSED COUNT
  5088. MESSAGE HEADER2,3
  5089. CUP4 BREAK
  5090. SA1 NAP
  5091. NZ X1,CUPX IF NO ABORT PARAMETER SELECTED
  5092. SA1 NAV
  5093. NZ X1,CUPX IF NO ABORT OPTION SELECTED
  5094. SA1 CUPB
  5095. NZ X1,MAIN7 IF ANY FILES WERE MISSED
  5096. EQ CUPX RETURN
  5097.  
  5098.  
  5099. CUPA DATA C* FILE NOT FOUND OR FAILED CRITERIA - !!!!!!!.*
  5100. CUPB BSS 1 FILE MISSED FLAG
  5101. CVD SPACE 4,10
  5102. *** CVD - CONVERT PACKED DATE TO BINARY JULIAN DATE.
  5103. *
  5104. * ENTRY (X5) = 42/0,18/BIASED BINARY DATE
  5105. *
  5106. * EXIT (X6) = BINARY JULIAN DATE.
  5107. *
  5108. * USES X - 0, 1, 2, 3, 4, 5, 6.
  5109. * A - 4.
  5110.  
  5111.  
  5112. CVD SUBR ENTRY/EXIT
  5113.  
  5114. * EXTRACT YEAR AND STORE IN X1.
  5115.  
  5116. MX4 -6
  5117. BX3 -X4*X5 DD
  5118. LX5 -6
  5119. BX2 -X4*X5 MM
  5120. LX5 -6
  5121. BX1 -X4*X5 YY
  5122. SX1 X1-30
  5123. PL X1,CVD1 IF YEAR .GE. 2000
  5124. SX1 X1+100 UNBIAS YEAR
  5125.  
  5126. * GET NUMBER OF DAYS IN FULL MONTHS.
  5127.  
  5128. CVD1 SA4 MONTH-1+X2
  5129. SX4 X4-1
  5130.  
  5131. * CHECK FOR LEAP YEAR.
  5132.  
  5133. MX0 58D SET MASK FOR 3 BITS
  5134. BX6 -X0*X1 SEE IF YEAR DIVISIBLE BY 4
  5135. NZ X6,CVD4 IF NOT A LEAP YEAR
  5136. BX0 -X0 CHECK FOR JANUARY OR FEBRUARY
  5137. IX6 X2-X0 SUBTRACT 3 FROM MONTH
  5138. NG X6,CVD4 IF JANUARY OR FEBRUARY
  5139. SX4 X4+B1
  5140.  
  5141. * BUILD FINAL RESULT.
  5142.  
  5143. CVD4 SX2 1000D
  5144. IX6 X1*X2 YEAR*1000
  5145. IX6 X4+X6 ADD ON DAYS FOR FULL MONTHS
  5146. IX6 X3+X6 ADD ON DAYS FOR PARTIAL MONTH
  5147. EQ CVDX RETURN
  5148. CVH SPACE 4,15
  5149. ** CVH - CHECK FOR VALID DUMP HEADER.
  5150. *
  5151. * CVH EXAMINES THE ASSIGNED DUMP TAPE FOR A VALID HEADER.
  5152. *
  5153. * ENTRY (X5) = FET ADDRESS OF ASSIGNED TAPE.
  5154. *
  5155. * EXIT (X1) = 0 IF FIRST RECORD ON TAPE IS A DUMP HEADER.
  5156. * (X1) .NE. 0 IF FIRST RECORD IS NOT A DUMP HEADER.
  5157. * TAPE IS REWOUND.
  5158. *
  5159. * USES X - 1.
  5160. * A - 1.
  5161. * B - 2.
  5162. *
  5163. * MACROS READ, READO, REWIND.
  5164.  
  5165.  
  5166. CVH SUBR ENTRY/EXIT
  5167. REWIND X5,R
  5168. SB2 B0+ PRESET VALID
  5169. SA1 NVV
  5170. NZ X1,CVH2 IF NOT VALIDATING DUMP FILE
  5171. READ X5,R
  5172. READO X5 READ FIRST WORD AT BOI
  5173. NZ X1,CVH1 IF NOT *TRANSFER COMPLETE*
  5174. SX1 X6-11000B COMPARE WITH CATALOG CONTROL WORD
  5175. AX1 9 IGNORE SIZE FIELD
  5176. ZR X1,CVH1 IF MATCHED PFC CONTROL WORD
  5177. SA1 HDRPFD
  5178. BX1 X6-X1 COMPARE WITH PFDUMP LABEL HEADER
  5179. AX1 24 IGNORE POSSIBLE CATALOG TRACK COUNT
  5180. ZR X1,CVH1 IF *PFDUMP* OR CURRENT *RECLAIM* HEADER
  5181. SA1 =7LRECLAIM COMPARE WITH INTERIM *RECLAIM* HEADER
  5182. BX1 X6-X1
  5183. AX1 18
  5184.  
  5185. * (X1) = VALID OR INVALID FLAG.
  5186.  
  5187. CVH1 SB2 X1 SAVE VALID/INVALID INDICATION
  5188. REWIND X5,R
  5189. CVH2 SX1 B2+
  5190. EQ CVHX RETURN
  5191. CVP SPACE 4,30
  5192. ** CVP - CONVERT PARAMETERS.
  5193. *
  5194. * *CVP* CONVERTS DISPLAY CODE VARIABLES TO BINARY VALUES BASED
  5195. * ON BITS SET IN THE *ARMTAB* WORD FOR EACH PARAMETER--
  5196. * BIT 26 - JULIAN DATE TO BE CONVERTED.
  5197. * BIT 25 - OCTAL TO BE CONVERTED.
  5198. * BIT 24 - DECIMAL TO BE CONVERTED.
  5199. * BIT 23 - SET OPTION BITS FOR *TY* OPTION.
  5200. * BIT 22 - SET OPTION BITS FOR *PO* OPTION.
  5201. * BIT 21 - SPACE FILL TAPE NUMBER.
  5202. * DISPLAY CODE *0* IS CONVERTED TO BINARY 0.
  5203. *
  5204. * ENTRY NONE.
  5205. *
  5206. * EXIT NONE.
  5207. *
  5208. * ERROR TO *MAIN7* IF PARAMETER ERROR.
  5209. *
  5210. * USES X - 0, 1, 2, 3, 4, 5, 6.
  5211. * A - 1, 2, 3, 4, 5, 6.
  5212. * B - 2, 6, 7.
  5213. *
  5214. * CALLS CTJ, CVS, DXB, ZTB.
  5215. *
  5216. * MACROS MESSAGE, WRITEC.
  5217.  
  5218.  
  5219. CVP SUBR ENTRY/EXIT
  5220. MX0 6
  5221. SA1 RPV REPLACE,VARIABLE
  5222. SA2 OPNO NO OPTION
  5223. BX1 X0*X1 ISOLATE OPTION
  5224. BX6 X2-X1
  5225. SA6 A1 SET OPTION VARIABLE
  5226. LX1 6
  5227. SX6 X1-1RC
  5228. SA6 RPCL SET COPY TO CURRENT LOCATION FLAG
  5229. SA1 EXV EXCEPTION VARIABLE
  5230. BX1 X0*X1
  5231. BX6 X2-X1
  5232. SA6 A1 SET EXCEPTION VARIABLE
  5233. SA1 ASV ALTERNATE STORAGE VARIABLE
  5234. BX1 X0*X1
  5235. BX6 X2-X1
  5236. SA6 A1 SET ALTERNATE STORAGE VARIABLE
  5237. SA1 EIV ZERO *EIV* IF *EI=NO* ON DIRECTIVE
  5238. BX1 X0*X1
  5239. BX6 X1-X2
  5240. ZR X6,CVP1 IF *EI=NO* SPECIFIED
  5241. SA2 =1L# CHECK FOR DEFAULT
  5242. BX6 X1-X2
  5243. NZ X6,CVP1 IF NOT *NO* AND NOT DEFAULT ASSUME *YES*
  5244. SA2 COPTION
  5245. SA1 =0LCOMPACT
  5246. BX6 X1-X2 *COMPACT* DEFAULT IS *NO*, ALL OTHER *YES*
  5247. CVP1 SA6 EIV
  5248. MX6 60
  5249. SA1 DTV *DT* OPTION
  5250. ZR X1,CVP2 IF *DT* NOT SPECIFIED
  5251. SA2 DTMS
  5252. BX2 X1-X2
  5253. AX2 36
  5254. NZ X2,CVP3 IF NOT MASS STORAGE DEVICE TYPE
  5255. SX6 B1+ EXPLICIT MASS STORAGE SELECTION
  5256. SA6 MSV
  5257. EQ CVP4 CONTINUE
  5258.  
  5259. CVP2 SA1 DV *D* OPTION
  5260. SA2 MTV *MT* OPTION
  5261. BX2 X1+X2
  5262. SA1 NTV *NT* OPTION
  5263. BX2 X1+X2
  5264. CVP3 ZR X2,CVP4 IF *D*/*MT*/*NT* OPTIONS NOT SELECTED
  5265. SA6 MSV
  5266. CVP4 SA1 COPTION
  5267. SA2 =0LCOMPACT
  5268. BX5 X1-X2
  5269. SA1 TNV TAPE NAME VARIABLE
  5270. ZR X5,CVP5 IF DIRECTIVE IS *COMPACT*
  5271. SA5 MSV GET MASS STORAGE INDICATOR
  5272. CVP5 NZ X1,CVP6 IF TAPE NAME SET
  5273. SA2 DNV DUMP NAME VARIABLE
  5274. SA1 DFV DEFAULT FILE NAME
  5275. ZR X2,CVP6 IF DUMP NAME NOT SET
  5276. BX1 X2
  5277. NG X5,CVP6 IF EXPLICIT TAPE OR DENSITY OPTION SET
  5278. SX5 B1 MASS STORAGE IMPLIED
  5279. CVP6 BX6 X1
  5280. SX1 X5+ ABSOLUTE VALUE OF MASS STORAGE INDICATOR
  5281. BX1 X1+X2
  5282. ZR X1,CVP7 IF NO DUMP NAME AND NOT MASS STORAGE
  5283. SA6 TF+TTNV SET DUMP VSN VARIABLE
  5284. CVP7 SA6 TF+TDNV SET DUMP NAME VARIABLE
  5285. NZ X5,CVP8 IF MASS STORAGE DUMP
  5286. SA1 TF+TTNV
  5287. ZR X1,CVP8 IF NO *TN* OR *DN* SUPPLIED
  5288. RJ CVS BLANK FILL VSN AND CHECK FOR *SCRATCH*
  5289. SA6 TF+TTNV
  5290. SA1 DFV
  5291. BX6 X1
  5292. CVP8 SA6 TF+TDFV SET DUMP LFN
  5293. SA1 CTV COMPACT TAPE NAME
  5294. SX6 X5
  5295. BX2 X1 PRESET NON-ZERO IF *CTV* NON-ZERO
  5296. SA6 TF+TMSV STORE DUMP FILE MASS STORAGE FLAG
  5297. SA5 MSV
  5298. NZ X1,CVP9 IF COMPACT TAPE NAME SET
  5299. SA2 CNV COMPACT DUMP NAME
  5300. SA1 CFV DEFAULT COMPACT FILE NAME
  5301. ZR X2,CVP9 IF COMPACT DUMP NAME NOT SET
  5302. BX1 X2
  5303. NG X5,CVP9 IF EXPLICIT TAPE OR DENSITY OPTION SET
  5304. SX5 B1+ MASS STORAGE IMPLIED
  5305. CVP9 BX6 X1
  5306. SX1 X5+ ABSOLUTE VALUE OF MASS STORAGE INDICATOR
  5307. BX1 X1+X2
  5308. ZR X1,CVP10 IF NO COMPACT NAME AND NOT MASS STORAGE
  5309. SA6 MF+TTNV SET COMPACT VSN VARIABLE
  5310. CVP10 SA6 MF+TDNV SET COMPACT DUMP NAME VARIABLE
  5311. NZ X5,CVP11 IF MASS STORAGE COMPACT
  5312. SA1 MF+TTNV
  5313. ZR X1,CVP11 IF NO *CT* OR *CN* SUPPLIED
  5314. RJ CVS BLANK FILL VSN AND CHECK FOR *SCRATCH*
  5315. SA6 MF+TTNV
  5316. SA1 CFV
  5317. BX6 X1
  5318. CVP11 SA6 MF+TDFV STORE COMPACT LFN
  5319. SX6 X5
  5320. SA6 MF+TMSV STORE COMPACT MASS STORAGE FLAG
  5321. SB6 ARMTABL
  5322.  
  5323. * PROCESS NEXT PARAMETER.
  5324.  
  5325. CVP12 SB6 B6-B1
  5326. NG B6,CVP26 IF END OF TABLE ENCOUNTERED
  5327. SA5 VARIABL+B6 CHECK NEXT VALUE
  5328. ZR X5,CVP12 IF NO OPTION
  5329.  
  5330. * CHECK FOR DISPLAY CODE ZERO.
  5331.  
  5332. BX1 X5
  5333. MX0 6
  5334. BX6 X0*X1 ISOLATE LEFTMOST CHARACTER
  5335. LX6 6 RIGHT JUSTIFY CHARACTER
  5336. SX6 X6-1R0 COMPARE WITH A ZERO
  5337. NZ X6,CVP13 IF THIS IS NOT A DISPLAY CODE ZERO
  5338.  
  5339. * MAKE PROVISION FOR VARIABLES THAT MAY START
  5340. * WITH A DISPLAY CODE ZERO AS THE FIRST CHARACTER.
  5341.  
  5342. LX1 6
  5343. BX6 X0*X1
  5344. NZ X6,CVP13 IF NOT JUST DISPLAY CODE ZERO
  5345. SX1 A5 CHECK FOR *PF* AND *FN* OPTIONS
  5346. SX2 PFV
  5347. BX2 X1-X2
  5348. ZR X2,CVP13 IF *PF* OPTION
  5349. SX2 FNV
  5350. BX2 X1-X2
  5351. ZR X2,CVP13 IF *FN* OPTION
  5352. SX2 NNV
  5353. BX2 X1-X2
  5354. NZ X2,CVP15.1 IF NOT *NN* OPTION
  5355.  
  5356. * CHECK FOR 7 CHARACTER FILE NAME.
  5357.  
  5358. CVP13 MX0 -18
  5359. BX1 -X0*X5 CHECK FOR TOO MANY CHARACTERS
  5360. NZ X1,CVP25 IF MORE THAN SEVEN CHARACTERS ENTERED
  5361.  
  5362. * CHECK CONVERSION BITS. SET (X1) = CONVERSION FLAGS.
  5363.  
  5364. SA1 ARMTAB+B6 GET CORRESPONDING TABLE ENTRY
  5365.  
  5366. * CHECK FOR JULIAN DATE.
  5367.  
  5368. LX1 59-26
  5369. PL X1,CVP14 IF NOT JULIAN DATE
  5370. ZR X5,CVP25 IF DATE EQUAL ZERO
  5371. BX1 X5
  5372. RJ CTJ CONVERT DATE TO BINARY JULIAN
  5373. ZR X6,CVP25 IF ERROR IN ASSEMBLY
  5374. SA6 A5 SAVE CONVERTED DATE
  5375. EQ CVP12 PROCESS NEXT ENTRY
  5376.  
  5377. * CHECK FOR OCTAL FIELD.
  5378.  
  5379. CVP14 LX1 59-25-59+26
  5380. PL X1,CVP16 IF NOT OCTAL CONVERSION
  5381. SB7 B0 SET OCTAL CONVERSION FOR *DXB*
  5382.  
  5383. * CONVERT FIELD TO BINARY.
  5384.  
  5385. CVP15 RJ DXB CONVERT DECIAML/OCTAL TO BINARY
  5386. NZ X6,CVP15.2 IF NOT EXPLICIT ZERO VALUE
  5387. CVP15.1 SX2 GTV
  5388. SX5 A5
  5389. BX5 X2-X5
  5390. NZ X5,CVP15.2 IF NOT THE *GT* OPTION
  5391. MX6 -0 SET TO NEGATIVE ZERO
  5392. CVP15.2 SA6 A5 SET BINARY VALUE INTO CONVERSION TABLE
  5393. EQ CVP12 PROCESS NEXT ENTRY
  5394.  
  5395. * CHECK FOR DECIMAL FIELD.
  5396.  
  5397. CVP16 LX1 59-24-59+25
  5398. PL X1,CVP17 IF NOT DECIMAL CONVERSION
  5399. SB7 1 INDICATES DECIMAL BASE
  5400. EQ CVP15 CONVERT TO BINARY
  5401.  
  5402. * CHECK FOR *TY* OPTION.
  5403.  
  5404. CVP17 MX0 -6
  5405. SX6 B0+
  5406. LX1 59-23-59+24
  5407. PL X1,CVP20 IF NOT *TY* OPTION
  5408. CVP18 LX5 6
  5409. BX2 -X0*X5
  5410. ZR X2,CVP19 IF LAST CHARACTER
  5411. MX1 1
  5412. SB2 X2
  5413. LX1 B2
  5414. BX6 X6+X1
  5415. EQ CVP18 ASSEMBLE NEXT BIT
  5416.  
  5417. CVP19 SX2 1S9+1S4 ENSURE ONLY *I* OR *D* BITS ON
  5418. LX2 -1 BIT NUMBER = CHARACTER - 1
  5419. BX2 -X2*X6
  5420. NZ X2,CVP25 IF BAD CHARACTER
  5421. EQ CVP12 GET NEXT PARAMETER
  5422.  
  5423. * CONVERT CHARACTER STRING TO TURN ON BITS IN WORD
  5424. * FOR *PO* OPTION ON TAPE REQUEST.
  5425.  
  5426. CVP20 LX1 59-22-59+23
  5427. PL X1,CVP23 IF NOT *PO* OPTION
  5428. SA2 CVPA SET DEFAULT PROCESSING OPTIONS
  5429. BX6 X2
  5430. CVP21 LX5 6 EXTRACT 1 CHARACTER
  5431. BX2 -X0*X5
  5432. ZR X2,CVP22 IF END OF PARAMETERS
  5433. SA4 CVPB
  5434. SB2 X2
  5435. AX4 X4,B2
  5436. LX4 -1
  5437. PL X4,CVP25 IF NOT LEGAL OPTION
  5438. CX4 X4
  5439. SA2 CVPB+X4 MERGE VALUE FOR THIS CHARACTER
  5440. BX6 X6+X2
  5441. EQ CVP21 PROCESS NEXT CHARACTER
  5442.  
  5443. CVP22 MX0 -36 MERGE PROCESSING OPTIONS
  5444. BX2 -X0*X6 EXTRACT LOWER BITS TO BE DESELECTED
  5445. BX6 X0*X6 EXTRACT UPPER BITS TO BE SELECTED
  5446. LX2 36
  5447. BX6 -X2*X6 FINAL OPTION SELECTION
  5448. EQ CVP24 SAVE PROCESSING OPTIONS
  5449.  
  5450. * CHECK FOR PARAMETERS REQUIRING SPACE FILL.
  5451.  
  5452. CVP23 LX1 59-21-59+22
  5453. PL X1,CVP12 IF NOT SPACE FILL
  5454. BX1 X5
  5455. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  5456. CVP24 SA6 A5 SAVE VALUE
  5457. EQ CVP12 PROCESS NEXT PARAMETER
  5458.  
  5459. * PROCESS INCORRECT PARAMETER VALUE.
  5460.  
  5461. CVP25 MESSAGE CVPC,3 * INCORRECT ARGUMENT VALUE.*
  5462. WRITEC O,CVPC
  5463. EQ MAIN7 PROCESS ERROR
  5464.  
  5465.  
  5466. * CONVERT FILE RESIDENCE OPTION.
  5467.  
  5468. CVP26 SA5 RSV
  5469. ZR X5,CVP26.3 IF FILE RESIDENCE NOT SPECIFIED
  5470. SX0 77B
  5471. SX6 B0+
  5472. CVP26.1 LX5 6
  5473. BX2 X0*X5
  5474. ZR X2,CVP26.2 IF LAST CHARACTER
  5475. MX1 1
  5476. SB2 X2+B1
  5477. LX1 B2
  5478. BX6 X6+X1
  5479. EQ CVP26.1 ASSEMBLE NEXT BIT
  5480.  
  5481. CVP26.2 SA2 CVPE ENSURE *C*, *D* AND/OR *T* ONLY
  5482. BX1 -X2*X6
  5483. NZ X1,CVP25 IF BAD CHARACTER(S)
  5484. SA6 A5+
  5485. CVP26.3 SA1 MSV
  5486. NZ X1,CVPX IF PROCESSING A MASS STORAGE DUMP FILE
  5487. SA1 TMSTAT
  5488. NZ X1,CVPX IF TMS IS ACTIVE
  5489. SA1 FTV
  5490. SX6 2RFT SET UP FOR *FT* IN MESSAGE
  5491. NZ X1,CVP27 IF *FT* WAS USED
  5492. SX6 2RPW SET UP FOR *PW* IN MESSAGE
  5493. SA2 PWV
  5494. NZ X2,CVP27 IF *PW* WAS USED
  5495. SA3 TOV
  5496. ZR X3,CVPX IF *TO* NOT USED
  5497. SX6 2RTO INSERT *TO* KEYWORD IN MESSAGE
  5498. CVP27 SA1 CVPD
  5499. MX0 -12
  5500. LX6 42
  5501. LX0 42
  5502. BX1 X0*X1 REMOVE PREVIOUS KEYWORD
  5503. BX6 X6+X1 INSERT OPTION ID
  5504. SA6 A1
  5505. MESSAGE CVPD,3 * XX OPTION INCORRECT - TMS NOT ACTIVE.*
  5506. WRITEC O,CVPD
  5507. EQ MAIN7 PROCESS ERROR
  5508.  
  5509.  
  5510. CVPA DATA 1S41 DEFAULT PROCESSING OPTIONS (U)
  5511.  
  5512. CVPB DATA 51070742B MASK BITS FOR OPTIONS (WURNMLHGFEA)
  5513. DATA 1S40 W OPTION
  5514. DATA 1S41 U OPTION
  5515. * DATA 1S45 S OPTION (OP=S NOT ALLOWED)
  5516. DATA 1S39 R OPTION
  5517. * DATA 1S46 P OPTION (OP=P NOT ALLOWED)
  5518. DATA 1S37 N OPTION
  5519. DATA 1S43 M OPTION
  5520. DATA 1S7 L OPTION
  5521. * DATA 1S47 I OPTION (OP=I NOT ALLOWED)
  5522. DATA 1S6 H OPTION
  5523. DATA 1S42 G OPTION
  5524. DATA 1S5 F OPTION
  5525. DATA 1S38 E OPTION
  5526. DATA 1S36 A OPTION
  5527.  
  5528. CVPC DATA C* INCORRECT ARGUMENT VALUE.*
  5529. CVPD DATA C* XX OPTION INCORRECT - TMS NOT ACTIVE.*
  5530. CVPE CON 1S20+1S4+1S3 MASK FOR *RS* VALUES (TDC)
  5531. CVS SPACE 4,20
  5532. ** CVS - CHECK VSN FOR SCRATCH.
  5533. *
  5534. * CVS COMPARES THE VSN TO *SCRATCH* AND *0* AND CONVERTS IT TO
  5535. * BLANKS IF IT MATCHES. OTHERWISE THE VSN IS BLANK FILLED AND
  5536. * TRUNCATED TO SIX CHARACTERS. IF *TMS* IS ACTIVE AND THE *FT*
  5537. * OPTION WAS NOT SELECTED, *PVZ* IS CALLED TO INSERT DISPLAY
  5538. * CODE ZEROES PRECEDING THE FIRST DIGIT OF SHORT VSN-S.
  5539. *
  5540. * ENTRY (X1) = THE VSN VARIABLE AS SUPPLIED BY THE USER.
  5541. *
  5542. * EXIT (X6) = THE SIX CHARACTER BLANK FILLED VSN - ALL BLANKS
  5543. * IF THE ORIGINAL VALUE WAS *SCRATCH* OR *0*.
  5544. *
  5545. * USES X - 0, 1, 2, 6.
  5546. * A - 2, 6.
  5547. *
  5548. * CALLS PVZ, ZTB.
  5549.  
  5550. CVS SUBR ENTRY/EXIT
  5551. SA2 =7LSCRATCH
  5552. MX0 42
  5553. BX2 X1-X2
  5554. BX2 X0*X2
  5555. ZR X2,CVS1 IF VSN IS *SCRATCH*
  5556. SA2 =1L0
  5557. BX2 X1-X2
  5558. NZ X2,CVS2 IF VSN IS NOT *0*
  5559. CVS1 BX1 X1-X1 CLEAR VSN
  5560. SX6 B0 FORCE DUMP AT BEGINNING OF INFORMATION
  5561. SA6 EIV
  5562. CVS2 RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  5563. MX0 36
  5564. BX6 X0*X6
  5565. SA2 TMSTAT
  5566. ZR X2,CVSX IF *TMS* NOT ACTIVE
  5567. SA2 FTV
  5568. NZ X2,CVSX IF NOT A *TMS* TAPE
  5569. RJ PVZ PAD VSN WITH DISPLAY ZEROES
  5570. EQ CVSX RETURN
  5571. CVT SPACE 4,15
  5572. ** CVT - CHECK FOR VALID DUMP TAPE.
  5573. *
  5574. * CVT EXAMINES THE ASSIGNED DUMP FILE FOR A VALID DUMP.
  5575. *
  5576. * ENTRY (X5) = FET ADDRESS OF ASSIGNED DUMP FILE.
  5577. *
  5578. * EXIT (X1) = 0 IF TAPE HAS AT LEAST ONE GOOD DUMP OR USER
  5579. * SELECTED THE NO VALIDATION PARAMETER.
  5580. * TAPE IS POSITIONED BEFORE FIRST EOF.
  5581. * (X1) .NE. 0 IF TAPE HAS NO GOOD DUMPS.
  5582. * TAPE IS REWOUND.
  5583. *
  5584. * USES X - 1, 2.
  5585. * A - 1, 2.
  5586. *
  5587. * CALLS CVH
  5588. *
  5589. * MACROS BKSP, READ, READO, REWIND, SKIPFF.
  5590.  
  5591.  
  5592. CVT SUBR ENTRY/EXIT
  5593. RJ CVH CHECK FOR VALID HEADER
  5594. NZ X1,CVTX IF NO VALID HEADER
  5595. SA2 NVV
  5596. NZ X2,CVTX IF NO VALIDATION WANTED
  5597. SKIPFF X5,1,R SKIP FORWARD TO AN EOF
  5598. SA1 X5
  5599. LX1 59-9 LEFT JUSTIFY EOI BIT
  5600. NG X1,CVT1 IF HIT EOI THEN FINISH
  5601. BKSP X5,R BACKSPACE OVER EOF
  5602. BKSP X5,R BACKSPACE OVER POSSIBLE END-OF-DUMP
  5603. SA1 X5
  5604. LX1 59-3 LEFT JUSTIFY EXTRA *REWIND* STATUS BIT
  5605. NG X1,CVT1 IF *REWIND* STATUS THEN FINISH
  5606. READ X5,R
  5607. READO X5 GET A WORD FROM THE RECORD
  5608. NZ X1,CVT1 IF TRANSFER NOT COMPLETE
  5609. SA2 TRAILER END-OF-DUMP WORD
  5610. BX1 X6-X2 COMPARE INPUT WORD WITH END-OF-DUMP
  5611. NZ X1,CVT1 IF NOT AN END-OF-DUMP WORD
  5612. READO X5 GET SECOND WORD OF RECORD
  5613. SX1 X1-1 COMPARE STATUS WITH *EOR ENCOUNTERED*
  5614. ZR X1,CVTX IF EOR (VALID DUMP TAPE)
  5615.  
  5616. * NOT A VALID DUMP TAPE - EXIT WITH (X1) NON-ZERO.
  5617.  
  5618. CVT1 REWIND X5,R
  5619. SX1 B1+ FLAG NOT VALID DUMP TAPE
  5620. EQ CVTX RETURN
  5621. DFT SPACE 4,15
  5622. ** DFT - DUMP FILE TO TAPE.
  5623. *
  5624. * ENTRY CATLIST OF FILE IN *CATBUF*.
  5625. *
  5626. * EXIT (X1) = 0 IF NO DUMP ERRORS.
  5627. * (X1) .NE. 0 IF FILE ATTACH/GET FAILED.
  5628. * FILE DUMPED TO TAPE.
  5629. *
  5630. * USES X - ALL.
  5631. * A - 1, 2, 3, 4, 6, 7.
  5632. * B - 3.
  5633. *
  5634. * CALLS CRF, ILC, IMI.
  5635. *
  5636. * MACROS ATTACH, BKSP, CATLIST, CLEAR, COPYBLK, CRF, GET,
  5637. * PDATE, READCW, READO, REWIND, WRITE, WRITEO, WRITER,
  5638. * WRITEW, UNLOAD.
  5639.  
  5640.  
  5641. DFT SUBR ENTRY/EXIT
  5642. SX6 DCW INITIALIZE TAPE BLOCK CONTROL WORD
  5643. SA6 BLOKHED
  5644. WRITE TF,* SET WRITE FUNCTION
  5645. SX6 011000B
  5646. SX1 NWCE LENGTH OF THE PFC
  5647. BX6 X1+X6
  5648. SA1 CATBUF
  5649. MX0 42
  5650. BX1 X0*X1
  5651. BX6 X1+X6
  5652. SA6 PRMITH
  5653. SA1 ASV ALTERNATE STORAGE VARIABLE
  5654. SA2 NNV NEW NAME VARIABLE
  5655. NZ X1,DFT0.0 IF PRESERVING ALTERNATE STORAGE DATA
  5656. SX6 B0+ CLEAR ALTERNATE STORAGE DATA
  5657. SA6 CATBUF+FCAA
  5658. SA6 CATBUF+FCTV
  5659. DFT0.0 BX2 X0*X2 MASK NEW NAME
  5660. NZ X2,DFT0.1 IF NEW NAME FROM *NN* OPTION
  5661. SA1 DBE+DBUNM
  5662. BX6 -X0*X1 GET NEW NAME POINTER
  5663. ZR X6,DFT0.2 IF NO NEW NAME SPECIFIED
  5664. SA1 X6 GET NEW NAME FROM FILE NAME LIST
  5665. BX2 X0*X1
  5666. DFT0.1 SA1 CATBUF+FCFN CATLIST FILE NAME
  5667. BX6 -X0*X1 EXTRACT USER INDEX
  5668. BX6 X6+X2 UN + UI
  5669. SA6 A1
  5670. SA2 PRMITH PLACE NEW NAME IN *PRMITH*
  5671. BX2 -X0*X2
  5672. BX6 X0*X6
  5673. BX6 X6+X2
  5674. SA6 A2
  5675. BX6 X1 SAVE OLD *CATBUF* ENTRY
  5676. SA6 SAVEBUF
  5677. WRITEW TF,PRMITH,NWCE+1
  5678. SA1 SAVEBUF RESTORE OLD CATBUF ENTRY
  5679. BX6 X1
  5680. SA6 CATBUF+FCFN
  5681. EQ DFT0.3 CONTINUE
  5682.  
  5683. DFT0.2 WRITEW TF,PRMITH,NWCE+1
  5684. DFT0.3 SA1 PFTAB PERMANENT FILE TABLE
  5685. ZR X1,DFT0.4 IF NOT PROCESSING LOCAL FILES
  5686. SA2 PFCNT
  5687. SA1 PFTAB+X2 PFTAB(PFCNT)
  5688. SX6 X2+B1 INCREMENT COUNTER
  5689. SA6 A2
  5690. BX2 X1
  5691. LX2 58 POSITION TO LOCAL FILE FLAG
  5692. PL X2,DFT0.4 IF FILE IS NOT LOCAL
  5693. MX0 42
  5694. BX6 X0*X1
  5695. RJ CRF CHECK RESERVED FILE NAMES
  5696. ZR X6,DFT2.1 IF RESERVED FILE NAME
  5697. SA1 NEW
  5698. BX7 X1 SAVE SCRATCH FET NAME
  5699. SA7 SCRFET
  5700. BX1 -X0*X1 LOWER 18 BITS
  5701. BX6 X6+X1
  5702. SA6 A1 SET FILE NAME IN FET
  5703. BX6 X0*X1 CLEAR LOWER 18 BITS
  5704. SA1 A1+8 FET+8
  5705. BX1 -X0*X1 LOWER 18 BITS
  5706. BX6 X6+X1
  5707. SA6 A1 SET PFN IN FET
  5708. REWIND NEW,R
  5709. SX6 B1 FLAG *DFT* IS DUMPING A LOCAL FILE
  5710. SA6 DUMPLOC
  5711. EQ DFT2 CHECK FOR PFM ERRORS
  5712.  
  5713. DFT0.4 SA1 CATBUF+FCRI
  5714. MX0 24
  5715. BX6 X0*X1
  5716. ZR X6,DFT0 IF FILE HAS NO PERMITS
  5717. SA1 CATBUF+FCUI
  5718. MX0 -18
  5719. BX2 -X0*X1
  5720. LX2 12
  5721. BX6 X2+X6
  5722. BX7 X0*X1
  5723. SA7 A1
  5724. SA6 PRMITB+1
  5725. PDATE PRMITB+2
  5726. DFT0.5 CLEAR NEW RESET FET POINTERS
  5727. CATLIST NEW,CATBUF,,M GET SOME PERMITS
  5728. SA1 NEW+2 COMPUTE PERMIT WORD COUNT
  5729. SA2 A1+B1
  5730. IX5 X1-X2
  5731. BX0 X2 INITIALIZE BUFFER POINTER
  5732. SX6 20000B+PRMITBWC+2 SET PERMIT BLOCK HEADER
  5733. SA6 PRMITB
  5734. DFT0.6 SX5 X5-PRMITBWC REDUCE REMAINING WORD COUNT
  5735. ZR X5,DFT0.7 IF FULL BLOCK LEFT
  5736. NG X5,DFT0.7 IF LESS THAN A FULL BLOCK
  5737. WRITEW TF,PRMITB,3 WRITE PERMIT BLOCK HEADER
  5738. WRITEW TF,X0,PRMITBWC WRITE PERMIT BLOCK
  5739. SX0 X0+PRMITBWC ADVANCE BUFFER POINTER
  5740. EQ DFT0.6 LOOP FOR ANOTHER BLOCK
  5741.  
  5742. DFT0.7 SX5 X5+PRMITBWC COMPUTE BLOCK WORD COUNT
  5743. SX6 X5+20000B+2
  5744. SA1 NEW CHECK END OF PERMITS (EOI) FLAG
  5745. SX2 1000B
  5746. BX2 X2*X1
  5747. BX6 X6+X2 TREAT EOI FLAG AS PERMIT LAST BLOCK FLAG
  5748. SA6 PRMITB SET PERMIT BLOCK HEADER
  5749. WRITEW TF,PRMITB,3 WRITE PERMIT BLOCK HEADER
  5750. WRITEW TF,X0,X5 WRITE PERMIT BLOCK
  5751. SA1 NEW
  5752. LX1 59-9
  5753. PL X1,DFT0.5 IF MORE PERMITS
  5754.  
  5755. DFT0 CLEAR NEW RESET BUFFER POINTERS
  5756. SA1 NEW+1 SET *SA* BIT IN FET
  5757. MX6 1
  5758. LX6 46-59
  5759. BX6 X6+X1
  5760. SA6 A1
  5761. SA1 CATBUF ENSURE PERMANENT FILE NAME IN FET
  5762. MX6 42
  5763. BX6 X6*X1
  5764. SA6 NEW+10B
  5765. SA1 CATBUF+FCBS
  5766. LX1 59-11
  5767. NG X1,DFT1 IF A DIRECT ACCESS FILE
  5768. GET NEW
  5769. EQ DFT2 CHECK *PFM* STATUS
  5770.  
  5771. DFT1 ATTACH NEW,,,,R
  5772. DFT2 SA1 NEW+1 CLEAR *SA* BIT
  5773. MX6 1
  5774. LX6 46-59
  5775. BX6 -X6*X1
  5776. SA6 A1
  5777. SA1 NEW CHECK *PFM* ERROR CODE
  5778. AX1 10
  5779. MX0 -8
  5780. BX1 -X0*X1
  5781. ZR X1,DFT3 IF NO ERROR
  5782. SA1 CATBUF GET FILE NAME
  5783. MX6 42
  5784. BX1 X1*X6
  5785. SB3 DFTA * CANNOT ATTACH/GET FILE - FILE SKIPPED.*
  5786. RJ IMI ISSUE MESSAGE INSERTING NAME
  5787. RJ ILC INCREMENT LINE COUNT
  5788. DFT2.1 WRITER TF,R
  5789. BKSP TF,R
  5790. SX1 B1+ FLAG ERROR CONDITION
  5791. EQ DFTX RETURN
  5792.  
  5793. DFT3 SX7 DCW INITIALIZE TAPE BLOCK CONTROL WORD
  5794. SA7 BLOKHED
  5795. SX5 NDMPWD SET TAPE BLOCK FREE SPACE COUNTER
  5796. READCW NEW,0,R START READING PRU-S
  5797. READO NEW GET FIRST PRU CONTROL WORD
  5798. ZR X1,DFT4 IF NOT IMMEDIATE EOI (SOMETHING IN FILE)
  5799. SX6 DCW DUMMY TAPE BLOCK CONTROL WORD
  5800. SX1 3000B EOI FLAG PLUS ZERO WORD COUNT
  5801. BX6 X6+X1 CREATE EOI CONTROL WORD
  5802. WRITEO TF WRITE EOI TAPE BLOCK
  5803. EQ DFT11 JOIN WITH NON-EMPTY CASE
  5804.  
  5805. DFT4 MX0 -24 WIDTH OF PRU-S BYTE COUNT FIELD
  5806. SX3 5 BYTES IN A CYBER WORD
  5807. BX2 -X0*X6 ISOLATE BYTE COUNT
  5808. IX6 X2/X3 COMPUTE WORD COUNT OF PRU (B7 DESTROYED)
  5809. SX7 X6-PRUSIZE CHECK FOR A SHORT PRU
  5810. SA6 DFTB REMEMBER WORD COUNT
  5811. SA7 DFTC REMEMBER SHORT PRU FLAG
  5812. ZR X6,DFT5 IF WORD COUNT IS ZERO
  5813. IX1 X6-X5 COMPUTE WORD COUNT - FREE SPACE
  5814. NZ X1,DFT6 IF WORD COUNT .NE. FREE SPACE
  5815.  
  5816. * EITHER THE PRU-S WORD COUNT IS ZERO (EMPTY) OR THE PRU
  5817. * WILL EXACTLY FILL THE FREE SPACE IN THE TAPE BLOCK.
  5818.  
  5819. DFT5 COPYBLK X6,X6,X7 COPYBLOCK( WC, WC, SHORTPRU )
  5820. SA1 DFTC GET SHORT PRU COUNT
  5821. NZ X1,DFT5.1 IF A SHORT PRU
  5822. WRITEW TF,BLOKHED,1 WRITE BLOCK HEADER FOR PLAIN BLOCK
  5823. SA4 BLOKHED
  5824. MX0 -9
  5825. BX4 -X0*X4 EXTRACT SIZE OF THE BLOCK
  5826. WRITEW TF,WSA,X4 WRITE PLAIN BLOCK JUST FILLED
  5827. DFT5.1 SX5 NDMPWD RESET FREE SPACE COUNTER
  5828. SX6 DCW
  5829. SA6 BLOKHED RESET HEADER WORD
  5830. EQ DFT9 JOIN WITH OTHER CASES
  5831.  
  5832. DFT6 NG X1,DFT7 IF PRU WORD COUNT .LT. FREE SPACE
  5833. SX7 1 SET NOT FULL PRU FLAG
  5834. SA7 NOPRU
  5835. DFT6.1 COPYBLK X5,X5,0 COPYBLOCK( FS, FS, FALSE )
  5836. SX7 B0+ CLEAR NOT FULL PRU FLAG
  5837. SA7 NOPRU
  5838. WRITEW TF,BLOKHED,1 WRITE BLOCK HEADER FOR PLAIN BLOCK
  5839. SA4 BLOKHED
  5840. MX0 -9 WIDTH OF TAPE BLOCK WORD COUNT FIELD
  5841. BX4 -X0*X4 EXTRACT SIZE OF THIS BLOCK
  5842. WRITEW TF,WSA,X4 WRITE PLAIN BLOCK JUST FILLED
  5843. SA1 DFTB PREVIOUS WORD COUNT
  5844. IX6 X1-X5 COMPUTE NEW WC = WC - FS
  5845. SX7 NDMPWD FREE SPACE FOR EMPTY TAPE BLOCK
  5846. SA6 A1
  5847. IX5 X7-X6 COMPUTE NEW FS = NDMPWD - NEW WC
  5848. SX7 DCW RESET TAPE BLOCK CONTROL WORD
  5849. SA7 BLOKHED
  5850. SA3 DFTC CURRENT SHORT PRU FLAG
  5851. COPYBLK X6,NDMPWD,X3 COPYBLOCK( WC, NDMPWD, SHORTPRU )
  5852. SA1 DFTC SHORT PRU FLAG
  5853. ZR X1,DFT9 IF NOT A SHORT PRU
  5854. SX5 NDMPWD RESET FREE SPACE COUNTER
  5855. EQ DFT9 JOIN WITH OTHER CASES
  5856.  
  5857. * PRU WILL FIT IN CURRENT FREE SPACE IN BLOCK.
  5858.  
  5859. DFT7 COPYBLK X6,X5,X7 COPYBLOCK( WC, FS, SHORTPRU )
  5860. SA1 DFTC SHORT PRU FLAG
  5861. ZR X1,DFT8 IF NOT A SHORT PRU
  5862. SX5 NDMPWD RESET FREE SPACE COUNTER
  5863. EQ DFT9 JOIN WITH OTHER CASES
  5864.  
  5865. DFT8 SA2 DFTB WORD COUNT OF THIS PRU
  5866. IX5 X5-X2 COMPUTE NEW FS = FS - WC
  5867. DFT9 READO NEW GET NEXT PRU HEADER WORD
  5868. ZR X1,DFT4 IF NOT EOI ON PERMANENT FILE
  5869. DFT10 SA1 BLOKHED
  5870. MX0 -9 ISOLATE SIZE OF PENDING TAPE BLOCK
  5871. BX5 -X0*X1
  5872. ZR X5,DFT11 IF NOT A LEFTOVER BLOCK
  5873. WRITEW TF,BLOKHED,1 WRITE LAST TAPE BLOCK
  5874. WRITEW TF,WSA,X5
  5875. DFT11 WRITER TF,R FLUSH TAPE
  5876. SA1 PFCNT POINTER TO ENTRY IN PFTAB
  5877. SX2 X1-1 DECREMENT COUNT
  5878. NG X2,DFT12 IF POINTER NOT SET
  5879. SA1 PFTAB+X2 SET TO CORRECT ENTRY IN PFTAB
  5880. LX1 58 SET TO FILE LOCAL FLAG
  5881. PL X1,DFT12 IF NOT LOCAL THEN UNLOAD FILE
  5882. SA1 SCRFET GET ORIGIONAL SCRATCH FILE NAME
  5883. BX7 X1
  5884. SA7 NEW SET FILE NAME IN FET
  5885. SX7 B0+
  5886. SA7 NEW+8
  5887. SA7 NEW+9
  5888. SA7 DUMPLOC CLEAR DUMPING LOCAL FILE FLAG
  5889. DFT12 UNLOAD NEW,R
  5890. SX1 B0+
  5891. EQ DFTX RETURN
  5892.  
  5893.  
  5894. DFTA DATA C* CANNOT ATTACH/GET FILE !!!!!!! - FILE SKIPPED.*
  5895. DFTB BSS 1 PRU WORD COUNT
  5896. DFTC BSS 1 FLAG FOR SHORT PRU/FULL PRU
  5897. ICF SPACE 4,20
  5898. *** ICF - INITIALIZE COPY FET.
  5899. *
  5900. * INITIALIZES THE *FET* FOR *COPY* OPERATIONS. CALLED
  5901. * IMMEDIATELY AFTER CALLING *CRF* IF NOT A RESERVED FILE.
  5902. *
  5903. * ENTRY (X6) = LFN OF FILE TO WHICH COPY IS TO TAKE PLACE.
  5904. * (X0) = 42 BIT MASK.
  5905. *
  5906. * EXIT (X0) UNCHANGED.
  5907. * (X2) = FET ADDRESS.
  5908. * LFN IS STORED IN FET, FILE IS UNLOADED IF
  5909. * NEEDED, REWOUND AND PRESET FOR *WRITECW*.
  5910. *
  5911. * USES X - 1, 5, 6.
  5912. * A - 1, 6.
  5913. *
  5914. * MACROS RECALL, REWIND, UNLOAD, WRITECW.
  5915.  
  5916.  
  5917. ICF SUBR ENTRY/EXIT
  5918. BX5 X6 PRESERVE COPY LFN
  5919. RECALL SF
  5920. SA1 X2 STORE THE LFN IN THE COPY FET
  5921. BX1 -X0*X1
  5922. BX6 X5+X1
  5923. SA6 A1
  5924. SA1 RPV REPLACE OPTION
  5925. NZ X1,ICF1 IF REPLACE OPTION SPECIFIED
  5926. UNLOAD X2 UNLOAD IN CASE FILE IS DIRECT ACCESS
  5927. EQ ICF2 PRESET AND EXIT
  5928.  
  5929. ICF1 SA1 RPCL CHECK FOR COPY TO CURRENT LOCATION
  5930. ZR X1,ICF2 IF COPY TO CURRENT LOCATION SPECIFIED
  5931. REWIND X2
  5932. ICF2 WRITECW X2,* PRESET *WRITECW* FUNCTION
  5933. EQ ICFX RETURN
  5934. IMI SPACE 4,20
  5935. ** IMI - ISSUE MESSAGE INSERTING NAME.
  5936. *
  5937. * *IMI* ISSUES A MESSAGE AFTER INSERTING A NAME INTO IT.
  5938. *
  5939. * ENTRY (X1) = NAME TO BE INSERTED INTO MESSAGE.
  5940. * (B3) = ADDRESS OF MESSAGE TO BE ISSUED. MESSAGE MUST
  5941. * BE FORMATTED WITH *!* CHARACTERS WHERE THE NAME
  5942. * IS TO BE INSERTED, AND ONLY THERE.
  5943. *
  5944. * EXIT MESSAGE ISSUED TO DAYFILE AND OUTPUT.
  5945. *
  5946. * USES X - 1, 6.
  5947. * A - 1, 6.
  5948. * B - 2, 3, 5.
  5949. *
  5950. * CALLS SNM.
  5951. *
  5952. * MACROS MESSAGE, WRITEC.
  5953.  
  5954. IMI SUBR ENTRY/EXIT
  5955. SB2 1R!
  5956. SB5 -B3 INDICATE BUILD MESSAGE IN ASSEMBLY AREA
  5957. SB3 IMIA
  5958. RJ SNM SET NAME INTO MESSAGE
  5959. MESSAGE IMIA,3
  5960. WRITEC O,IMIA
  5961. SA1 LN INCREMENT OUTPUT LINE COUNT
  5962. SX6 X1+B1
  5963. SA6 A1
  5964. EQ IMIX RETURN
  5965.  
  5966.  
  5967. IMIA BSS 8 MESSAGE ASSEMBLY AREA
  5968. ILC SPACE 4,10
  5969. ** ILC - INCREMENT LINE COUNT.
  5970. *
  5971. * ILC INCREMENTS THE LIST OUTPUT LINE COUNT.
  5972. *
  5973. * EXIT (X1) = OLD VALUE OF LINE COUNT.
  5974. * (X6) = NEW VALUE OF LINE COUNT.
  5975. * (LN) = NEW VALUE OF LINE COUNT.
  5976. *
  5977. * USES X - 1, 6.
  5978. * A - 1, 6.
  5979.  
  5980.  
  5981. ILC SUBR ENTRY/EXIT
  5982. SA1 LN
  5983. SX6 X1+B1
  5984. SA6 A1
  5985. EQ ILCX RETURN
  5986. LCV SPACE 4,25
  5987. ** LCV - LOCATE CURRENT VSN AND REQUEST DUMP INPUT TAPE.
  5988. *
  5989. * LCV SEARCHES THE VSN INDEX RECORD TO FIND THE VSN OF THE
  5990. * REEL WHICH CONTAINS THE PARTICULAR FILE TO BE LOADED,
  5991. * THEN REQUESTS THAT REEL FOR PROCESSING.
  5992. *
  5993. * ENTRY (X1) = SET VSN/PFN(59-18) OF FILE TO LOCATE.
  5994. * (X2) = FILE(17-12), RECORD(11-0) OF FILE TO LOCATE.
  5995. * (X3) = TAPE FLAGS, RIGHT JUSTIFIED.
  5996. * (CFC) = CURRENT FILE POSITION OF DUMP FILE.
  5997. * (ZERO IF FIRST FILE TO BE LOADED)
  5998. * (CRC) = CURRENT RECORD POSITION WITHIN FILE.
  5999. * (IF (CFC).NE.0)
  6000. *
  6001. * EXIT (VSNCV) = CURRENT VSN/PFN OF DUMP FILE.
  6002. * (VSNFR) = FILE/RECORD INDEX OF CURRENT VSN/PFN.
  6003. * (CFC) = NEW FILE POSITION OF DUMP FILE.
  6004. * (CRC) = NEW RECORD POSITION WITHIN FILE.
  6005. *
  6006. * USES X - 0, 1, 2, 3, 5, 6, 7.
  6007. * A - 1, 2, 3, 6, 7.
  6008. *
  6009. * CALLS RNT.
  6010. *
  6011. * MACROS READW, REWIND.
  6012.  
  6013. LCV SUBR ENTRY/EXIT
  6014. MX6 -18
  6015. BX6 -X6*X2
  6016. SA6 LCVB SAVE FILE AND RECORD
  6017. MX6 -12
  6018. BX6 -X6*X3
  6019. SA6 TF+TFLAGS SAVE TAPE FLAGS
  6020. LX6 59-11
  6021. NG X6,LCV6 IF NOT TAPE DUMP FILE
  6022. MX0 6*6
  6023. BX6 X0*X1
  6024. SA6 LCVA SAVE SEARCH VSN
  6025. LCV1 SA1 LCVA
  6026. LX1 7*6 RIGHT JUSTIFY SEARCH VSN
  6027. SA2 DBE+DBXSV
  6028. MX6 6*6
  6029. BX2 X2*X6
  6030. LX2 7*6 RIGHT JUSTIFY DATABASE SET VSN
  6031. IX2 X1-X2
  6032. LX1 3*6 RESTORE SEARCH VSN POSITION
  6033. NG X2,LCV5 IF DATABASE SET VSN IS HIGHER
  6034. ZR X2,LCV3 IF VSNS ARE EQUAL
  6035. LCV2 READW DB,DBE,DBEL READ NEXT DATABASE ENTRY
  6036. NZ X1,LCV4 IF NO MORE DATABASE ENTRIES
  6037. EQ LCV1 CONTINUE SEARCH
  6038.  
  6039. LCV3 SA3 LCVB SEARCH FILE AND RECORD
  6040. SA2 DBE+DBXFR
  6041. LX2 17-35
  6042. MX0 -18
  6043. BX7 -X0*X2 STARTING FILE AND RECORD THIS VSN
  6044. IX2 X7-X3
  6045. PL X2,LCV5 IF SEARCH FILE STARTS ON PREVIOUS REEL
  6046. SA7 VSNFR SAVE STARTING FILE AND RECORD NUMBERS
  6047. BX7 X1
  6048. SA7 VSNSV SAVE SET VSN
  6049. BX7 X7-X7
  6050. SA1 DBE+DBXCV
  6051. SA7 LCVC FLAG VSN IS IN VSN INDEX
  6052. BX6 X1*X6
  6053. SA6 VSNCV SAVE VSN OF THIS REEL
  6054. EQ LCV2 READ NEXT DB ENTRY
  6055.  
  6056. LCV4 MX6 6*6
  6057. SA6 DBE+DBXSV END OF DATABASE FLAG
  6058. SA1 LCVA RESTORE SEARCH VSN
  6059. LCV5 SA2 VSNSV
  6060. SA3 CFC
  6061. BX2 X1-X2
  6062. NZ X2,LCV7 IF NOT SAME SET VSN
  6063. ZR X3,LCV5.2 IF INITIAL FILE LOAD
  6064. SA2 LCVC
  6065. BX2 X1-X2
  6066. ZR X2,LCV5.1 IF VSN IS NOT IN VSN INDEX
  6067. SA1 VSNCV DESIRED CURRENT VSN
  6068. SA2 TF+CRVSN PREVIOUS VSN
  6069. BX2 X1-X2
  6070. NZ X2,LCV8 IF VSN CHANGE
  6071. LCV5.1 SA2 CRC
  6072. NG X2,LCV5.2 IF AT END OF INFORMATION FOLLOWING DUMP
  6073. LX3 12
  6074. BX3 X2+X3 CURRENT FILE/RECORD POSITION
  6075. SA2 LCVB DESIRED FILE/RECORD POSITION
  6076. IX2 X2-X3
  6077. PL X2,LCVX IF RIGHT VSN POSITIONED CORRECTLY
  6078. LCV5.2 SA1 TMSTAT FORCE UNLOAD/RE-REQUEST IF TMS ACTIVE
  6079. SA2 TF+TFLAGS
  6080. LX2 59-11 MASS STORAGE DUMP FILE FLAG
  6081. BX6 -X2*X1 ONLY FORCE UNLOAD FOR TAPES
  6082. SA1 FTV
  6083. ZR X1,LCV5.3 IF NOT A NON-*TMS* TAPE
  6084. SX6 B0+ NO FORCED UNLOAD FOR NON-*TMS* TAPES
  6085. LCV5.3 SA6 UNLOAD
  6086. EQ LCV8 PROCESS THE REQUEST
  6087.  
  6088. LCV6 SA2 TF+CFN PREVIOUS FILE NAME
  6089. MX6 7*6
  6090. BX2 X1-X2
  6091. BX2 X6*X2
  6092. SA3 CFC
  6093. LCV7 BX6 X1*X6
  6094. SA6 VSNSV SAVE SET VSN = SEARCH VSN
  6095. SA6 VSNCV SAVE TRUE VSN = SET VSN
  6096. SA6 LCVC FLAG VSN NOT IN VSN INDEX
  6097. SX6 0 SAVE BEGINNING-OF-SET
  6098. SA6 VSNFR
  6099. ZR X3,LCV8 IF INITIAL FILE LOAD
  6100. ZR X2,LCV5.1 IF DUMP IS CURRENT FILE
  6101. *
  6102. * REQUEST NEW TAPE
  6103. *
  6104. LCV8 SA1 VSNCV GET VSN OF REEL CONTAINING FILE
  6105. SX5 TF
  6106. RJ RNT REQUEST NEW TAPE
  6107. SA1 UNLOAD
  6108. BX6 X6-X6 CLEAR THE FORCED UNLOAD FLAG
  6109. SA6 A1
  6110. NZ X1,LCV8.1 IF UNLOAD/RE-REQUEST WAS FORCED
  6111. REWIND TF,R
  6112. LCV8.1 BREAK
  6113. MX0 -12
  6114. SA1 VSNFR
  6115. NZ X1,LCV9 IF NOT BEGINNING OF SET
  6116. SX1 10001B BEGINNING OF SET - USE FILE 1 RECORD 1
  6117. LCV9 BX6 -X0*X1
  6118. SA6 CRC SET CURRENT RECORD NUMBER
  6119. LX1 -12
  6120. BX6 -X0*X1
  6121. SA6 CFC SET CURRENT FILE NUMBER
  6122. EQ LCVX RETURN
  6123.  
  6124.  
  6125. LCVA BSS 1 TEMP FOR SEARCH VSN
  6126. LCVB BSS 1 TEMP FOR FILE AND RECORD NUMBER
  6127. LCVC BSS 1 VSN NOT FOUND IN VSN INDEX
  6128. LEF SPACE 4,10
  6129. ** LEF - LOCATE EXISTING TAPE FLAGS.
  6130. *
  6131. * LEF SEARCHES THE VSN INDEX RECORD TO FIND A DESIRED SET VSN,
  6132. * AND EXTRACTS THE EXISTING TAPE FLAGS FOR THAT VSN.
  6133. *
  6134. * ENTRY (X1) = SET VSN(59-18) TO LOCATE.
  6135. * (X3) = MASS STORAGE DUMP INDICATOR.
  6136. * DATABASE POSITIONED AT VSN INDEX RECORD.
  6137. *
  6138. * EXIT (X6) = 0, IF VSN NOT FOUND, OR NOT TAPE.
  6139. * (X6) = EXISTING TAPE FLAGS FOR VSN.
  6140. * DATABASE POSITIONED AT VSN INDEX RECORD.
  6141. *
  6142. * USES X - 0, 1, 5, 6.
  6143. * A - 1, 5.
  6144. *
  6145. * MACROS CLEAR, READ, READW.
  6146.  
  6147. LEF4 CLEAR DB
  6148. SA1 VSNDX REPOSITION DATABASE TO VSN INDEX
  6149. MX6 -18
  6150. BX6 -X6*X1
  6151. SA6 DB+6
  6152. READ DB,R
  6153. AX5 36
  6154. BX6 X5
  6155.  
  6156. LEF SUBR ENTRY/EXIT
  6157. SX6 B0+ SET FLAGS FOR NOT TAPE DUMP
  6158. NZ X3,LEFX IF NOT TAPE DUMP FILE
  6159. MX0 6*6
  6160. BX5 X0*X1
  6161. LX5 7*6 RIGHT JUSTIFY SEARCH VSN
  6162. LEF1 SA1 DBE+DBXSV
  6163. BX1 X1*X0
  6164. LX1 7*6 RIGHT JUSTIFY DATABASE SET VSN
  6165. IX1 X5-X1
  6166. ZR X1,LEF3 IF VSNS ARE EQUAL
  6167. NG X1,LEF2 IF DATABASE SET VSN IS HIGHER
  6168. READW DB,DBE,DBEL READ NEXT DATABASE ENTRY
  6169. ZR X1,LEF1 IF MORE DATABASE ENTRIES
  6170. LEF2 SX5 B0+
  6171. EQ LEF4 EXIT WITH NO TAPE FLAGS
  6172.  
  6173. LEF3 SA5 DBE+DBFLG GET WORD WITH TAPE FLAGS
  6174. EQ LEF4 EXIT WITH TAPE FLAGS
  6175. LVI SPACE 4,10
  6176. ** LVI - LOCATE VSN INDEX
  6177. *
  6178. * LVI CALLS PDB TO POSITION THE DATABASE TO THE VSN INDEX
  6179. * RECORD, IF THERE IS ONE.
  6180. *
  6181. * ENTRY (X5).LT.0, DEFINE DATABASE IF IT DOES NOT EXIST.
  6182. * (X5).EQ.0, ABORT IF DATABASE DOES NOT EXIST.
  6183. * (X5).GT.0, DEFINE AND BUILD DATABASE IF NECESSARY.
  6184. * (X7) = READ/WRITE MODE FOR DATABASE ATTACH.
  6185. *
  6186. * EXIT DATABASE ATTACHED IN SPECIFIED MODE, POSITIONED TO VSN
  6187. * INDEX IF ONE EXISTS.
  6188. * (VSNSV) = 0.
  6189. * (DBE+DBXSV) = 0 IF THERE IS A VSN INDEX.
  6190. * (DBE+DBXSV) = 777777777777000000B IF NO VSN INDEX.
  6191. * (X6) = (DBE+DBXSV).
  6192. *
  6193. * USES X - 1, 6.
  6194. * A - 1, 6.
  6195. *
  6196. * CALLS PDB.
  6197.  
  6198. LVI SUBR ENTRY/EXIT
  6199. SA1 VSNDX TAPE VSN INDEX IDENTIFIER
  6200. RJ PDB POSITION DATABASE TO TAPE VSN INDEX
  6201. SX6 B0+
  6202. SA6 VSNSV PRESET STARTING SAVED SET VSN
  6203. PL X5,LVI1 IF VSN INDEX WAS FOUND
  6204. MX6 6*6
  6205. LVI1 SA6 DBE+DBXSV PRESET STARTING INDEX SET VSN
  6206. EQ LVIX RETURN
  6207. MFP SPACE 4,15
  6208. ** MDL - MAKE DUMP FILE LOCAL.
  6209. *
  6210. * MDL SETS UP THE DUMP FILE WHEN IT IS A
  6211. * MASS STORAGE FILE. IF THE FILE IS LOCAL
  6212. * A REWIND IS DONE. IF THE FILE IS NOT FOUND
  6213. * AN ERROR MESSAGE IS ISSUED.
  6214. *
  6215. * ENTRY (X1) = DESIRED DUMP FILE NAME.
  6216. * = 0 IF UNLOAD WANTED.
  6217. * (X5) = FILE FET ADDRESS.
  6218. * (RING) = 0 IF NO WRITE IS SPECIFIED.
  6219. * = 1 IF WRITE IS REQUIRED.
  6220. *
  6221. * EXIT DUMP FILE IS LOCAL OR UNLOADED.
  6222. * (X1) = 0 IF SAME FILE AS PREVIOUSLY ASSIGNED.
  6223. * = DUMP FILE NAME IF NOT THE SAME FILE.
  6224. *
  6225. * USES X - 0, 1, 2, 3, 6.
  6226. * A - 1, 2, 3, 6.
  6227. *
  6228. * MACROS ATTACH, FILINFO, GET, MESSAGE, REWIND, UNLOAD, WRITEC.
  6229.  
  6230.  
  6231. MDL SUBR
  6232. BX6 X1 SAVE FILE NAME IN FET
  6233. SA6 X5+CFPN
  6234. MX0 6*6
  6235. SA2 X5+TFETVSN GET FET WORD WITH VSN
  6236. SA3 X5+INITREQ GET INITIAL REQUEST FLAG
  6237. BX6 X6-X6
  6238. BX2 X0*X2
  6239. SA6 A3 CLEAR THE INITIAL REQUEST FLAG
  6240. SA6 A2 CLEAR THE VSN WORD
  6241. NZ X3,MDL1 IF INITIAL REQUEST
  6242. ZR X2,MDL1 IF PREVIOUS FILE WAS MASS STORAGE
  6243. DEBUG IFC NE,$DEBUG$"MODLEVEL"$,1
  6244. UNLOAD X5,R UNLOAD THE FILE
  6245. MDL1 SA1 X5+CFPN
  6246. ZR X1,MDLX IF REQUEST WAS FOR UNLOAD ONLY
  6247. MX0 42
  6248. BX6 X1*X0
  6249. SA2 X5+CFN GET CURRENT FILE NAME
  6250. BX2 X0*X2
  6251. BX2 X6-X2
  6252. NZ X2,MDL2 IF FILE NOT ALREADY PROCESSED
  6253. SX1 B0+ INDICATE SAME FILE
  6254. EQ MDLX RETURN
  6255.  
  6256. MDL2 SA6 A2
  6257. SA2 FIBK
  6258. BX2 -X0*X2 LOWER 18 BITS
  6259. BX6 X6+X2
  6260. SA6 A2 FIRST WORD OF *FILINFO* BLOCK
  6261. FILINFO FIBK
  6262. SA3 FIBSTA
  6263. SA2 X5+TRING
  6264. ZR X2,MDL4 IF WRITE MODE NOT NEEDED (LIST/LOAD/COPY)
  6265.  
  6266. * DOING A DUMP OR COMPACT WITH OVERWRITE.
  6267.  
  6268. ZR X3,MDL3 IF FILE IS NOT LOCAL
  6269. AX3 7
  6270. MX0 -2
  6271. BX6 -X0*X3
  6272. NZ X6,MDL3 IF IN WRITE MODE
  6273. MESSAGE MDLA,3,R * DUMP FILE MUST BE IN WRITE MODE *
  6274. SA1 NFP NUMBER OF FILES PROCESSED
  6275. SX6 X1-1 DECREMENT COUNT
  6276. SA6 A1
  6277. WRITEC O,MDLA
  6278. EQ MAIN8 RETURN
  6279.  
  6280. MDL3 SA1 X5+CFN CURRENT FILE PROCESSED
  6281. SA2 X5
  6282. MX0 42
  6283. BX2 -X0*X2
  6284. BX6 X1+X2
  6285. SA6 A2 SAVE FILE NAME IN FET
  6286. EQ MDL6 REWIND FILE AND RETURN
  6287.  
  6288. * DOING A COPY FROM A DUMP FILE
  6289.  
  6290. MDL4 NZ X3,MDL3 IF FILE IS LOCAL
  6291. SA2 X5+1 SET *SA* AND *EP* BITS IN FET
  6292. SX6 4+1
  6293. LX6 44
  6294. BX6 X2+X6
  6295. SA6 A2
  6296. SX6 B0 CLEAR FET+7 THRU FET+16
  6297. SA6 X5+7 FET+7
  6298. SA6 A6+B1 FET+8
  6299. SA6 A6+B1 FET+9
  6300. SA6 A6+B1 FET+10
  6301. SA6 A6+B1 FET+11
  6302. SA6 A6+B1 FET+12
  6303. SA6 A6+B1 FET+13
  6304. SA6 A6+B1 GET+14
  6305. SA6 A6+B1 FET+15
  6306. SA6 A6+B1 FET+16
  6307. SA2 X5+CFN CURRENT DUMP FILE NAME
  6308. MX0 42
  6309. SA1 X5 FET+0
  6310. BX1 -X0*X1 LOWER 18 BITS
  6311. BX6 X2+X1
  6312. SA6 A1 SET LOCAL FILE NAME IN FET
  6313. SA1 A1+8 FET+8
  6314. BX1 -X0*X1 LOWER 18 BITS
  6315. BX6 X0*X6
  6316. BX6 X6+X1
  6317. SA6 A1
  6318. ATTACH X5 TRY TO ATTACH THE FILE
  6319. SA2 X5 FET ADDR
  6320. SX1 X2
  6321. AX1 8
  6322. ZR X1,MDL5 IF FILE ATTACHED
  6323. MX0 9
  6324. LX0 12
  6325. BX6 -X0*X2 CLEAR ERROR CODE
  6326. SA6 X5
  6327. GET X5 TRY AND GET THE FILE
  6328. SA2 X5
  6329. SX1 X2
  6330. AX1 8
  6331. MDL5 SA2 X5+1
  6332. SX6 4+1 CLEAR *SA* AND *EP* BITS
  6333. LX6 44
  6334. BX6 -X6*X2
  6335. SA6 A2+
  6336. ZR X1,MDL6 IF FILE NOW LOCAL
  6337. MESSAGE MDLB,3,R * DUMP FILE NOT FOUND *
  6338. EQ MAIN8 RETURN
  6339.  
  6340. MDL6 REWIND X5,R
  6341. SA1 X5+CFPN RESTORE FILE NAME
  6342. EQ MDLX RETURN
  6343.  
  6344.  
  6345. MDLA DATA C* DUMP FILE MUST BE IN WRITE MODE *
  6346. MDLB DATA C* DUMP FILE NOT FOUND *
  6347. SPACE 4,10
  6348. ** MFP - MAKE FILE PERMANENT.
  6349. *
  6350. * ENTRY (A5) = POINTER TO ENTRY CURRENTLY BEING PROCESSED.
  6351. *
  6352. * EXIT (X1) = 0 IF NORMAL EXIT
  6353. * (X1) .NE. 0 IF ERROR IN PROCESSING.
  6354. *
  6355. * USES X - 0, 1, 2, 3, 4, 6, 7.
  6356. * A - 1, 2, 3, 4, 6, 7.
  6357. *
  6358. * MACROS DEFINE.
  6359.  
  6360.  
  6361. MFP SUBR ENTRY/EXIT
  6362. SA1 LOADFLG
  6363. ZR X1,MFPX IF A COPY
  6364. SA1 NNV NEW NAME VARIABLE
  6365. NZ X1,MFP1 IF NEW NAME SET
  6366. MX0 42
  6367. SA1 A5+2 WORD 3 OF 6 WORD SORTED ENTRY
  6368. BX6 -X0*X1 NEW NAME POINTER
  6369. ZR X6,MFP0 IF NO POINTER
  6370. SA1 X6 NEW NAME ENTRY
  6371. BX1 X0*X1
  6372. EQ MFP1 SAVE NAME
  6373.  
  6374. MFP0 SA1 A5+B1
  6375. BX1 X0*X1 LFN OF FILE BEING COPIED CURRENTLY
  6376. MFP1 BX6 X1
  6377. SA6 PFNAM
  6378. SX1 B0 CLEAR FILE NAME FOR *MFP* EXIT CONDITION
  6379. MX0 6 GET FILE CATEGORY
  6380. SA3 WSA+1+FCCT
  6381. BX6 X0*X3
  6382. LX6 6
  6383. SA6 PFCAT
  6384. LX3 6 GET PERMISSION MODE
  6385. BX3 X0*X3
  6386. LX3 6
  6387. SX6 X3
  6388. SA6 PFPERM
  6389. SA4 WSA+1+FCAP EXTRACT ALTERNATE CATLIST FLAG
  6390. LX4 59-46
  6391. MX0 59
  6392. BX4 -X0*X4
  6393. SX6 ACNO
  6394. ZR X4,MFP1.0 IF NO ALTERNATE CATLIST
  6395. SX6 ACYS SET ALTERNATE CATLIST,FLAG
  6396. MFP1.0 SA6 PFAC SET ALTERNATE CATLIST WORD
  6397. SA4 WSA+1+FCPW EXTRACT AND SAVE PASSWORD
  6398. MX0 42
  6399. BX6 X0*X4
  6400. SA6 PFPASS
  6401. SA4 WSA+1+FCUC USER CONTROL WORD
  6402. BX6 X4
  6403. SA6 PFUCW
  6404. SA4 WSA+1+FCFS SUBSYSTEM FLAG
  6405. MX3 6
  6406. LX4 59-53
  6407. BX6 X3*X4
  6408. LX6 6
  6409. SA6 PFSS
  6410.  
  6411. * CHECK IF REPLACE OPTION IS SET
  6412.  
  6413. SA1 RPV REPLACE VARIABLE
  6414. ZR X1,MFP1.1 IF NOT REPLACE
  6415. SA1 PFNAM PERMANENT FILE NAME
  6416. BX6 X1
  6417. SA6 SF+8 SET IN FET
  6418. SA1 PFNAM FILE BEING PROCESSED
  6419. MX0 42
  6420. BX6 X0*X1 SET FILE NAME IN FET
  6421. SA2 SF FET ADDRESS
  6422. BX2 -X0*X2
  6423. BX6 X6+X2
  6424. SA6 A2
  6425. UNLOAD SF,R UNLOAD POSSIBLE LOCAL FILE OF SAME NAME
  6426. SA1 SF+1 SET *SA* AND *EP* BITS
  6427. SX6 4+1
  6428. LX6 44
  6429. BX6 X6+X1
  6430. SA6 A1
  6431. MX0 42
  6432. SA1 LDFN RESTORE SCRATCH FILE FOR LOADING
  6433. SA2 SF FET ADDR
  6434. BX2 -X0*X2
  6435. BX6 X0*X1
  6436. BX6 X6+X2
  6437. SA6 A2
  6438. PURGE SF PURGE THE DATA FILE
  6439. SA1 SF+1 CLEAR *SA* AND *EP* BITS
  6440. SX0 4+1
  6441. LX0 44
  6442. BX6 -X0*X1
  6443. SA6 A1
  6444. SX1 B0 RESET *MFP* EXIT CONDITION
  6445.  
  6446. * CHECK IF THIS IS A DIRECT OR INDIRECT ACCESS FILE.
  6447.  
  6448. MFP1.1 SA4 A5+B1 GET FILE TYPE WORD
  6449. MX0 -6
  6450. LX4 48
  6451. BX4 -X0*X4 TYPE
  6452. SX7 1RI
  6453. BX3 X4-X7
  6454. SA7 LOADFLG
  6455. SA2 SF+1 CLEAR THE DEVICE TYPE IN FET+1
  6456. MX0 12
  6457. BX6 -X0*X2
  6458. SA6 A2
  6459. ZR X3,MFPX IF AN INDIRECT ACCESS FILE
  6460. SX7 1RD
  6461. SA7 A7
  6462. MFP4 SA1 SF CLEAR ANY PREVIOUS *PFM* ERROR CODE
  6463. MX0 -8
  6464. LX0 17-7
  6465. BX6 X0*X1
  6466. SA6 A1
  6467. SX0 4+1 SET *SA* AND *EP* BITS IN FET
  6468. SA1 A1+B1
  6469. LX0 44
  6470. BX6 X0+X1
  6471. SA6 A1
  6472. SX6 B0+ CLEAR FET+7 THROUGH FET+15
  6473. SA6 SF+7
  6474. SA6 A6+1 FET+8
  6475. SA6 A6+1 FET+9
  6476. SA6 A6+1 FET+10
  6477. SA6 A6+B1 FET+11
  6478. SA6 A6+B1 FET+12
  6479. SA6 A6+B1 FET+13
  6480. SA6 A6+B1 FET+14
  6481. SA6 A6+B1 FET+15
  6482. DEFINE SF,PFNAM,PFPASS,PFUCW,PFDT,PFCAT,PFPERM,,,,,,,,,PFAC
  6483. SA2 SF+1 CLEAR *SA* AND *EP* BITS
  6484. SX0 4+1
  6485. LX0 44
  6486. BX6 -X0*X2
  6487. SA6 A2
  6488. SA1 A2-B1 GET *PFM* ERROR CODE
  6489. SX1 X1
  6490. AX1 10 EXIT STATUS
  6491. EQ MFPX RETURN
  6492. PBC SPACE 4,10
  6493. ** PBC - PROCESS BREAK CONDITION.
  6494. *
  6495. * ENTRY INTERRUPTION HAS OCCURED.
  6496. *
  6497. * EXIT TO MAIN LOOP.
  6498. *
  6499. * MACROS CLEAR.
  6500.  
  6501.  
  6502. PBC BSS 0 ENTRY
  6503. CLEAR O CLEAR FET POINTERS
  6504. EQ MAIN8 RETURN TO MAIN LOOP
  6505. PDB SPACE 4,25
  6506. ** PDB - POSITION DATA BASE.
  6507. *
  6508. * *PDB* POSITIONS THE DATABASE TO THE PRU ADDRESS
  6509. * OF THE CALLING USER.
  6510. *
  6511. * ENTRY (X7) = MODE OF DATABASE ATTACH.
  6512. * (X5) = USED ONLY IF THE USER DATABASE IS NOT
  6513. * PRESENT AND *TN* HAS BEEN USED.
  6514. * = -1 IF *DB* TO BE DEFINED ONLY.
  6515. * = 0 IF *RECLAIM* IS TO ABORT.
  6516. * = 1 IF *DB* TO BE DEFINED AND
  6517. * RECORDS INSERTED.
  6518. * (X1) = USERNAME/ID TO BE LOCATED.
  6519. * (A1) = ADDRESS OF USERNAME/ID WORD.
  6520. *
  6521. * EXIT (X5).LT.0 = VSN INDEX NOT FOUND IN DATA BASE.
  6522. * (X5).GE.0 = PRU ADDRESS OF CURRENT USERNAME/ID.
  6523. *
  6524. * USES X - 0, 1, 2, 3, 5, 6, 7.
  6525. * A - 1, 2, 3, 6, 7.
  6526. * B - 2.
  6527. *
  6528. * CALLS ADB, CDF, UPD.
  6529. *
  6530. * MACROS BKSP, CLEAR, MESSAGE, READ, SKIPEI, WRITEC.
  6531.  
  6532.  
  6533. PDB SUBR ENTRY/EXIT
  6534. BX6 X1
  6535. SA6 PDBC SAVE USERNAME/ID
  6536. SX6 A1
  6537. SA6 PDBD SAVE LOCATION OF USERNAME/ID
  6538. SA7 PDBB SAVE ATTACH MODE
  6539. RJ ADB ATTACH DATABASE
  6540. NG X5,PDB0 IF NOT REBUILDING DATABASE
  6541. ZR X5,PDB0 IF NOT REBUILDING DATABASE
  6542. RJ CDF CREATE DATABASE FILE
  6543. SX6 B1 SET FLAG SO UPD WONT CALL LVI
  6544. SA6 NLVIFLG
  6545. SX5 B0+ FLAG ABORT IF DATABASE ATTACH FAILS
  6546. RJ UPD UPDATE DATABASE
  6547. SA1 PDBB RETRIEVE ATTACH MODE
  6548. SX7 X1
  6549. SX5 B0+ FLAG ABORT IF BAD ATTACH
  6550. RJ ADB ATTACH DATABASE FOR REAL
  6551. PDB0 SX1 B1 SET RANDOM BIT OF DATABASE FET
  6552. LX1 47
  6553. SA2 DB+1
  6554. BX6 X1+X2
  6555. SA6 A2
  6556.  
  6557. * DETERMINE USER-S POSITION ON DATABASE.
  6558.  
  6559. CLEAR DB
  6560. BX5 X5-X5 IN CASE UN=0 SPECIFIED
  6561. SA1 PDBC
  6562. ZR X1,PDB5 IF USER NAME NOT PART OF CRITERIA
  6563. MX0 -18
  6564. BX5 -X0*X1 EXTRACT USER RANDOM ADDRESS ON DATA BASE
  6565. NZ X5,PDB5 IF OPLD READ PREVIOUSLY
  6566.  
  6567. PDB1 SKIPEI DB,R
  6568. BKSP DB,1,R
  6569. READ DB,R
  6570. SA1 DB+3 (IN) = FWA OF OPLD
  6571. SA2 DB+2 END OF OPLD
  6572. IX0 X1-X2
  6573. ZR X0,PDBX IF EMPTY READ THEN RETURN TO CALLER
  6574. SA1 X1
  6575. MX0 12
  6576. BX0 X0*X1
  6577. LX0 12
  6578. SX0 X0-7700B
  6579. NZ X0,RDB6 IF NOT A 7700 TABLE DATABASE IS CORRUPTED
  6580. SB2 X2
  6581. AX1 36
  6582. MX0 -12
  6583. BX1 -X0*X1 LENGTH OF THE 7700 TABLE
  6584. SX2 A1+2
  6585. IX3 X2+X1 ADDRESS OF 7000 TABLE
  6586. SA1 X3 GET FIRST WORD OF OPLD ADDRESSES
  6587. PDB2 SA2 PDBC USERNAME/ID REQUESTED
  6588. MX0 42
  6589. BX2 X0*X2
  6590.  
  6591. * SEARCH OPLD FOR THIS USER NAME.
  6592.  
  6593. PDB3 BX1 X0*X1 FIND USER NAME
  6594. BX3 X1-X2
  6595. ZR X3,PDB4 IF USER FOUND
  6596. SA1 A1+2
  6597. SX3 A1-B2
  6598. NG X3,PDB3 IF NOT AT END OF OPLD
  6599. SA1 DB
  6600. MX2 -7
  6601. LX2 2
  6602. BX2 -X2*X1 GET *CIO* RESPONSE
  6603. SX2 X2-20B COMPARE WITH EOR
  6604. ZR X2,PDB5.5 IF EOR ENCOUNTERED
  6605. CLEAR DB
  6606. READ DB,R
  6607. SA1 DB+3
  6608. SA1 X1
  6609. SA2 DB+2
  6610. SB2 X2
  6611. EQ PDB2 CONTINUE SEARCH
  6612.  
  6613. PDB4 SA3 A1+B1 GET THE ADDRESS
  6614. BX5 -X0*X3
  6615. BX6 X5+X2
  6616. SA1 PDBD
  6617. SA6 X1 ADDRESS OF USERNAME/ID WORD
  6618.  
  6619. * PLACE RANDOM ADDRESS INTO FET.
  6620.  
  6621. PDB5 BX6 X5
  6622. SA6 DB+6
  6623. CLEAR DB
  6624. READ DB,R
  6625. EQ PDBX RETURN
  6626.  
  6627. PDB5.5 SA1 PDBC USERNAME/ID REQUESTED
  6628. BX1 X0*X1
  6629. SA2 VSNR VSN INDEX ID
  6630. BX1 X1-X2
  6631. NZ X1,PDB6 IF NOT LOOKING FOR VSN INDEX
  6632. MX5 59 FLAG IN X5 MEANS NO VSN INDEX
  6633. EQ PDBX RETURN
  6634.  
  6635. PDB6 SA1 TF+TTNV
  6636. ZR X1,PDB7 IF *TN* NOT SPECIFIED
  6637. SX5 -1 NO USER RECORD FOUND
  6638. EQ PDBX RETURN
  6639.  
  6640. PDB7 MESSAGE ERND,3 * NO DATA FOUND FOR USER NAME.*
  6641. WRITEC O,ERND
  6642. EQ MAIN8 RETURN TO MAIN LOOP
  6643.  
  6644.  
  6645. PDBB DATA 0 DATABASE ATTACH MODE
  6646. PDBC DATA 0 SEARCH USERNAME/ID
  6647. PDBD DATA 0 SEARCH USERNAME/ID WORD LOCATION
  6648. PDF SPACE 4,20
  6649. ** PDF - POSITION DUMP FILE.
  6650. *
  6651. * PDF POSITIONS THE DUMP FILE TO THE FILE AND RECORD REQUIRED.
  6652. * USED IN *COPY*, *LOAD*, AND *COMPACT* DIRECTIVE PROCESSING.
  6653. *
  6654. * ENTRY (X5) = REQUIRED DUMP FILE NUMBER (BITS 17-12),
  6655. * REQUIRED DUMP RECORD NUMBER (BITS 11-0).
  6656. * (CFC) = CURRENT DUMP TAPE FILE NUMBER.
  6657. * (CRC) = CURRENT DUMP TAPE RECORD NUMBER.
  6658. *
  6659. * EXIT (X5) .GE. 0 - DUMP FILE IS POSITIONED AT THE REQUESTED
  6660. * RECORD OF THE REQUESTED FILE.
  6661. * (X5) .LT. 0 - DUMP FILE MALFUNCTION (POSITION LOST OR
  6662. * EOI ENCOUNTERED) OCCURRED - ERROR MESSAGE
  6663. * HAS BEEN ISSUED TO DAYFILE.
  6664. * (CFC) = UPDATED FILE NUMBER.
  6665. * (CRC) = UPDATED RECORD NUMBER.
  6666. *
  6667. * USES X - 0, 1, 2, 5, 6.
  6668. * A - 1, 2, 5, 6.
  6669. *
  6670. * CALLS UFV.
  6671. *
  6672. * MACROS BREAK, MESSAGE, SKIPF.
  6673.  
  6674.  
  6675. PDF SUBR ENTRY/EXIT
  6676. BX6 X5 PRESERVE REQUESTED FILE/RECORD
  6677. SA6 PDFA
  6678. PDF1 SA5 PDFA
  6679. MX0 -18
  6680. BX0 -X0*X5
  6681. SA1 CFC
  6682. AX0 12
  6683. IX1 X0-X1
  6684. ZR X1,PDF6 IF REQUESTED FILE FOUND
  6685. SX2 ERPL * DUMP FILE MALFUNCTION - POSITION LOST.*
  6686. NG X1,PDF7 IF ALREADY PAST REQUESTED POINT
  6687. PDF2 SKIPF TF,1,R SKIP ONE RECORD AT A TIME
  6688. SA1 TF
  6689. SX2 EREI * DUMP FILE MALFUNC - EOI ENCOUNTERED.*
  6690. LX1 59-9
  6691. NG X1,PDF7 IF PREMATURE EOI
  6692. AX1 59-9
  6693. SX0 X1-273B
  6694. SA1 CRC RECORD COUNT
  6695. PL X0,PDF3 IF END OF FILE ENCOUNTERED
  6696. ZR X1,PDF3 IF AT A PSEUDO FILE POINT
  6697. MX0 -12
  6698. SX6 X1+B1 INCREMENT RECORD NUMBER
  6699. BX6 -X0*X6 RECORD NUMBER MODULO 4096
  6700. SA6 A1
  6701. ZR X6,PDF4 IF AT A POSSIBLE PSEUDO FILE POINT
  6702. EQ PDF2 SKIP NEXT RECORD
  6703.  
  6704. PDF3 SX6 B1 RESET THE RECORD COUNT
  6705. SA6 A1
  6706. ZR X1,PDF5 IF FILE NUMBER ALREADY ADVANCED
  6707. PDF4 SA2 CFC FILE COUNT
  6708. SX6 X2+B1 INCREMENT FILE COUNT
  6709. SA6 A2
  6710. PDF5 SX5 TF
  6711. RJ UFV UPDATE FET VSN
  6712. BREAK
  6713. EQ PDF1 CHECK IF DESIRED FILE FOUND
  6714.  
  6715. PDF6 MX0 -12
  6716. BX0 -X0*X5
  6717. SA5 CRC
  6718. IX5 X0-X5
  6719. ZR X5,PDFX IF ALREADY AT DESIRED RECORD
  6720. BX6 X0 SET CRC TO RECORD NUMBER AFTER SKIP
  6721. SA6 A5
  6722. SKIPF TF,X5,R
  6723. SX5 TF
  6724. RJ UFV UPDATE FET VSN
  6725. SA5 TF
  6726. LX5 59-9
  6727. PL X5,PDFX IF NOT EOI
  6728. SX2 EREI * DUMP FILE MALFUNC - EOI ENCOUNTERED.*
  6729. PDF7 MESSAGE X2,3,R ISSUE APPROPRIATE ERROR MESSAGE
  6730. SX5 -1
  6731. EQ PDFX RETURN WITH ERROR INDICATION
  6732.  
  6733.  
  6734. PDFA BSS 1 REQUESTED FILE/RECORD NUMBER
  6735. PFN SPACE 4,15
  6736. ** PFN - PROCESS FILE NAMES.
  6737. *
  6738. * ENTRY *PFV* CONTAINS PF PARAMETER VALUE.
  6739. *
  6740. * EXIT *PFTAB* UPDATED IF PF=*.
  6741. *
  6742. * ERROR TO *ABT* IF FILE NAME ERROR ON NON-INTERACTIVE JOB.
  6743. *
  6744. * USES X - 0, 1, 2, 5, 6.
  6745. * A - 1, 2, 5, 6.
  6746. * B - 2.
  6747. *
  6748. * CALLS POP, USB.
  6749. *
  6750. * MACROS MESSAGE, READ, READC, WRITEC, WRITEW.
  6751.  
  6752.  
  6753. PFN SUBR ENTRY/EXIT
  6754. SA1 PFV CHECK FOR MULTIPLE FILES OPTION
  6755. LX1 6
  6756. SX1 X1-1R*
  6757. NZ X1,PFNX IF NOT PF=*
  6758. SA5 PFTAB
  6759. SX0 B0+
  6760. SA1 CCIN
  6761. NZ X1,PFN2 IF CALLED WITH *Z* OPTION
  6762. SA1 IDT
  6763. SX0 B0+
  6764. NZ X1,PFN2 IF NOT TERMINAL INPUT
  6765. WRITEC O,PFNC * ENTER FILE NAMES.*
  6766. PFN1 READ I,R
  6767. PFN2 READC I,LINE,9
  6768. NZ X1,PFN5 IF END-OF-RECORD FOUND
  6769. SA1 ODT
  6770. ZR X1,PFN2.1 IF OUTPUT FILE IS A TERMINAL FILE
  6771. WRITEW O,BLANKS,1 MOVE LINE OVER
  6772. WRITEC O,LINE,9 COPY LINE OF FILE NAMES TO LISTING
  6773. PFN2.1 SB2 LINE
  6774. RJ USB
  6775. SX6 B7+B1
  6776. SA6 A6
  6777. SX6 1R.
  6778. SA6 B7+B1
  6779.  
  6780. * GET NEXT FILE NAME.
  6781.  
  6782. PFN3 RJ POP
  6783. NG B5,PFN8 IF AN ERROR FROM *POP*
  6784. SX5 X0-PFTABL
  6785. ZR X5,PFN7 IF TOO MANY FILES
  6786. SX5 X1-1R,
  6787. ZR X5,PFN4 IF SEPARATOR IS A COMMA
  6788. ZR X6,PFN6 IF COMMA AT END OF LINE
  6789. SX5 X1-1R= IF FILE SUBSTITUTION
  6790. ZR X5,PFN3.5
  6791. SA6 A5
  6792. SX6 B0+
  6793. SA6 A6+B1
  6794. SA6 NNTAB+X0 CLEAR *NNTAB* ENTRY
  6795. EQ PFNX RETURN
  6796.  
  6797. PFN3.5 SA6 NNTAB+X0 SAVE NEW FILE NAME
  6798. RJ POP GET THE NEW FILE NAME
  6799. ZR X6,PFN8 IF NO NEW FILE NAME
  6800. SA6 A5 SAVE OLD FILE NAME
  6801. SA5 A5+B1 NEXT *PFTAB* ADDRESS
  6802. SX0 X0+1 INCREMENT COUNTER
  6803. SX5 X1-1R,
  6804. ZR X5,PFN3 IF COMMA
  6805. SX6 B0 SET END OF TABLE
  6806. SA6 A5
  6807. SA6 NNTAB+X0 CLEAR *NNTAB* ENTRY
  6808. EQ PFNX RETURN
  6809.  
  6810. PFN4 SA6 A5
  6811. SA5 A5+B1
  6812. SX6 B0+ CLEAR *NNTAB* ENTRY
  6813. SA6 NNTAB+X0
  6814. SX0 X0+1
  6815. EQ PFN3 GET NEXT FILE NAME
  6816.  
  6817. * EOR FOUND ON INPUT.
  6818.  
  6819. PFN5 NZ X0,PFNX IF SOME FILES ENTERED
  6820. SX6 B0+
  6821. SA6 PFV CLEAR PF=* FOR THIS DIRECTIVE
  6822. EQ PFNX RETURN
  6823.  
  6824. * COMMA AT END OF LINE.
  6825.  
  6826. PFN6 SA1 IDT CHECK FOR TERMINAL INPUT
  6827. SA2 CCIN *Z* INPUT FLAG
  6828. IX1 X1+X2 TERMINAL INPUT .OR. *Z* INPUT
  6829. ZR X1,PFN1 IF A TERMINAL
  6830. EQ PFN2 NOT A TERMINAL
  6831.  
  6832. * TOO MANY FILES ENTERED.
  6833.  
  6834. PFN7 MESSAGE PFNA,3 * TOO MANY FILE NAMES IN LIST.*
  6835. WRITEC O,PFNA
  6836. SA1 IDT
  6837. SA2 CCIN *Z* INPUT FLAG
  6838. IX1 X1+X2 TERMINAL INPUT .OR. *Z* INPUT
  6839. ZR X1,MAIN8 IF A TERMINAL THEN REPROMPT
  6840. RJ ABT ABORT *RECLAIM*
  6841.  
  6842. * ERROR WHILE CRACKING FILE LIST.
  6843.  
  6844. PFN8 MESSAGE PFNB,3 * ERROR IN FILE NAME LIST.*
  6845. WRITEC O,PFNB
  6846. SA1 IDT
  6847. SA2 CCIN *Z* INPUT FLAG
  6848. IX1 X1+X2 TERMINAL INPUT .OR. *Z* INPUT
  6849. ZR X1,MAIN8 IF A TERMINAL THEN REPROMPT
  6850. RJ ABT ABORT *RECLAIM*
  6851.  
  6852.  
  6853. PFNA DATA C* TOO MANY FILE NAMES IN LIST.*
  6854. PFNB DATA C* ERROR IN FILE NAME LIST.*
  6855. PFNC DATA C* ENTER FILE NAMES.*
  6856. POT SPACE 4,20
  6857. ** POT - PROCESS OUTPUT.
  6858. *
  6859. * *POT* FORMATS THE DATA BASE ENTRY *DBE* EITHER INTO A
  6860. * 6 OR 8 WORD OUTPUT LINE DEPENDING UPON THE CALLING
  6861. * USERS ACCESS PRIVILEGES. IN ADDITION, IT PRINTS THE
  6862. * APPROPRIATE HEADINGS.
  6863. *
  6864. * ENTRY (A0) = STARTING ADDRESS OF 4 WORD RECORD.
  6865. *
  6866. * EXIT FORMATTED OUTPUT LINE.
  6867. *
  6868. * USES X - 0, 1, 2, 3, 4, 5, 6.
  6869. * A - 1, 2, 5, 6.
  6870. * B - 2.
  6871. *
  6872. * CALLS CDD, CFJ, PRH, ZTB.
  6873. *
  6874. * MACROS BREAK, WRITEC.
  6875.  
  6876.  
  6877. POT SUBR ENTRY/EXIT
  6878.  
  6879. * IF HEADER NOT REQUIRED SKIP IT.
  6880.  
  6881. SA5 NHV HEADER OPTION VARIABLE
  6882. NZ X5,POT2 IF HEADER NOT WANTED
  6883. SA5 ODT
  6884. RJ ILC INCREMENT LINE COUNT
  6885. ZR X1,POT1 IF FIRST TIME THROUGH
  6886. ZR X5,POT2 IF TERMINAL OUTPUT ASSIGNED
  6887. SA2 MLPP MAXIMUM LINES PER PAGE
  6888. IX2 X6-X2
  6889. NG X2,POT2 IF LINE COUNT NOT EXCEEDED
  6890. POT1 RJ PRH PROCESS HEADER
  6891. POT2 MX0 42
  6892.  
  6893. * EXTRACT LAST MODIFICATION DATE.
  6894.  
  6895. SA5 A0+DBLMO
  6896. BX1 -X0*X5
  6897. RJ CFJ CONVERT BINARY JULIAN DATE TO DISPLAY
  6898. SA6 OLINE+LLMO
  6899.  
  6900. * DUMP DATE.
  6901.  
  6902. MX0 42
  6903. SA5 A0+DBDDT DUMP DATE
  6904. BX1 -X0*X5
  6905. RJ CFJ CONVERT BINARY JULIAN DATE TO DISPLAY
  6906. SA6 OLINE+LDDT
  6907.  
  6908. * PERMANENT FILE NAME.
  6909.  
  6910. MX0 42D
  6911. SA1 A0+DBPFN
  6912. BX1 X0*X1
  6913. BX6 X1
  6914. SA6 BMSG+1 PUT FILE NAME INTO B-DISPLAY MESSAGE
  6915. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  6916. LX6 54D
  6917. MX0 54D
  6918. BX6 X0*X6
  6919. SA1 A0+DBFTY
  6920. LX1 12
  6921. BX1 -X0*X1
  6922. BX6 X1+X6
  6923. SA6 OLINE+LPFN
  6924.  
  6925. * PF LENGTH.
  6926.  
  6927. SA5 A0+DBLEN
  6928. MX0 -18 GET LOWER 18 BITS OF FILE SIZE
  6929. BX1 -X0*X5
  6930. MX0 5 GET UPPER 5 BITS OF FILE SIZE
  6931. LX0 -1
  6932. BX0 X0*X5
  6933. LX0 24 ALIGN UPPER 5 WITH LOWER 18 BITS
  6934. BX1 X1+X0 MERGE UPPER 5 WITH LOWER 18 BITS
  6935. RJ CDD CONVERT BINARY CONSTANT TO DISPLAY
  6936. LX6 18
  6937. SA6 OLINE+LLEN
  6938. BX6 X6-X6
  6939. SA1 ACCESS
  6940. SA2 USERDB
  6941. BX1 X1+X2
  6942. ZR X1,POT6 IF NOT PRIVILEGED OR USER DATABASE
  6943.  
  6944. * EXTRACT RECORD/FILE NUMBERS.
  6945.  
  6946. MX0 -12
  6947. LX5 42
  6948. BX1 -X0*X5
  6949. RJ CDD CONVERT TO DISPLAY CODE
  6950. LX6 36
  6951. BX6 X0*X6
  6952. SA6 OLINE+LRNO
  6953.  
  6954. * USER NAME.
  6955.  
  6956. MX0 42
  6957. SA1 A0+DBUNM
  6958. BX1 X0*X1
  6959. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  6960. SA6 OLINE+LUNM
  6961.  
  6962. * TAPE NUMBER.
  6963.  
  6964. MX4 -6
  6965. LX5 48
  6966. BX1 -X4*X5
  6967. RJ CDD
  6968. BX5 X6
  6969. SA1 A0+DBTNO
  6970. MX0 42
  6971. SA2 A0+DBFLG WORD WITH TAPE FLAGS
  6972. LX2 59-47
  6973. NG X2,POT3 IF PERMANENT FILE FLAG SET
  6974. MX0 36 SET MASK FOR TAPE VSN
  6975. POT3 BX1 X0*X1
  6976. RJ ZTB CONVERT BINARY ZEROES TO BLANKS
  6977. BX6 X0*X6
  6978. BX5 -X0*X5 FILE NUMBER
  6979. BX6 X5+X6
  6980.  
  6981. * APPEND TERMINATOR.
  6982.  
  6983. POT6 SA6 OLINE+LTNO
  6984. WRITEC O,OLINE
  6985. SA1 BMSG CHECK FOR VERB IN B-DISPLAY MESSAGE
  6986. ZR X1,POT7 IF NO VERB
  6987. MESSAGE BMSG,2,R TELL WHAT IS BEING DONE IN B-DISPLAY
  6988. POT7 SA1 NOBREAK CHECK IF BREAKS ARE IGNORED
  6989. NZ X1,POTX IF BREAKS TURNED OFF THEN RETURN
  6990. BREAK
  6991. EQ POTX RETURN
  6992. PPB SPACE 4,15
  6993. ** PPB - PROCESS PERMIT BLOCK.
  6994. *
  6995. * CHANGE FILE TO SEMI-PRIVATE, RESTORE PERMITS,
  6996. * THEN CHANGE BACK TO ORIGINAL CATEGORY.
  6997. *
  6998. * ENTRY NONE.
  6999. *
  7000. * EXIT FILE HAS PERMISSIONS RESTORED.
  7001. *
  7002. * USES X - 0, 1, 2, 5, 6.
  7003. * A - 1, 2, 6.
  7004. * B - 3.
  7005. *
  7006. * MACROS CHANGE, PERMIT.
  7007.  
  7008.  
  7009. PPB SUBR ENTRY/EXIT
  7010. MX0 42
  7011. SA2 CTFPLWA
  7012. SX6 X2-PRMITB
  7013. ZR X6,PPBX IF NO PERMITS ON FILE
  7014. CHANGE SF,,,,,S MAKE FILE SEMI-PRIVATE
  7015. MX5 -3
  7016. SB3 PRMITB
  7017. PPB1 SA1 B3
  7018. SB3 B3+NWPE
  7019. BX6 X0*X1
  7020. SA6 PFUSER USER NAME FOR THE PERMISSION
  7021. SA2 A1+1
  7022. LX2 19
  7023. NG X2,PPB2 IF AN ACCOUNTING PERMIT
  7024. LX2 5
  7025. ZR X6,PPB2 IF NO USER NAME SKIP THIS PERMIT
  7026. BX6 -X5*X2
  7027. SA6 PFPERM THE PERMISSION GRANTED
  7028. PERMIT SF,PFNAM,PFUSER,PFPERM
  7029. PPB2 SA2 CTFPLWA
  7030. SX6 B3
  7031. IX6 X2-X6
  7032. ZR X6,PPB3 IF END OF PERMITS
  7033. PL X6,PPB1 IF NOT END OF PERMITS
  7034. PPB3 SX6 B0+ CLEAR USER NAME FROM FET
  7035. SA6 SF+CFOU
  7036. SA1 PFCAT RESTORE CATEGORY
  7037. SX6 X1+40B ENSURE CATEGORY IS UPDATED
  7038. SA6 PPBA
  7039. CHANGE SF,,,,,PPBA
  7040. EQ PPBX RETURN
  7041.  
  7042.  
  7043. PPBA BSS 1 CATEGORY TYPE + 40B (FOR *CHANGE*)
  7044. PPF SPACE 4,20
  7045. ** PPF - PROCESS PERMANENT FILES.
  7046. *
  7047. * ENTRY NONE.
  7048. *
  7049. * EXIT PFTAB CONTAINS THE LIST OF PERMANENT
  7050. * FILES TO BE PROCESSED.
  7051. *
  7052. * USES X - 1, 2, 3, 6.
  7053. * A - 1, 2, 3, 6.
  7054. *
  7055. * CALLS PFN.
  7056. *
  7057. * MACROS FILINFO.
  7058.  
  7059.  
  7060. PPF4 RJ PFN PROCESS FILE NAMES
  7061.  
  7062. PPF5 SX6 B0+ CLEAR POINTER
  7063. SA6 PFCNT
  7064.  
  7065. PPF SUBR ENTRY/EXIT
  7066. SX6 B1+
  7067. SA6 PPFLAG SET PPF CALLED FLAG
  7068. SA1 PFV PERMANENT FILE VARIABLE
  7069. ZR X1,PPF1 IF NO PERMANENT FILES
  7070. BX6 X1
  7071. LX1 6
  7072. SX1 X1-1R*
  7073. ZR X1,PPF4 IF PF=*
  7074. SA6 PFTAB SET FILE NAME
  7075. BX6 X6-X6
  7076. SA6 A6+B1 SET TERMINATOR WORD IN PFTAB
  7077. EQ PPF5 RETURN
  7078.  
  7079. PPF1 SA1 FNV
  7080. BX6 X1
  7081. LX1 6
  7082. SX1 X1-1R*
  7083. ZR X1,PPF2 IF FN=*
  7084. SA6 PFTAB SET FILE NAME
  7085. BX6 X6-X6
  7086. SA6 A6+B1 SET TERMINATOR WORD IN PFTAB
  7087. EQ PPF3 SEE IF FILE LOCAL
  7088.  
  7089. PPF2 SA6 PFV SET PF=*
  7090. RJ PFN PROCESS FILE NAMES
  7091. PPF3 SA1 PFCNT
  7092. SA2 PFTAB+X1 PFTAB(PFCNT)
  7093. ZR X2,PPF5 IF END OF TABLE
  7094.  
  7095. * CHECK TO SEE IF THIS FILE IS LOCAL.
  7096.  
  7097. SA3 FIBK FIRST WORD OF *FILINFO* BLOCK
  7098. MX1 42
  7099. BX3 -X1*X3
  7100. BX6 X2+X3
  7101. SA6 FIBK
  7102. FILINFO FIBK
  7103. SA3 FIBSTA
  7104. SA1 PFCNT
  7105. SX6 X1+B1 INCREMENT COUNTER
  7106. SA6 A1
  7107. ZR X3,PPF3 IF FILE NOT LOCAL
  7108. SA2 PFTAB+X1 CURRENT FILE IN TABLE
  7109. SX6 B1
  7110. LX6 1
  7111. BX6 X6+X2 SET LOCAL FILE FLAG
  7112. SA6 A2 SAVE IN PFTAB
  7113. EQ PPF3 GET NEXT ENTRY
  7114. PRH SPACE 4,15
  7115. ** PRH - PRINT HEADER.
  7116. *
  7117. * ENTRY (X5) = 0 IF OUTPUT ASSIGNED TO TERMINAL.
  7118. *
  7119. * EXIT OUTPUT HEADER PRINTED AND RESET PAGE/LINE COUNT.
  7120. *
  7121. * USES X - 0, 1, 2, 3, 4, 6.
  7122. * A - 1, 2, 3, 6.
  7123. *
  7124. * CALLS CDD, ZTB.
  7125. *
  7126. * MACROS WRITEC, WRITEW.
  7127.  
  7128.  
  7129. PRH SUBR ENTRY/EXIT
  7130.  
  7131. * RESET LINE COUNT.
  7132.  
  7133. SX6 4
  7134. SA6 LN
  7135. SA1 PG
  7136. NZ X1,PRH2 IF NOT FIRST TIME THRU
  7137.  
  7138. * USER NAME TO HEADER.
  7139.  
  7140. SA1 UNV
  7141. NZ X1,PRH1 IF USER NAME SET
  7142. SX1 33B
  7143. LX1 -6
  7144. PRH1 MX0 42
  7145. BX1 X0*X1
  7146. LX1 42
  7147. SA2 USER
  7148. MX4 18
  7149. BX2 X4*X2
  7150. BX1 X1+X2
  7151. RJ ZTB ZEROES TO BLANKS
  7152. SA6 A2
  7153.  
  7154. * OPTION SELECTED TO HEADER.
  7155.  
  7156. SA1 COPTION
  7157. BX1 X0*X1
  7158. RJ ZTB ZEROES TO BLANKS
  7159. SA6 OPTION
  7160. PRH2 ZR X5,PRH3 IF OUTPUT ASSIGNED TO TERMINAL
  7161.  
  7162. * INCREMENT PAGE COUNT.
  7163.  
  7164. SA1 PG ADVANCE TO NEXT PAGE
  7165. SX1 X1+B1
  7166. BX6 X1
  7167. SA6 A1
  7168. RJ CDD CONVERT TO DECIMAL
  7169. BX6 X0*X4 ADD LINE TERMINATOR
  7170. SA6 PAGE
  7171. WRITEC O,HEAD1
  7172. PRH3 SA3 HLENGTH
  7173. WRITEW O,HEADER,X3
  7174. WRITEC O,HEADER1 BLANK LINE
  7175. EQ PRHX RETURN
  7176. PVZ SPACE 4,15
  7177. ** PVZ - PAD VSN WITH CHARACTER *0*.
  7178. *
  7179. * ENTRY (X6) = LEFT JUSTIFIED UNPADDED VSN.
  7180. *
  7181. * EXIT (X6) = PADDED VSN. CHARACTER *0* INSERTED
  7182. * BEFORE FIRST NUMERIC CHARACTER UNTIL
  7183. * VSN IS SIX CHARACTERS LONG.
  7184. *
  7185. * USES X - 0, 1, 2, 3, 4, 6, 7.
  7186. * A - 1, 3.
  7187. * B - 2, 3.
  7188.  
  7189.  
  7190. PVZ SUBR ENTRY/EXIT
  7191. SA3 =1L
  7192. MX0 6 GET LENGTH OF UNPADDED VSN
  7193. BX2 X6
  7194. SX4 B0
  7195. PVZ1 BX1 X0*X6 CHECK FOR CHARACTER
  7196. BX7 X1-X3
  7197. ZR X7,PVZ2 IF CHARACTER IS A BLANK
  7198. ZR X1,PVZ2 IF END OF CHARACTERS
  7199. SX4 X4+B1
  7200. LX6 6
  7201. EQ PVZ1 CONTINUE
  7202.  
  7203. PVZ2 ZR X4,PVZX IF NO CHARACTERS, RETURN
  7204. SX1 6 GET CORRECT NUMBER OF ZEROS
  7205. IX4 X1*X4
  7206. SB2 X4
  7207. SB3 B2-6 SET UP MASK
  7208. AX0 B3,X0
  7209. BX2 X0*X2
  7210. SA1 =36R000000
  7211. AX1 B2
  7212. SB3 60
  7213. MX0 -6
  7214. SX6 B0
  7215. PVZ3 BX7 X2 SAVE END OF VSN
  7216. LX2 6 CHECK CHARACTER
  7217. BX3 -X0*X2
  7218. ZR X3,PVZ4 IF END OF CHARACTERS
  7219. SX4 X3-1R0
  7220. PL X4,PVZ4 IF NUMERIC CHARACTER
  7221. LX6 6 BUILD FIRST PART OF VSN
  7222. BX6 X6+X3
  7223. BX2 X0*X2
  7224. SB3 B3-6
  7225. EQ PVZ3 CHECK NEXT CHARACTER
  7226.  
  7227. PVZ4 SB2 B2-36 ADD ZEROS TO VSN
  7228. AX6 B2
  7229. BX6 X6+X1
  7230. BX6 X6+X7 ADD END OF VSN
  7231. SB3 B3+B2
  7232. LX6 B3
  7233. EQ PVZX RETURN
  7234. RDB SPACE 4,20
  7235. ** RDB - READ DATABASE.
  7236. *
  7237. * *RDB* POSITIONS THE DATABASE TO THE NEXT ENTRY WHICH
  7238. * MEETS THE SPECIFIED USER CRITERIA.
  7239. *
  7240. * ENTRY NONE.
  7241. *
  7242. * EXIT (X1) = 0 IF ALL CRITERIA MET.
  7243. *
  7244. * ERROR TO *ABT* IF DATABASE FILE IS CORRUPTED.
  7245. *
  7246. * USES X - 0, 1, 2, 6.
  7247. * A - 0, 1, 2, 6.
  7248. * B - 5.
  7249. *
  7250. * CALLS CRI.
  7251. *
  7252. * MACROS BREAK, MESSAGE, READ, READW, UNLOAD, WRITEC.
  7253.  
  7254.  
  7255. RDB8 SX1 B1+
  7256.  
  7257. RDB SUBR ENTRY/EXIT
  7258. SX6 B0+ CLEAR SAVE AREA FOR CRITERIA MATCH
  7259. SA6 RDBA
  7260. SA6 LAD
  7261. RDB1 READW DB,DBE,DBEL
  7262.  
  7263. * CHECK FOR EOR/EOF/EOI.
  7264.  
  7265. ZR X1,RDB2 IF SUCCESSFUL READ
  7266. SA2 PDBC
  7267. NG X1,RDBX IF EOF/EOI ENCOUNTERED
  7268. NZ X2,RDBX IF SCANNING ONLY ONE USER NAME
  7269. SX2 X1-DBE
  7270. NZ X2,RDB6 IF DATABASE CORRUPTED
  7271. READ DB,R
  7272. SX6 B1
  7273. SA6 RDBA
  7274.  
  7275. * CHECK FOR OPLD ON DATABASE.
  7276.  
  7277. SA1 DB+3
  7278. SA1 X1
  7279. SA2 OPLDH
  7280. BX2 X1-X2
  7281. ZR X2,RDBX IF OPLD ENCOUNTERED
  7282. SA2 VSNR
  7283. BX2 X1-X2
  7284. ZR X2,RDBX IF VSN INDEX ENCOUNTERED
  7285. EQ RDB1 READ NEXT ENTRY
  7286.  
  7287. RDB2 BREAK
  7288. SA0 DBE
  7289. SA1 A0+DBUNM INSURE ZERO FILL IN USER NAME WORD
  7290. MX0 42
  7291. BX6 X0*X1
  7292. SA6 A1+
  7293. RJ CRI CHECK CRITERIA
  7294. NZ X5,RDB1 IF RECORD DOES NOT MEET CRITERIA
  7295. SA2 PFV
  7296. LX2 6
  7297. SX2 X2-1R*
  7298. NZ X2,RDB4 IF NOT PF=*
  7299. SA1 EXV
  7300. NZ X1,RDB4 IF EXCEPTION PROCESSING
  7301. SA2 PFTAB-1
  7302. MX0 42
  7303. SA1 DBE+DBPFN
  7304. BX1 X0*X1
  7305. RDB3 SA2 A2+B1
  7306. BX6 X0*X2
  7307. BX6 X1-X6
  7308. NZ X6,RDB3 IF NOT CORRECT FILE
  7309. BX1 -X0*X2
  7310. SA2 NFP
  7311. SX6 X2+1
  7312. IX2 X6-X1
  7313. SA1 NFV
  7314. IX1 X1-X2
  7315. SX1 X1-1
  7316. NG X1,RDB1 IF FILE LIMIT EXCEEDED FOR FILE
  7317. EQ RDB5
  7318.  
  7319. * CHECK FOR FILE LIMIT/INCREMENT FILE COUNT.
  7320.  
  7321. RDB4 SA1 NFV
  7322. SA2 NFP
  7323. SX6 X2+1
  7324. IX2 X1-X6
  7325. NG X2,RDB8 IF FILE LIMIT EXCEEDED
  7326. RDB5 SA6 A2
  7327. BX1 X1-X1 EXIT STATUS
  7328. SA2 RDBA
  7329. SB5 X2
  7330. EQ RDBX RETURN
  7331.  
  7332. * PROCESS DATABASE ERROR.
  7333.  
  7334. RDB6 UNLOAD DB
  7335. MESSAGE RDBB,3 * DATABASE CORRUPTED.*
  7336. WRITEC O,RDBB
  7337. EQ ABT ABORT *RECLAIM*
  7338.  
  7339.  
  7340. RDBA BSSZ 1
  7341. RDBB DATA C* DATABASE CORRUPTED.*
  7342. RDU SPACE 4,15
  7343. ** RDU - READ *UPDATES* FILE.
  7344. *
  7345. * ENTRY A READ HAS BEEN PERFORMED ON THE *UPDATES*.
  7346. *
  7347. * EXIT IF (X1) = 0 NEXT RECORD WITH SAME FAMILY IN *UPE*.
  7348. * IF (X1) .NE. 0 RECORD IS NOT UPDATED.
  7349. *
  7350. * USES X - 2, 3.
  7351. * A - 2, 3.
  7352. *
  7353. * MACROS READW.
  7354.  
  7355.  
  7356. RDU SUBR ENTRY/EXIT
  7357. RDU1 READW UPDATES,UPE,UDBEL
  7358. NZ X1,RDUX IF EOR/EOF/EOI ENCOUNTERED
  7359. SA2 UPE CLEAR LAST 18 BITS
  7360. MX0 42
  7361. BX6 X0*X2
  7362. SA6 A2
  7363. SA2 FAMILY
  7364. SA3 UPE+UDBFAM
  7365. ZR X3,RDUX IF NO FAMILY NAME - ASSUME FAMILY CORRECT
  7366. BX2 X2-X3
  7367. NZ X2,RDU1 IF FAMILY NOT THE CURRENT FAMILY
  7368. EQ RDUX RETURN
  7369. RNT SPACE 4,25
  7370. ** RNT - REQUEST NEW TAPE.
  7371. *
  7372. * *RNT* REQUESTS TAPES ONLY WHEN NECESSARY. *RNT* CHECKS
  7373. * THE CURRENT VSN IN WORD 9 OF THE GIVEN FET ADDRESS AGAINST
  7374. * THE DESIRED VSN IN X1. IF THEY ARE DIFFERENT IT CLEANS
  7375. * UP THE FET AND REQUESTS THE NEW TAPE. IF THE GIVEN VSN
  7376. * IS NULL (BINARY ZERO), *RNT* ONLY UNLOADS THE TAPE.
  7377. *
  7378. * ENTRY (X1) = DESIRED TAPE VSN.
  7379. * (X1) = 0 IF ONLY UNLOAD NEEDED.
  7380. * (X5) = TAPE FET ADDRESS.
  7381. * ((X5)+TFLAGS) = TAPE REQUEST FLAGS. ZERO IF NONE.
  7382. * ((X5)+TRING) = 1 IF TAPE MUST HAVE A WRITE RING.
  7383. * = 0 IF WRITE RING IS NOT NECESSARY.
  7384. *
  7385. * EXIT TAPE ASSIGNED OR UNLOADED.
  7386. * (X1) = 0 IF CORRECT TAPE WAS ALREADY ASSIGNED.
  7387. * (X1) .NE. 0 IF REQUEST CAUSED CHANGE IN ASSIGNMENT.
  7388. *
  7389. * USES X - 1, 2, 3, 4, 6, 7.
  7390. * A - 1, 2, 3, 4, 5, 6.
  7391. *
  7392. * CALLS BTF.
  7393. *
  7394. * MACROS BREAK, FILINFO, LABEL, REWIND, UNLOAD.
  7395.  
  7396.  
  7397. RNT SUBR ENTRY/EXIT
  7398. SA2 X5+TFLAGS TAPE FLAGS
  7399. LX2 59-11
  7400. PL X2,RNT1 IF DUMP FILE IS TAPE
  7401. RJ MDL PROCESS MASS STORAGE DUMP FILE
  7402. EQ RNTX RETURN
  7403.  
  7404. RNT1 SA2 X5+TFETVSN GET FET WORD WITH VSN
  7405. MX6 6*6
  7406. SA4 UNLOAD UNLOAD/RE-REQUEST FLAG
  7407. BX3 X1-X2 COMPARE VSN-S
  7408. BX3 X6*X3 REMOVE STUFF AT BOTTOM
  7409. NZ X3,RNT2 IF VSN-S DO NOT MATCH
  7410. NZ X4,RNT2 IF UNLOAD/RE-REQUEST REQUIRED
  7411. SA4 X5+8 FET WORD WITH REQUEST FLAGS
  7412. SA3 X5+TRING RING/NORING FLAG
  7413. AX4 40 RIGHT JUSTIFY *PO=W* BIT
  7414. BX4 -X4*X3 NOT( HAD A RING ) .AND. NEED RING
  7415. LX4 -1 LEFT JUSTIFY EXPRESSION RESULT
  7416. NG X4,RNT2 IF RING NEEDED AND DO NOT HAVE RING
  7417. SX1 B0+ FLAG SAME TAPE, SAME CONDITIONS
  7418. EQ RNTX RETURN
  7419.  
  7420. RNT2 BX0 -X6*X2 PRESERVE LOWER PART OF PRIOR VSN WORD
  7421. BX6 X1*X6 INITIALIZE CURRENT REEL VSN
  7422. SA6 X5+CRVSN
  7423. BX2 X2-X0 ISOLATE PRIOR VSN
  7424. BX6 X0+X6 MERGE NEW VSN WITH PRESERVED LOWER PART
  7425. SA6 A2+
  7426. MX0 7*6
  7427. SA1 X5+INITREQ
  7428. SA4 X5 GET PREVIOUS LFN FROM FET
  7429. SA3 X5+TDFV GET DUMP TAPE LFN
  7430. NZ X1,RNT3 IF INITIAL REQUEST
  7431. BX6 X3-X4
  7432. BX6 X0*X6
  7433. ZR X6,RNT4 IF LFN HAS NOT CHANGED
  7434. SA6 A1+ FORCE CHECK FOR *VSN* COMMAND
  7435. ZR X2,RNT3 IF PREVIOUS FILE WAS MASS STORAGE
  7436. DEBUG IFC NE,$DEBUG$"MODLEVEL"$,1 OMIT UNLOAD IF DEBUG
  7437. UNLOAD X5,R UNLOAD PREVIOUS DUMP TAPE
  7438. SA3 X5+TDFV GET DUMP TAPE LFN AGAIN
  7439. MX0 7*6
  7440. SA4 X5 GET FET LFN WORD AGAIN
  7441. RNT3 BX4 -X0*X4 SAVE LOWER BITS OF LFN WORD
  7442. BX3 X0*X3
  7443. BX6 X3+X4 SET CURRENT LFN INTO FET
  7444. SA6 X5
  7445. SA1 X5+INITREQ
  7446. ZR X1,RNT4 IF NOT INITIAL TAPE REQUEST
  7447.  
  7448. * CHECK FOR POSSIBLE *VSN* SYSTEM COMMAND.
  7449.  
  7450. SA4 FIBK
  7451. BX4 -X0*X4 SAVE BOTTOM OF WORD
  7452. BX6 X3+X4 CHANGE NAME IN *FILINFO* BLOCK
  7453. SA6 A4
  7454. SX6 B0+ CLEAR INITIAL REQUEST FLAG
  7455. SA6 A1
  7456. SA1 DBNAM
  7457. ZR X1,RNT3.1 IF NOT USING DATABASE
  7458. SA1 X5+TRING
  7459. ZR X1,RNT4 IF NO RING REQUIRED (IGNORE PRIOR *VSN*)
  7460. RNT3.1 FILINFO FIBK GET INFO FOR *TAPE*
  7461. SA2 FIBEST *FILINFO* EST ORDINAL
  7462. MX6 -12
  7463. LX2 12 RIGHT JUSTIFY EST ORDINAL
  7464. BX2 -X6*X2 EXTRACT EST
  7465. SX2 X2-TEEQ COMPARE WITH *VSN* EQUIPMENT
  7466. ZR X2,RNT5 IF PRIOR *VSN* COMMAND DO NOT UNLOAD
  7467.  
  7468. * READY TO UNLOAD TAPE.
  7469.  
  7470. RNT4 BSS 0
  7471. DEBUG IFC NE,$DEBUG$"MODLEVEL"$,1 IGNORE *UNLOAD* IF DEBUG
  7472. UNLOAD X5,R
  7473. RNT5 SX6 B0+
  7474. SA6 X5+CFN CLEAR MASS STORAGE FILE NAME
  7475. SA6 X5+WRITTEN CLEAR TAPE WRITTEN FLAG
  7476. SA2 X5+TFETVSN CHECK VSN
  7477. MX0 6*6
  7478. BX2 X0*X2
  7479. ZR X2,RNTX IF NULL VSN RETURN
  7480. SA3 X5+TFLAGS CHECK FOR PRESET REQUEST FLAGS
  7481. NZ X3,RNT6 IF FLAGS ALREADY SET
  7482. SA4 TAPDFLT TAPE DEFAULTS FOR *BTF*
  7483. RJ BTF BUILD FLAGS FROM DIRECTIVE KEYWORDS
  7484. SA3 X5+TFLAGS GET RESULTS FROM *BTF*
  7485. RNT6 SA1 POV USER PROCESSING OPTIONS
  7486. MX0 -3
  7487. BX6 -X0*X3 GET TAPE FORMAT
  7488. SA4 X5+TRING
  7489. LX4 39 POSITION RING-REQUIRED TO *PO=R*
  7490. BX1 -X4*X1 CLEAR *PO=R* IF RING IS SET
  7491. LX4 1 POSITION TO *PO=W*
  7492. BX1 X1+X4 INSERT POSSIBLE RING-IN BIT
  7493. LX6 30 POSITION TAPE FORMAT
  7494. SX2 1000B
  7495. BX2 -X2*X3 REMOVE FOREIGN TAPE FLAG
  7496. BX3 X3-X2 ISOLATE FOREIGN TAPE FLAG
  7497. BX2 X0*X2 ISOLATE DENSITY, TRACKS
  7498. LX2 48 POSITION DENSITY, TRACKS
  7499. BX6 X6+X1 ADD PROCESSING OPTIONS
  7500. BX6 X6+X2 ADD DENSITY, TRACKS
  7501. SA6 X5+8 INSERT FLAGS IN TAPE FET
  7502. SA1 TMSTAT
  7503. BX7 X7-X7 PRESET FOR NO OWNER
  7504. BX6 X6-X6 PRESET FOR NO PASSWORD
  7505. ZR X1,RNT8 IF TMS IS NOT ACTIVE
  7506. SA1 FTV FOREIGN TAPE VARIABLE
  7507. SX6 2 PRESET FOREIGN TAPE FLAG BIT
  7508. NZ X3,RNT8 IF FOREIGN TAPE FLAG SET
  7509. NZ X1,RNT8 IF *FT* OPTION SELECTED
  7510. SA1 X5+TFETVSN
  7511. SA2 =6L CHECK FOR BLANK VSN - SCRATCH TAPE REQUEST
  7512. MX0 36
  7513. BX1 X1-X2
  7514. BX1 X0*X1
  7515. SX6 400B SET *RECLAIM* ONLY BIT FOR *TMS*
  7516. NZ X1,RNT7 IF NOT SCRATCH TAPE REQUEST
  7517. MESSAGE RNTC,3
  7518. WRITEC O,RNTC * REQUESTING A NEW DUMP TAPE.*
  7519. WRITER O,R
  7520. SX6 10B SET FLAG TO RESERVE TAPE
  7521. RNT7 SA1 TOV TMS TAPE OWNER
  7522. SA2 PWV TMS TAPE PASSWORD
  7523. MX0 42
  7524. BX1 X0*X1 ISOLATE OWNER
  7525. BX7 X0*X2 ISOLATE TAPE PASSWORD
  7526. BX6 X6+X1
  7527. RNT8 SA6 X5+/TFM/TFUN INSERT OWNER IN TAPE FET
  7528. SA7 X5+/TFM/TFPW ADD PASSWORD TO FET
  7529. BREAK CHECK FOR USER INTERRUPT BEFORE REQUEST
  7530. DEBUG IFC NE,$DEBUG$"MODLEVEL"$
  7531. LABEL X5 FINALLY DO THE REQUEST
  7532. SA1 X5+TFETVSN
  7533. SA2 =6L CHECK FOR BLANK VSN - SCRATCH TAPE REQUEST
  7534. MX0 36
  7535. BX1 X0*X1
  7536. BX2 X1-X2
  7537. NZ X2,RNTX IF NOT SCRATCH TAPE REQUEST
  7538. WRITEF X5,R FORCE VSN TO BE MADE ACCESSIBLE
  7539. SA3 X5 RETRIEVE LFN FROM TAPE FET
  7540. SA1 FIBK CHANGE NAME IN *FILINFO* BLOCK
  7541. MX0 42
  7542. BX1 -X0*X1 SAVE LOWER 18 BITS
  7543. BX3 X0*X3
  7544. BX6 X3+X1
  7545. SA6 A1 CHANGE NAME IN *FILINFO* BLOCK
  7546. FILINFO FIBK
  7547. SA2 FIBVSN VSN IN *FILINFO* BLOCK
  7548. MX3 6*6
  7549. BX6 X3*X2 EXTRACT TMS ASSIGNED VSN
  7550. SA6 X5+CRVSN STORE CURRENT REEL VSN
  7551. SA6 X5+TTNV REPLACE TN/CT VARIABLE
  7552. SA6 X5+TDNV REPLACE DN/CN VARIABLE
  7553. SA1 X5+TFETVSN
  7554. BX3 -X3*X1
  7555. BX1 X6
  7556. BX6 X3+X6
  7557. SA6 A1 MERGE VSN INTO FET VSN WORD
  7558. DEBUG ELSE 1
  7559. RECALL ISSUE NOOP TO MARK WHERE WE ARE
  7560. EQ RNTX RETURN
  7561.  
  7562.  
  7563. RNTC DATA C* REQUESTING A NEW DUMP TAPE.*
  7564. ROD SPACE 4,20
  7565. ** ROD - REQUEST OUTPUT DUMP.
  7566. *
  7567. * *ROD* REQUESTS DUMP FILE AND POSITIONS IT EITHER TO *BOI* OR
  7568. * *EOI* DEPENDING UPON WHICH IS REQUIRED.
  7569. *
  7570. * ENTRY (X5) = TAPE FET ADDRESS.
  7571. * ((X5)+TFLAGS) = TAPE REQUEST FLAGS. ZERO IF NONE.
  7572. * ((X5)+TRING) = 1 IF TAPE MUST HAVE A WRITE RING.
  7573. * = 0 IF WRITE RING IS NOT NECESSARY.
  7574. *
  7575. * EXIT DUMP FILE ASSIGNED AND POSITIONED.
  7576. * (X5+TFC) = CURRENT FILE POSITION.
  7577. * (X5+TRC) = CURRENT RECORD POSITION.
  7578. * TO *ABT* IF TAPE FULL AND *EI=YES*.
  7579. * TO *MAIN8* IF USER DISALLOWS OVERWRITE.
  7580. *
  7581. * USES X - 0, 1, 3, 4, 6, 7.
  7582. * A - 1, 3, 4, 5, 6.
  7583. *
  7584. * MACROS BREAK, MESSAGE, READ, READO, REWIND, SKIPF,
  7585. * WRITEC, WRITEF.
  7586.  
  7587.  
  7588. ROD SUBR ENTRY/EXIT
  7589. SX6 B0+
  7590. SA6 RODA CLEAR LAST EOR FILE COUNT
  7591. ROD1 SX6 1
  7592. SA1 X5+TTNV GET VSN FOR REQUEST
  7593. SA6 X5+TRING FLAG WRITE RING IS REQUIRED
  7594. RJ RNT REQUEST NEW TAPE
  7595. SA3 EIV
  7596. NZ X1,ROD2 IF TAPE NOT PREVIOUSLY ASSIGNED
  7597. SA1 X5+TFC
  7598. BX0 X1
  7599. ZR X1,ROD2 IF POSITION NOT KNOWN
  7600. SA4 X5+TRC
  7601. ZR X3,ROD2 IF DUMP TO BE PLACED AT BOI
  7602. NG X4,ROD8 IF AT EOI FOLLOWING PREVIOUS DUMP
  7603. SX0 X0-1 ADJUST FROM COPY/LOAD TO DUMP FILE NUMBER
  7604. EQ ROD4 FIND END OF DUMP TAPE
  7605.  
  7606. ROD2 REWIND X5,R
  7607. ZR X3,ROD7 IF DUMP TO BE PLACED AT BOI
  7608. RJ CVT CHECK FOR VALID DUMP TAPE
  7609. ZR X1,ROD3 IF VALID DUMP - GO SKIP AS USUAL
  7610. SX6 B0+ NO VALID DUMP - CLEAR *EI* DUMP FLAG
  7611. SA6 EIV
  7612. MESSAGE RODB,3 * UNKNOWN DUMP FILE WILL BE OVERWRITTEN.*
  7613. WRITEC O,RODB
  7614. SA1 IDT CHECK FOR TERMINAL INPUT FILE
  7615. NZ X1,ROD7 IF NOT A TERMINAL THEN OVERWRITE
  7616. WRITEC O,RODC * IS THIS OK (YES OR NO)?*
  7617. READ I,R ISSUE QUESTION MARK PROMPT
  7618. READO I GET FIRST WORD OF USER RESPONSE
  7619. LX6 6*2 RIGHT JUSTIFY LEFT TWO CHARACTERS
  7620. SX6 X6-2RNO COMPARE WITH *NO*
  7621. NZ X6,ROD7 IF NOT *NO* THEN OVERWRITE TAPE
  7622. SX6 B0+
  7623. SA6 NFP CLEAR FILES PROCESSED COUNT
  7624. EQ MAIN8 ABORT THE DIRECTIVE
  7625.  
  7626. ROD3 SX4 B0+ INITIALIZE RECORD NUMBER
  7627. ROD4 SKIPF X5,1,R
  7628. SA1 X5
  7629. LX1 59-9 LEFT JUSTIFY EOI BIT
  7630. NG X1,ROD5 IF EOI ENCOUNTERED
  7631. SX4 X4+B1 COMPUTE RECORDS SKIPPED
  7632. LX1 -59+9
  7633. MX6 -9
  7634. BX1 -X6*X1
  7635. SX1 X1-273B
  7636. NG X1,ROD4 IF JUST EOR - NOT EOF
  7637. SX0 X0+1 COMPUTE FILES SKIPPED
  7638. BREAK
  7639. SA4 RODA
  7640. BX4 X4-X0
  7641. ZR X4,ROD9 IF LAST STATUS WAS EOF
  7642. SX4 X0-63 COMPARE WITH MAXIMUM DUMP COUNT
  7643. NG X4,ROD3 IF NOT MAXIMUM DUMPS ALREADY
  7644. MESSAGE RODD,3 * FILE CONTAINS 63 DUMPS. FILE IS FULL.*
  7645. WRITEC O,RODD
  7646. EQ ABT ABORT *RECLAIM*
  7647.  
  7648. ROD5 ZR X4,ROD9 IF LAST STATUS WAS EOF
  7649. SA1 NVV
  7650. ZR X1,ROD6 IF VALIDATING DUMP TAPE
  7651. WRITEF X5,R TERMINATE WITH AN EOF
  7652. SX0 X0+1 INCREMENT FILE COUNT
  7653. EQ ROD8 START DUMP WITH CLEAR RECORD COUNT
  7654.  
  7655. ROD6 BX6 X0
  7656. SA6 RODA SET LAST EOF FILE COUNT
  7657. SX6 B0
  7658. SA6 X5+TFC INDICATE POSITION UNKNOWN
  7659. EQ ROD1 GO BACK TO BEGINNING OF DUMP TAPE
  7660.  
  7661. ROD7 SA1 X5+TTNV SET VSN
  7662. RJ UII WRITE INITIAL VSN INDEX RECORD
  7663. SX0 B0+ INITIALIZE FILE NUMBER
  7664. ROD8 SX4 B0+ INITIALIZE RECORD NUMBER
  7665. ROD9 SX7 X4+2 SET/INCREMENT RECORD NUMBER
  7666. SA7 X5+TRC
  7667. SX6 X0+B1 SET/INCREMENT FILE NUMBER
  7668. SA6 X5+TFC
  7669. DATE HDRDT GET DATE FOR HEADER
  7670. CLOCK HDRTM GET TIME FOR HEADER
  7671. WRITEW X5,HDRCTL,HDRSZ+1 WRITE DUMP HEADER
  7672. WRITER X5,R
  7673. SX7 B1+ SET FLAG FOR TAPE WRITTEN ON
  7674. SA7 X5+WRITTEN
  7675. RJ UFV FIND VSN AFTER POSITIONING
  7676. SA1 X5+TMSV
  7677. NZ X1,RODX IF MASS STORAGE FILE
  7678. SA1 FIBDEN GET DENSITY
  7679. MX0 3
  7680. LX1 59-11
  7681. BX6 X0*X1
  7682. SA1 X5+TFLAGS GET TAPE FLAGS
  7683. LX1 59-5
  7684. BX1 -X0*X1 REMOVE OLD DENSITY
  7685. BX6 X1+X6 MERGE IN NEW DENSITY
  7686. LX6 5-59
  7687. SA6 A1
  7688. EQ RODX RETURN
  7689.  
  7690.  
  7691. RODA BSS 1 EOF STATUS/COUNT
  7692. RODB DATA C* UNKNOWN DUMP FILE WILL BE OVERWRITTEN.*
  7693. RODC DATA C* IS THIS OK (YES OR NO)?*
  7694. RODD DATA C* DUMP FILE CONTAINS 63 DUMPS. FILE IS FULL.*
  7695. RPV SPACE 4,20
  7696. ** RPI - REPRIEVE INTERFACE.
  7697. *
  7698. * ENTRY SYSTEM HAS DETECTED AN ERROR CONDITION.
  7699. * (RBPF) .NE. 0 IF ERROR IS TO BE IGNORED.
  7700. *
  7701. * EXIT TO *ABT* IF A FATAL ERROR HAS OCCURED.
  7702. * (RBPF) .EQ. 0 IF *RECLAIM* IS NOT ABORTED.
  7703. *
  7704. * USES X - 0, 1, 6.
  7705. * A - 1, 6.
  7706. *
  7707. * CALLS ABT, PBC.
  7708. *
  7709. * MACROS REPRIEVE, RPVBLK.
  7710. *
  7711. * NOTE THIS IS THE EXIT ADDRESS THE SYSTEM GIVES CONTROL
  7712. * TO WHEN AN ERROR CONDITION HAS BEEN DETECTED.
  7713. * THIS INCLUDES USER BREAKS AND SYSTEM ERRORS.
  7714.  
  7715.  
  7716. RPVBLK RPVBLK RPI REPRIEVE PARAMETER BLOCK
  7717.  
  7718.  
  7719. RPI BSS 0 ENTRY POINT FOR REPRIEVE CODING
  7720. SB1 1 ENSURE *B1=1*
  7721. SA1 RBPF
  7722. NZ X1,RPV2 IF BYPASS FLAG SET
  7723. MX0 48
  7724. SA1 RPVBLK+3 GET REPRIEVE ERROR CODE
  7725. BX1 -X0*X1
  7726. SX1 X1-40B IF TERMINAL INTERRUPT
  7727. NZ X1,ABT IF NOT A TERMINAL INTERRUPT
  7728. SA1 NOBREAK NO BREAKS ALLOWED
  7729. NZ X1,RPV1 RESUME PROCESSING
  7730. SA1 RPVBLK+6
  7731. NZ X1,ABT IF INPUT REQUEST AND USER BREAK ABORT
  7732. SA1 RPVBLK+7
  7733. BX1 -X0*X1 ERROR FLAG
  7734. SX1 X1-TIET CHECK FOR TERMINAL INTERRUPT
  7735. NZ X1,ABT IF NOT USER BREAK ONE
  7736. RPV1 SX6 B1 SET INTERUPT FLAG
  7737. SA6 BREAK
  7738. RPV2 SX6 B0+
  7739. SA6 RBPF CLEAR BYPASS FLAG
  7740. REPRIEVE RPVBLK,RESUME,233B RESUME PROCESSING, NO RETURN
  7741. SBU SPACE 4,20
  7742. ** SBU - SORT BY USER.
  7743. *
  7744. * *SBU* SORTS THE NEW ENTRIES FOR THE DATABASE BY USERNAME,
  7745. * FILE NAME AND FILE POSITION BEFORE UPDATING THE DATABASE.
  7746. *
  7747. * ENTRY UNSORTED RECORDS ON FILE *OPLDF*.
  7748. *
  7749. * EXIT SORTED RECORDS ON FILE *UPDATES*.
  7750. *
  7751. * USES X - 0, 1, 2, 6, 7.
  7752. * A - 1, 2, 6, 7.
  7753. *
  7754. * CALLS SDE, SRT.
  7755. *
  7756. * MACROS READ, READW, REWIND, UNLOAD, WRITE, WRITEO, WRITER,
  7757. * WRITEW.
  7758.  
  7759.  
  7760. SBU SUBR ENTRY/EXIT
  7761. REWIND DB CLEAR BUFFER
  7762. REWIND SF CLEAR BUFFER
  7763. REWIND OPLDF
  7764. UNLOAD DB PREVENT ANY PFM ERRORS
  7765. UNLOAD SF PREVENT ANY PFM ERRORS
  7766. WRITE CF,* PRESET WRITE FUNCTION
  7767. READ OPLDF
  7768. SBU1 READW OPLDF,SBUB,UDBEL
  7769. NZ X1,SBU2 IF NO DATA ENCOUNTERED
  7770. MX0 6*7
  7771. SA1 SBUB+DBUNM GET THE USER NAME
  7772. SA2 SBUB+DBFNO GET THE FILE AND RECORD NUMBER
  7773. BX6 X0*X1 ISOLATE USER NAME
  7774. LX2 0-18
  7775. BX2 -X0*X2 ISOLATE FILE AND RECORD NUMBER
  7776. BX6 X6+X2 CREATE SORT KEY
  7777. WRITEO CF WRITE USER NAME AS SORT KEY
  7778. WRITEW CF,SBUB,UDBEL
  7779. EQ SBU1 PROCESS NEXT RECORD
  7780.  
  7781. SBU2 WRITER CF
  7782. REWIND CF,R
  7783. RJ SRT SORT BY USER NAME AND FILE/RECORD POSITION
  7784.  
  7785. * MOVE UPDATES SORTED BY USERNAME TO *SF*.
  7786.  
  7787. REWIND CF
  7788. WRITE SF,* PRESET WRITE FUNCTION
  7789. SX6 B0+
  7790. SA6 MRUSER CLEAR CURRENT USER NAME BEING PROCESSED
  7791. SA6 SBUB+DBEL CLEAR FAMILY ENTRY IN UPDATES TYPE RECORD
  7792. READ CF
  7793. SBU3 READW CF,SBUA,ITEMSIZ
  7794. NZ X1,SBU4 IF NO MORE DATA
  7795. WRITEW SF,SBUB,UDBEL MOVE UPDATES TYPE RECORD TO *SF*
  7796. EQ SBU3 GET NEXT ENTRY
  7797.  
  7798. * NOW SORT *SF* ENTRIES BY PFN, AND DUMP FILE POSITION.
  7799.  
  7800. SBU4 WRITER SF FLUSH THE BUFFER
  7801. REWIND OPLDF
  7802. REWIND SF
  7803. WRITE DB,* PRESET WRITE FUNCTION
  7804. WRITE OPLDF,* PRESET WRITE FUNCTION
  7805. READ SF
  7806. SBU5 READW SF,SBUB,UDBEL
  7807. NZ X1,SBU10 IF END OF DATA
  7808. SA1 SBUB+DBUNM GET SORT KEY (USER NAME)
  7809. SA2 MRUSER GET CURRENT USER NAME BEING PROCESSED
  7810. MX0 42 SET USER NAME MASK
  7811. BX6 X1-X2
  7812. BX7 X0*X1 ISOLATE USERNAME KEY
  7813. BX6 X0*X6 ISOLATE CURRENT USER NAME
  7814. SA7 A2+ SAVE NEW CURRENT USER NAME
  7815. ZR X6,SBU6 IF USER NAMES ARE THE SAME
  7816. NZ X2,SBU7 IF NOT FIRST PASS
  7817. SBU6 WRITEW OPLDF,SBUB,UDBEL
  7818. EQ SBU5 GET NEXT RECORD
  7819.  
  7820. SBU7 WRITER OPLDF,R
  7821. RJ SDE SORT DATABASE ENTRIES
  7822. READ UPDATES
  7823. SA1 MRUSER
  7824. ZR X1,SBU8 IF NO MORE ENTRIES
  7825. WRITE OPLDF,* PRESET WRITE FUNCTION
  7826. WRITEW OPLDF,SBUB,UDBEL WRITE CURRENT *SF* ENTRY
  7827.  
  7828. * TRANSFER SORTED DATA TO *DB* UNTIL ENTRIES ARE PROCESSED.
  7829.  
  7830. SBU8 READW UPDATES,SBUB,UDBEL
  7831. NZ X1,SBU9 IF NO MORE DATA
  7832. WRITEW DB,SBUB,UDBEL HOLD IN *DB* UNTIL ALL PROCESSED
  7833. EQ SBU8 GET NEXT RECORD
  7834.  
  7835. SBU9 SA1 MRUSER CURRENT USER NAME
  7836. ZR X1,SBU11 IF CLEAR, NO MORE RECORDS
  7837. EQ SBU5 PROCESS NEXT SET OF RECORDS
  7838.  
  7839. SBU10 SX6 B0+ CLEAR CURRENT USER NAME
  7840. SA6 MRUSER
  7841. RECALL OPLDF
  7842. SA1 OPLDF+2
  7843. SA2 A1+B1
  7844. IX1 X1-X2 IF BUFFER POINTERS IN = OUT
  7845. NZ X1,SBU7 IF DATA IN BUFFER
  7846. SBU11 REWIND UPDATES
  7847. WRITER DB FLUSH THE BUFFER
  7848. REWIND DB
  7849. WRITE UPDATES,* PRESET WRITE FUNCTION
  7850. READ DB
  7851. SBU12 READW DB,SBUB,UDBEL
  7852. NZ X1,SBU13 IF NO MORE DATA
  7853. WRITEW UPDATES,SBUB,UDBEL
  7854. EQ SBU12 GET NEXT RECORD
  7855.  
  7856. SBU13 WRITER UPDATES
  7857. UNLOAD DB
  7858. UNLOAD SF
  7859. REWIND UPDATES
  7860. EQ SBUX RETURN
  7861.  
  7862.  
  7863. SBUA BSS ITEMSIZ-UDBEL
  7864. SBUB BSS UDBEL
  7865. SDE SPACE 4,40
  7866. ** SDE - SORT DATABASE RECORDS.
  7867. *
  7868. * *SDE* SORTS *OPLDF* RECORDS BY ONE OF TWO KEYS.
  7869. * NORMAL PFN RECORDS -
  7870. * 1. FILE NAME IS PRIMARY SORT KEY IN ASCENDING ORDER.
  7871. * 2. FILE POSITION IS SECONDARY IN DESCENDING ORDER.
  7872. * (FILE POSITION KEY IS INVERTED FOR DESCENDING ORDER)
  7873. * VSN INDEX RECORDS -
  7874. * 1. VSN IS PRIMARY SORT KEY IN ASCENDING ORDER.
  7875. * 2. FILE POSITION IS SECONDARY IN ASCENDING ORDER.
  7876. * *SDE* BUILDS THE ONE WORD KEY, THEN CALLS *SRT* TO PERFORM
  7877. * THE SORT OF UPDATE RECORDS BY THE KEY BEING USED.
  7878. * THE SORTED RECORDS ARE THEN READ IN AND WRITTEN TO *UPDATES*.
  7879. *
  7880. * ENTRY UNSORTED RECORDS ON FILE *OPLDF*.
  7881. *
  7882. * EXIT SORTED RECORDS ON FILE *UPDATES*.
  7883. *
  7884. * ERROR TO *ABT* IF 2 RECORDS HAVE SAME POSITION ON TAPE.
  7885. *
  7886. * USES X - 0, 1, 2, 3, 6.
  7887. * A - 1, 2, 3.
  7888. *
  7889. * CALLS SRT.
  7890. *
  7891. * MACROS READ, READW, REWIND, UNLOAD, WRITE, WRITEO,
  7892. * WRITER, WRITEW.
  7893.  
  7894.  
  7895. SDE SUBR ENTRY/EXIT
  7896. REWIND OPLDF,R
  7897. REWIND CF,R
  7898. REWIND UPDATES,R
  7899. WRITE CF,*
  7900. WRITE UPDATES,*
  7901. READ OPLDF START UP READ ON UNSORTED UPDATES
  7902. MX0 6*7 MASK FOR PERMANENT FILE NAME
  7903.  
  7904. * THIS FIRST PART READS EACH ENTRY FROM *OPLDF*, EXTRACTS
  7905. * FIELDS TO BUILD THE SORT KEY, AND WRITES A CORRESPONDING
  7906. * ENTRY ON *CF*. WHEN ALL ENTRIES HAVE BEEN COPIED, *SRT*
  7907. * IS CALLED TO SORT THEM IN ASCENDING SEQUENCE BY THE KEY.
  7908.  
  7909. SDE1 READW OPLDF,UPE,UDBEL
  7910. NZ X1,SDE4 IF EOR FOUND ON UNSORTED FILE
  7911. SA2 UPE+DBUNM
  7912. SA3 VSNR CHECK FOR VSN INDEX ID
  7913. BX2 X2-X3
  7914. NZ X2,SDE2 IF NOT A VSN INDEX RECORD
  7915. SA2 UPE+DBXSV VSN OF FIRST REEL OF SET
  7916. SA1 UPE+DBXFR FILE/RECORD NUMBER OF FIRST FILE
  7917. MX3 -24
  7918. LX1 -12
  7919. BX1 -X3*X1
  7920. BX2 X1+X2 MERGE VSN AND FILE/RECORD
  7921. MX3 6 BIAS VSN INDEX RECORDS TO SORT LAST
  7922. LX2 9*6 POSITION VSN/FILE/RECORD
  7923. EQ SDE3 WRITE OUT SORT KEY
  7924.  
  7925. SDE2 SA2 UPE+DBPFN ENTRY WORD WITH PFN
  7926. SA3 UPE+DBFNO ENTRY WORD WITH FILE/RECORD NUMBER
  7927. BX2 X0*X2 ISOLATE PFN
  7928. LX3 -18 POSITION FILE/RECORD NUMBER
  7929. BX3 -X3 INVERT FILE/RECORD FOR DESCENDING ORDER
  7930. BX3 -X0*X3 ISOLATE INVERTED FILE/RECORD NUMBER
  7931.  
  7932. SDE3 BX6 X2+X3 MERGE PARTS OF KEY
  7933. WRITEO CF WRITE SORT KEY FOR THIS ENTRY
  7934. WRITEW CF,UPE,UDBEL WRITE REST OF THIS ENTRY
  7935. ERRNZ ITEMSIZ-UDBEL-1 SIZE CHECK FOR SORT RECORD
  7936. EQ SDE1 LOOP TO HANDLE NEXT RECORD
  7937.  
  7938. SDE4 WRITER CF FLUSH MERGESORT FILE
  7939. UNLOAD OPLDF
  7940. RJ SRT SORT RECORDS BY KEY
  7941. READ CF
  7942.  
  7943. * COPY SORTED RECORDS TO *UPDATES*.
  7944.  
  7945. SDE5 READW CF,SDEB,ITEMSIZ
  7946. NZ X1,SDE6 IF EOR/EOF/EOI REACHED
  7947. WRITEW UPDATES,SDEC,UDBEL
  7948. EQ SDE5 GET NEXT RECORD
  7949.  
  7950. SDE6 UNLOAD CF
  7951. WRITER UPDATES
  7952. REWIND UPDATES,R
  7953. EQ SDEX RETURN
  7954.  
  7955.  
  7956. SDEB BSS 1 TEMP AREA FOR SORT ENTRY
  7957. SDEC BSS ITEMSIZ-1 TEMP AREA FOR UPDATE AND SORT ENTRY
  7958. SFC SPACE 4,10
  7959. ** SFC - SET FILE COUNT.
  7960. *
  7961. * ENTRY (X6) = DEFAULT FILE LIMIT FOR CALLING OPTION.
  7962. *
  7963. * EXIT FILE COUNT SET.
  7964. *
  7965. * USES X - 1, 6.
  7966. * A - 1, 6.
  7967.  
  7968.  
  7969. SFC SUBR ENTRY/EXIT
  7970. SA1 NFV
  7971. NZ X1,SFCX IF FILE LIMIT SET BY USER
  7972. SA6 A1
  7973. EQ SFCX RETURN
  7974. SRT SPACE 4,20
  7975. ** SRT - MERGE SORT OF 6-WORD ENTRIES.
  7976. *
  7977. * *SRT* SORTS THE 6-WORD ENTRIES ON FILE *CF* BASED
  7978. * ON THE FIRST WORD OF EACH ENTRY, USED AS AN UNSIGNED, 60-BIT
  7979. * NUMERIC SORT KEY. THE ALGORITHM USED IS TAKEN
  7980. * FROM N. WIRTH, *ALGORITHMS + DATA STRUCTURES = PROGRAMS*,
  7981. * PRENTICE-HALL, PP. 97-98.
  7982. *
  7983. * ENTRY *CF* CONTAINS AT LEAST ONE ENTRY.
  7984. * SORT KEY IS THE FIRST WORD OF EACH ENTRY.
  7985. *
  7986. * EXIT SORTED ENTRIES ON *CF*.
  7987. *
  7988. * USES X - 1, 2, 6.
  7989. * A - 1, 6.
  7990. *
  7991. * CALLS DTR, MRG.
  7992. *
  7993. * MACROS RESET, UNLOAD, REWIND, REWRYTE, WRITER.
  7994.  
  7995.  
  7996. SRT SUBR ENTRY/EXIT
  7997.  
  7998. * REPEAT DISTRIBUTE/MERGE PASSES.
  7999.  
  8000. SRT1 REWRYTE AF
  8001. REWRYTE BF
  8002. RESET CF
  8003. RJ DTR DISTRIBUTE RUNS FROM C ONTO A AND B
  8004. WRITER AF,R
  8005. WRITER BF,R
  8006. RESET AF
  8007. RESET BF
  8008. REWRYTE CF
  8009. SX6 B0+ INITIALIZE COUNT OF RUNS FOR THIS PASS
  8010. SA6 NRUNS
  8011. RJ MRG MERGE RUNS FROM A AND B ONTO C
  8012. WRITER CF,R
  8013. SA1 NRUNS
  8014. SX2 B1
  8015. IX1 X1-X2
  8016. NZ X1,SRT1 IF NOT A SINGLE RUN YET
  8017. UNLOAD AF
  8018. UNLOAD BF
  8019. REWIND CF,R
  8020. EQ SRTX RETURN
  8021. UDV SPACE 4,20
  8022. ** UDV - UPDATE DUMP VSNS IN DATABASE
  8023. *
  8024. * UDV CHECKS THE CURRENT VSN OF THE DUMP FILE.
  8025. * IF THE VSN HAS CHANGED, THE VSN IN FET+CRVSN
  8026. * IS UPDATED AND A VSN INDEX RECORD IS WRITTEN
  8027. * TO THE OPLDF FILE TO UPDATE THE DATA BASE.
  8028. *
  8029. * ENTRY (X5) = FET ADDRESS OF DUMP FILE TO CHECK.
  8030. *
  8031. * EXIT (X2).LT.0 FILE IS NOT A TAPE FILE.
  8032. * (X2).EQ.0 VSN HAS NOT CHANGED.
  8033. * (X2).GT.0 VSN CHANGED, FET+CRVSN CONTAINS NEW VSN
  8034. * AND VSN INDEX RECORD HAS BEEN WRITTEN.
  8035. *
  8036. * USES X - 1, 2, 3, 5, 6
  8037. * A - 1, 2
  8038. *
  8039. * CALLS UFV
  8040.  
  8041. UDV SUBR ENTRY/EXIT
  8042. SA2 DBNAM
  8043. ZR X2,UDVX IF NO DATA BASE
  8044. RJ UFV UPDATE FET VSN
  8045. NG X2,UDVX IF NOT A TAPE FILE
  8046. ZR X2,UDVX IF VSN DID NOT CHANGE
  8047. SA6 VSNR+DBXCV SAVE NEW VSN (X6) IN DB RECORD
  8048. WRITEO NUMBERS
  8049. SA1 X5+TTNV SET VSN ORIGINALLY SPECIFIED
  8050. MX6 6*6
  8051. BX6 X1*X6
  8052. SA6 VSNR+DBXSV SAVE SET VSN IN CASE DUMPING AT EOI
  8053. SA1 X5+TFC
  8054. LX1 12
  8055. SA2 X5+TRC
  8056. BX6 X1+X2 MERGE FILE AND RECORD NUMBER
  8057. LX6 18
  8058. SA6 VSNR+DBXFR SAVE BEGINNING FILE AND RECORD ON VSN
  8059. WRITEW OPLDF,VSNR,UDBEL
  8060. SX2 1 INDICATE VSN INDEX RECORD WRITTEN
  8061. EQ UDVX RETURN
  8062. SPACE 4,10
  8063. ** UFV - UPDATE FET VSN
  8064. *
  8065. * UFV CHECKS THE CURRENT VSN OF THE DUMP FILE
  8066. * AND UPDATES THE VSN IN FET+CRVSN.
  8067. *
  8068. * ENTRY (X5) = FET ADDRESS OF FILE TO BE CHECKED.
  8069. *
  8070. * EXIT (X2).LT.0 FILE IS NOT A TAPE FILE.
  8071. * (X2).EQ.0 VSN HAS NOT CHANGED.
  8072. * (X2).GT.0 VSN CHANGED, FET+CRVSN CONTAINS NEW VSN.
  8073. * (X5) = FET ADDRESS.
  8074. * (X6) BITS 59-24 = CURRENT VSN, IF (X2).GE.0.
  8075. *
  8076. * USES X - 1, 2, 3, 5, 6.
  8077. * A - 1, 2, 5.
  8078. *
  8079. * MACROS FILINFO
  8080.  
  8081. UFV SUBR ENTRY/EXIT
  8082. MX3 7*6
  8083. SA1 X5 GET LFN FROM FET
  8084. BX6 X3*X1
  8085. SA1 FIBK GET FIRST WORD OF *FILINFO* BLOCK
  8086. BX1 -X3*X1 REMOVE THE LFN
  8087. BX6 X1+X6 MERGE IN NEW LFN
  8088. SA6 A1
  8089. FILINFO FIBK
  8090. SA2 X5+TFLAGS GET TAPE FLAGS
  8091. LX2 59-11
  8092. NG X2,UFVX IF SPECIFIED AS MASS STORAGE
  8093. DEBUG IFC NE,$DEBUG$"MODLEVEL"$
  8094. SA2 FIBVSN
  8095. DEBUG ELSE
  8096. SA2 X5+CRVSN FOR DEBUG FORCE THE SAME VSN
  8097. DEBUG ENDIF
  8098. LX2 59-5 CHECK IF THIS IS A TAPE
  8099. NG X2,UFVX IF NOT A TAPE
  8100. LX2 5-59
  8101. MX3 6*6
  8102. BX6 X3*X2 ISOLATE CURRENT VSN
  8103. SA2 X5+CRVSN GET PREVIOUS VSN
  8104. BX2 X2-X6
  8105. ZR X2,UFVX IF NO CHANGE OF VSN
  8106. SA6 A2
  8107. SX2 B1+ INDICATE VSN CHANGED TO CALLER
  8108. EQ UFVX RETURN
  8109. UII SPACE 4,15
  8110. ** UII - UPDATE FOR INITIAL VSN INDEX RECORD.
  8111. *
  8112. * UII WRITES THE DATA BASE UPDATE ENTRY FOR THE FIRST
  8113. * REEL OF A DUMP FILE.
  8114. *
  8115. * ENTRY (X1) = VSN OF FIRST REEL OF SET.
  8116. * (X5) = FET ADDRESS OF DUMP FILE.
  8117. *
  8118. * EXIT OPLDF UPDATE RECORD FOR VSN INDEX WRITTEN.
  8119. *
  8120. * USES X - 1, 3, 6.
  8121. * A - 1, 3, 6.
  8122. *
  8123. * CALLS UFV.
  8124.  
  8125. UII SUBR ENTRY/EXIT
  8126. SA3 DBNAM CHECK IF USING A DATA BASE
  8127. ZR X3,UIIX IF NOT USING DATA BASE
  8128. SA3 X5+TFLAGS GET TAPE FLAGS
  8129. LX3 59-11
  8130. PL X3,UII1 IF A TAPE DUMP
  8131. LX3 47-59 SET TAPE FLAGS, FIRST-OF-SET FILE/RECORD
  8132. BX6 X3
  8133. SA6 VSNR+DBXFR
  8134. MX3 7*6
  8135. BX6 X3*X1 ISOLATE DUMP FILE NAME
  8136. EQ UII3 WRITE TO *NUMBERS*
  8137.  
  8138. UII1 MX3 6*6
  8139. BX6 X3*X1
  8140. SA6 VSNR+DBXSV SAVE AS SET VSN
  8141. SA6 VSNR+DBXCV SAVE AS CURRENT VSN
  8142. RJ UFV UPDATE FET VSN
  8143. NG X2,UII2 IF NOT A TAPE FILE
  8144. SA6 VSNR+DBXCV SAVE TRUE VSN
  8145. SA1 FIBDEN GET DENSITY
  8146. MX3 3
  8147. LX1 59-11
  8148. BX6 X3*X1
  8149. SA1 X5+TFLAGS GET TAPE FLAGS
  8150. LX1 59-5
  8151. BX1 -X3*X1 REMOVE OLD DENSITY
  8152. BX6 X1+X6 MERGE IN NEW DENSITY
  8153. LX6 5-59
  8154. SA6 A1
  8155. LX6 36 SET TAPE FLAGS, FIRST-OF-SET FILE/RECORD
  8156. SA6 VSNR+DBXFR
  8157. UII2 WRITEW OPLDF,VSNR,UDBEL
  8158. SA1 VSNR+DBXCV
  8159. BX6 X1
  8160. UII3 WRITEO NUMBERS WRITE TO *NUMBERS* FILE
  8161. EQ UIIX RETURN
  8162. SPACE 4,10
  8163. ** UPD - UPDATE DATABASE.
  8164. *
  8165. * ENTRY (X5) = ATTACH MODE FOR *ADB*.
  8166. * (COPTION) = DIRECTIVE.
  8167. * FILE *UPDATES* CONTAINS UPDATE ENTRIES
  8168. * TO ADD TO THE DATABASE.
  8169. * FILE *NUMBERS* CONTAINS TAPE VSN-S.
  8170. *
  8171. * EXIT UPDATE COMPLETE.
  8172. *
  8173. * USES X - ALL.
  8174. * A - 0, 1, 2, 3, 4, 5, 6.
  8175. * B - 7.
  8176. *
  8177. * CALLS ADB, COE, POT, RDU, WOR.
  8178. *
  8179. * MACROS ABORT, CLEAR, MESSAGE, READ, READW, REWIND,
  8180. * UNLOAD, WRITE, WRITER, WRITEW.
  8181. *
  8182. * NOTE UPDATES FILE MUST BE SORTED.
  8183.  
  8184.  
  8185. UPD SUBR ENTRY/EXIT
  8186. SX7 PTWR SET WRITE MODE FOR DATABASE ATTACH
  8187. SA1 NLVIFLG SET IF DATABASE JUST CREATED IN PDB
  8188. ZR X1,UPD.1 IF DATBASE NOT JUST CREATED
  8189. MX6 0
  8190. SA6 NLVIFLG CLEAR FLAG
  8191. RJ ADB ATTACH THE DATABASE
  8192. EQ UPD.2 RESUME NORMAL PROCESSING
  8193.  
  8194. UPD.1 RJ LVI ATTACH DATABASE, LOCATE VSN INDEX
  8195. UPD.2 REWIND NEW,R PRESET NON WRITE *CIO* FUNCTION
  8196. WRITE NEW,*
  8197. SX6 B0
  8198. SA6 NEW+6
  8199. SA1 NEW+1 SET RANDOM BIT IN FET
  8200. MX0 1
  8201. LX0 47-59
  8202. BX6 X0+X1
  8203. SA6 A1
  8204. REWIND OPLDF,R
  8205. WRITE OPLDF,* PRESET NON-WRITE *CIO* FUNCTION
  8206. REWIND NUMBERS,R
  8207. READ NUMBERS,R
  8208. SA1 NUMBERS+2 GET LENGTH OF FILE
  8209. SA2 A1+B1
  8210. IX1 X1-X2
  8211. BX6 X6-X6
  8212. SA6 DIRBUF+X1 SET ZERO WORD AT END OF DATA IN BUFFER
  8213. NZ X1,UPD0 IF TAPE NUMBER FILE NOT EMPTY
  8214. SA2 USERDB USER DATABASE FLAG
  8215. NZ X2,UPD1 IF USER DATABASE
  8216. MESSAGE UPDA,3 * TAPE NUMBER FILE EMPTY.*
  8217. EQ UPD1 PROCESS UPDATES
  8218.  
  8219. UPD0 SA2 COPTION
  8220. SA3 =0LREMOVE
  8221. BX2 X2-X3
  8222. ZR X2,UPD1 IF PROCESSING *REMOVE* OPTION
  8223. SA2 DBE+DBXSV
  8224. MX0 6*6
  8225. BX2 X0*X2
  8226. ZR X2,UPD1 IF NO VSN INDEX FOUND
  8227. BX5 X1 PRESERVE COUNT OF ENTRIES IN X5
  8228. UPD0.1 READW DB,DBE,DBEL GET NEXT VSN INDEX ENTRY
  8229. NZ X1,UPD1 IF NO MORE VSN INDEX
  8230. SA1 DBE+DBXCV
  8231. SA2 DIRBUF-1
  8232. UPD0.2 SA2 A2+B1 GET NEXT *NUMBERS* ITEM
  8233. ZR X2,UPD0.1 IF END OF *NUMBERS* LIST
  8234. BX2 X1-X2
  8235. NZ X2,UPD0.2 IF NO MATCH TO CURRENT VSN ENTRY
  8236. SA1 DBE+DBXSV
  8237. BX6 X1+X5 MERGE LIST SIZE AND SET VSN
  8238. SA6 A2 REPLACE *NUMBERS* ITEM
  8239. SX5 X5-1
  8240. NZ X5,UPD0.1 IF UNMATCHED *NUMBERS* ITEMS LEFT
  8241. UPD1 REWIND DB,R
  8242. REWIND UPDATES,R
  8243. READ UPDATES
  8244. RJ RDU READ *UPDATES* FILE
  8245. UPD2 READ DB,R
  8246. SA3 DB
  8247. MX0 -7
  8248. LX0 2
  8249. BX3 -X0*X3 GET *CIO* RESPONSE
  8250. SX3 X3-30B CHECK FOR EOI/EOF
  8251. ZR X3,UPD13 IF EOF/EOI ENCOUNTERED IMMEDIATELY
  8252. SA3 DB+3
  8253. SA4 A3-B1 CHECK FOR EMPTY RECORD
  8254. IX4 X4-X3
  8255. ZR X4,UPD2 IF EMPTY RECORD
  8256. SA3 X3
  8257. SA4 OPLDH
  8258. BX4 X3-X4
  8259. ZR X4,UPD13 IF OPLD RECORD FOUND
  8260.  
  8261. * SAVE USER NAME.
  8262.  
  8263. MX0 42
  8264. BX6 X0*X3
  8265. SX3 2
  8266. BX6 X3+X6
  8267. SA6 INDXNAM
  8268. UPD3 READW DB,DBE,DBEL
  8269.  
  8270. * CHECK FOR EOR/EOF/EOI.
  8271.  
  8272. ZR X1,UPD6 IF SUCCESSFUL READ WITH NO SPECIAL STATUS
  8273. NG X1,UPD14 IF EOF OR EOI
  8274. SX2 X1-DBE COMPUTE LENGTH OF READ
  8275. ZR X2,UPD4 IF EOR ENCOUNTERED
  8276. SB2 X1
  8277. EQ B2,B6,UPD14 IF INCOMPLETE READ -- EOI
  8278. EQ ABT1 ABORT *RECLAIM*
  8279.  
  8280. UPD4 SA1 DBE DATABASE ENTRY
  8281. SA2 UPE UPDATE ENTRY
  8282. MX0 42
  8283. BX3 X1-X2 COMPARE USERS
  8284. BX3 X0*X3 REMOVE POSSIBLE JUNK BITS 17-0
  8285. NZ X3,UPD5 UPDATE RECORDS NOT FOR USER NAME
  8286. WRITEW NEW,UPE,DBEL
  8287. RJ RDU
  8288. ZR X1,UPD4 IF NOT END OF UPDATES
  8289. SX6 B0
  8290. SA6 UPE
  8291. UPD5 SA1 NEW+2 EXAMINE IN POINTER
  8292. SA2 NEW+3 OUT POINTER
  8293. IX1 X1-X2
  8294. NZ X1,UPD5.1 IF DATA IN BUFFER TO BE WRITTEN
  8295. SA4 NEW
  8296. MX0 -7 WIDTH OF *CIO* FUNCTION CODE
  8297. LX0 2 SKIP BINARY/CODED, COMPLETE BITS
  8298. BX4 -X0*X4 EXTRACT *CIO* FUNCTION CODE
  8299. SX4 X4-14B CHECK FOR *WRITE* CODE
  8300. NZ X4,UPD2 IF NO DATA WRITTEN RECENTLY
  8301. UPD5.1 WRITER NEW,R
  8302. WRITE NEW,* RESET WRITE FUNCTION
  8303. RJ COE
  8304. JP UPD2 READ NEXT RECORD
  8305.  
  8306. UPD6 MX0 36
  8307. SA1 DBE+DBUNM CHECK FOR VSN INDEX ENTRY
  8308. SA2 VSNR
  8309. BX2 X1-X2
  8310. NZ X2,UPD6.0 IF NOT A VSN INDEX ENTRY
  8311. SA1 DBE+DBXSV
  8312. EQ UPD6.1 SEARCH *NUMBERS* LIST
  8313.  
  8314. UPD6.0 SA1 DBE+DBTNO TAPE VSN/LAST MOD
  8315. SA3 DBE+DBFLG WORD WITH TAPE FLAGS
  8316. LX3 59-47
  8317. PL X3,UPD6.1 IF PERMANENT FILE FLAG NOT SET
  8318. MX0 42 MASK FOR PERMANENT FILE NAME
  8319. UPD6.1 BX1 X0*X1 EXTRACT VSN
  8320. MX0 42 MUST MASK 7 CHAR FOR *NUMBERS* LIST
  8321. SA3 DIRBUF-1
  8322. UPD7 SA3 A3+B1
  8323. ZR X3,UPD8 IF END OF TABLE - WRITE OLD ENTRY ON *NEW*
  8324. BX4 X0*X3 TAPE NUMBER
  8325. BX4 X4-X1
  8326. NZ X4,UPD7 IF NO MATCH
  8327. ZR X2,UPD3 IF MATCH IS TO VSN INDEX RECORD
  8328. SA1 COPTION
  8329. SA2 =0LREMOVE
  8330. BX3 X1-X2
  8331. NZ X3,UPD3 IF NOT *REMOVE*
  8332.  
  8333. * DELETE CURRENT RECORD -- INCREMENT FILE COUNT.
  8334.  
  8335. SA1 NFP
  8336. SX6 X1+1
  8337. SA6 A1
  8338. SA0 DBE
  8339. RJ POT PROCESS OUTPUT
  8340. EQ UPD3 CONTINUE
  8341.  
  8342. UPD8 SA1 UPE
  8343. ZR X1,UPD9 NO UPDATE ENTRIES LEFT
  8344.  
  8345. * CHECK USER NAMES.
  8346.  
  8347. SA2 DBE
  8348. MX0 42
  8349. BX1 X0*X1
  8350. LX1 42
  8351. BX2 X0*X2
  8352. LX2 42
  8353. IX3 X2-X1
  8354. NG X3,UPD9 IF DATABASE .LT. UPDATE - WRITE DATABASE
  8355. NZ X3,UPD10 IF DATABASE .GT. UPDATE - WRITE UPDATE
  8356.  
  8357. * CHECK PERMANENT FILE NAME OR VSN OF SET.
  8358.  
  8359. SA1 A1+B1
  8360. BX1 X0*X1
  8361. LX1 42
  8362. SA2 A2+B1
  8363. BX2 X0*X2
  8364. LX2 42
  8365. IX3 X2-X1
  8366. NG X3,UPD9 IF DATABASE .LT. UPDATE - WRITE DATABASE
  8367. NZ X3,UPD12 IF DATABASE .GT. UPDATE - WRITE UPDATE
  8368.  
  8369. * CHECK IF VSN INDEX UPDATE RECORD
  8370.  
  8371. SA3 UPE+DBUNM
  8372. SA4 VSNR VSN INDEX ID
  8373. BX3 X3-X4
  8374. NZ X3,UPD8.5 IF NOT VSN INDEX DATA
  8375.  
  8376. * CHECK FILE AND RECORD POSITIONS.
  8377.  
  8378. SA1 UPE+DBXFR
  8379. LX1 -18
  8380. BX1 -X0*X1
  8381. SA2 DBE+DBXFR
  8382. LX2 -18
  8383. BX2 -X0*X2
  8384. IX3 X2-X1
  8385. NG X3,UPD9 IF DATABASE .LT. UPDATE - WRITE DATABASE
  8386. EQ UPD3 DATABASE .GE. UPDATE - BYPASS DATABASE
  8387.  
  8388. * CHECK DUMP DATE.
  8389.  
  8390. UPD8.5 SA1 A1
  8391. BX1 -X0*X1
  8392. SX1 X1-70000
  8393. PL X1,UPD8.6 IF UPDATE YEAR .LT. 2000
  8394. SX1 X1+100000
  8395. UPD8.6 SA2 A2
  8396. BX2 -X0*X2
  8397. SX2 X2-70000
  8398. PL X2,UPD8.7 IF DATABASE YEAR .LT. 2000
  8399. SX2 X2+100000
  8400. UPD8.7 IX3 X2-X1
  8401. NG X3,UPD12 IF DATABASE .LT. UPDATE - WRITE UPDATE
  8402. NZ X3,UPD9 IF DATABASE .GT. UPDATE - WRITE DATABASE
  8403.  
  8404. * CHECK TAPE NUMBER.
  8405.  
  8406. SA1 UPE+DBTNO
  8407. SA2 DBE+DBTNO
  8408. BX1 X0*X1
  8409. BX2 X0*X2
  8410. BX1 X1-X2
  8411. NZ X1,UPD12 IF TAPE NUMBERS NOT EQUAL WRITE UPDATE
  8412.  
  8413. * CHECK FLAG WORD (DBE+3).
  8414.  
  8415. SA1 A1+B1
  8416. SA2 A2+B1
  8417. BX1 X1-X2
  8418. NZ X1,UPD12 IF WORD 4 NOT THE SAME - WRITE UPDATE
  8419. SA1 EIV
  8420. NZ X1,UPD12 IF DUMPING TO END OF TAPE
  8421.  
  8422. * A DUPLICATE ENTRY - DISREGARD UPDATE ENTRY.
  8423.  
  8424. RJ RDU
  8425. ZR X1,UPD9 IF NOT END OF UPDATE ENTRIES
  8426. SX6 B0
  8427. SA6 UPE
  8428. UPD9 WRITEW NEW,DBE,DBEL
  8429. EQ UPD3 CONTINUE
  8430.  
  8431. UPD10 WRITEW NEW,UPE,DBEL
  8432. SA5 UPE
  8433. BX5 X0*X5
  8434. RJ RDU
  8435. ZR X1,UPD11 IF NOT END OF UPDATE ENTRIES
  8436. SX6 B0
  8437. SA6 UPE
  8438. UPD11 SA1 UPE
  8439. BX1 X0*X1
  8440. BX3 X1-X5
  8441. ZR X3,UPD10 UPDATE ENTRIES FOR SAME USER NAME
  8442. BX6 X0*X5 MASK OUT USER NAME OF RECORD
  8443. SX1 2
  8444. BX6 X1+X6
  8445. SA6 INDXNAM SAVE USER NAME
  8446. WRITER NEW,R
  8447. WRITE NEW,* RESET WRITE FUNCTION
  8448. RJ COE CREATE OPLD ENTRY
  8449. MX0 42
  8450. SA1 DBE
  8451. BX6 X0*X1
  8452. SX1 2
  8453. BX6 X6+X1
  8454. SA6 INDXNAM SAVE THE NEW RECORD NAME
  8455. EQ UPD8 PROCESS NEXT UPDATE ENTRY
  8456.  
  8457. UPD12 WRITEW NEW,UPE,DBEL
  8458. RJ RDU
  8459. ZR X1,UPD8 IF NOT END OF UPDATE ENTRIES
  8460. SX6 B0
  8461. SA6 UPE
  8462. EQ UPD8 PROCESS NEXT UPDATE ENTRY
  8463.  
  8464. UPD13 SA1 UPE
  8465. BX6 X1
  8466. SA6 DBE
  8467. MX0 42
  8468. BX6 X0*X6
  8469. SX1 2
  8470. BX6 X1+X6
  8471. SA6 INDXNAM
  8472. UPD14 SA1 UPE
  8473. ZR X1,UPD17 IF NO UPDATE RECORDS LEFT
  8474. UPD15 SA1 DBE
  8475. SA2 UPE
  8476. BX1 X2-X1
  8477. MX0 42
  8478. BX1 X0*X1
  8479. ZR X1,UPD16 IF SAME USER NAME
  8480. WRITER NEW,R
  8481. WRITE NEW,* RESET WRITE FUNCTION
  8482. RJ COE
  8483. SA1 UPE
  8484. MX0 42
  8485. BX6 X0*X1
  8486. SA6 DBE
  8487. SX1 2
  8488. BX6 X1+X6
  8489. SA6 INDXNAM
  8490. UPD16 WRITEW NEW,UPE,DBEL
  8491. RJ RDU
  8492. ZR X1,UPD15 IF NOT END OF UPDATES
  8493. WRITER NEW,R
  8494. WRITE NEW,* RESET WRITE FUNCTION
  8495. RJ COE
  8496. UPD17 RJ WOR
  8497. REWIND NEW,R
  8498. READ NEW,R
  8499. REWIND DB,R
  8500. WRITE DB,* PRESET WRITE FUNCTION
  8501. UPD18 READW NEW,WSA,WSAL
  8502. SX0 X1
  8503. SB7 B6-WSA
  8504. WRITEW DB,WSA,B7
  8505. ZR X0,UPD18 IF NO EOR/EOF/EOI
  8506. NG X0,UPD19 IF NOT AN EOR
  8507. READ NEW,R
  8508. WRITER DB,R
  8509. WRITE DB,* RESET WRITE FUNCTION
  8510. EQ UPD18 LOOP
  8511.  
  8512. UPD19 UNLOAD DB,R
  8513. UNLOAD NEW,R
  8514. SA1 NEW+1 REMOVE RANDOM BIT FROM *NEW*
  8515. MX0 13
  8516. BX6 -X0*X1
  8517. SA6 A1
  8518.  
  8519. * UNLOAD NUMBERS/UPDATES UNLESS *UPDATE* OPTION CALLED.
  8520.  
  8521. SA3 COPTION LAST OPTION ENTERED BY USER
  8522. SA2 =0LUPDATE
  8523. BX2 X3-X2
  8524. ZR X2,UPDX IF UPDATE OPTION THEN RETURN
  8525. UNLOAD UPDATES,R
  8526. UNLOAD NUMBERS,R
  8527. CLEAR NUMBERS CLEAR FET POINTERS --- NUMBERS
  8528. EQ UPDX RETURN
  8529.  
  8530.  
  8531. UPDA DATA C* TAPE NUMBER FILE EMPTY.*
  8532. UPDB DATA C* DATABASE CORRUPTED.*
  8533. WOR SPACE 4,15
  8534. ** WOR - WRITE OPLD RECORD.
  8535. *
  8536. * ENTRY OPLD WRITTEN ON *OPLDF*.
  8537. *
  8538. * EXIT OPLD RECORD WRITTEN.
  8539. *
  8540. * USES X - 0, 1, 6.
  8541. * A - 1, 6.
  8542. * B - 7.
  8543. *
  8544. * MACROS READ, READW, REWIND, UNLOAD, WRITER, WRITEW.
  8545.  
  8546.  
  8547. WOR SUBR ENTRY/EXIT
  8548. WRITER OPLDF,R
  8549. REWIND OPLDF,R
  8550. WRITEW NEW,OPLDH,1
  8551. SA1 DB+CFPN GET FILE NAME
  8552. MX0 42
  8553. BX6 X0*X1
  8554. SA6 INDXNAM
  8555. SA6 CATBUF
  8556. SA1 DATE
  8557. LX1 6
  8558. BX6 X1
  8559. SA6 A6+B1
  8560.  
  8561. * SET UP THE 7000 TABLE HEADER.
  8562.  
  8563. SA1 INDXLEN
  8564. SX1 X1+2
  8565. MX0 3
  8566. BX6 X1+X0
  8567. SA6 CATBUF+16B
  8568. WRITEW NEW,CATBUF,17B
  8569.  
  8570. * READ THE OPLD TABLE AND WRITE IT.
  8571.  
  8572. READ OPLDF
  8573. WOR1 READW OPLDF,WSA,WSAL
  8574. BX0 X1
  8575. SB7 B6-WSA
  8576. WRITEW NEW,WSA,B7
  8577. ZR X0,WOR1 NOT END OF OPLD ENTRIES
  8578.  
  8579. * WRITE THE OPLD ENTRY WORD.
  8580.  
  8581. SA1 INDXNAM
  8582. SX6 10B
  8583. BX6 X1+X6
  8584. SA6 A1 REPLACE OPLD ENTRY
  8585. WRITEW NEW,INDXNAM,2
  8586. WRITER NEW,R
  8587. UNLOAD OPLDF
  8588. EQ WORX RETURN
  8589. WRB SPACE 4,25
  8590. ** WRB - WRITE PARTIAL TAPE BLOCK.
  8591. *
  8592. * *WRB* COPIES A SPECIFIED NUMBER OF WORDS FROM THE PERMANENT
  8593. * FILE BEING DUMPED TO THE CURRENT TAPE BLOCK BEING BUILT.
  8594. * OPTIONALLY IT WILL ALSO WRITE THE CURRENT TAPE BLOCK TO
  8595. * THE TAPE WHEN A SHORT PRU HAS BEEN READ.
  8596. *
  8597. * ENTRY (X1) = WORD COUNT OF DATA TO MOVE.
  8598. * (X2) = SIZE OF FREE SPACE IN TAPE BLOCK.
  8599. * (X3) = SHORT PRU FLAG--
  8600. * .EQ. 0 IF FULL PRU.
  8601. * .LT. 0 IF SHORT PRU.
  8602. *
  8603. * EXIT DATA COPIED INTO FREE SPACE IN TAPE BLOCK.
  8604. * IF (X3) WAS NEGATIVE, THE TAPE BLOCK IS WRITTEN.
  8605. *
  8606. * USES X - 0, 1, 4, 6, 7.
  8607. * A - 1, 4, 6, 7.
  8608. * B - 3.
  8609. *
  8610. * MACROS READO, READW, WRITEO, WRITEW.
  8611.  
  8612.  
  8613. WRB SUBR ENTRY/EXIT
  8614. SA4 BLOKHED CURRENT TAPE BLOCK CONTROL WORD
  8615. MX0 -9 WIDTH OF BLOCK SIZE
  8616. BX6 -X0*X4 ISOLATE CURRENT BLOCK SIZE
  8617. IX6 X6+X1 COMPUTE NEW BLOCK SIZE
  8618. BX7 X0*X4 EXTRACT REST OF CONTROL WORD
  8619. BX7 X7+X6 INSERT NEW SIZE
  8620. SA7 A4
  8621. SX6 X3 REMEMBER SHORT PRU FLAG
  8622. SA6 WRBA
  8623. SB3 X1 REMEMBER WORD COUNT
  8624. SX1 WSA+NDMPWD LWA+1 OF TAPE BLOCK BUFFER
  8625. IX4 X1-X2 COMPUTE FWA OF FREE SPACE IN TAPE BLOCK
  8626. READW NEW,X4,B3 MOVE (WC) WORDS INTO FREE SPACE
  8627. SA4 NOPRU CHECK TO SEE IF NOT A FULL PRU
  8628. NZ X4,WRBX IF NOT FULL PRU
  8629. READO NEW GET PRU END CONTROL WORD
  8630. MX0 12 WIDTH OF LEVEL NUMBER FIELD
  8631. SA4 WRBA
  8632. ZR X4,WRBX IF WAS A FULL PRU THEN RETURN
  8633. BX6 X0*X6 ISOLATE LEVEL NUMBER OF PRU
  8634. ZR X6,WRB1 IF EOR LEVEL
  8635. SX4 2 EOF TAPE BLOCK FLAG
  8636. EQ WRB2 JOIN WITH EOR CASE
  8637.  
  8638. WRB1 SX4 1 EOR TAPE BLOCK
  8639. WRB2 SA1 BLOKHED
  8640. LX4 9 POSITION DATA BLOCK TYPE
  8641. BX6 X1+X4 INSERT DATA BLOCK TYPE
  8642. WRITEO TF WRITE TAPE BLOCK CONTROL WORD
  8643. SA4 BLOKHED
  8644. MX0 -9
  8645. BX4 -X0*X4 ISOLATE BLOCK SIZE
  8646. SX6 DCW RESET TAPE BLOCK CONTROL WORD
  8647. SA6 A4
  8648. WRITEW TF,WSA,X4 WRITE TAPE BLOCK
  8649. EQ WRBX RETURN
  8650.  
  8651.  
  8652. WRBA BSS 1 SHORT PRU FLAG PARAMETER
  8653. WRS SPACE 4,15
  8654. ** WRS - WRITE SECTOR BOUNDED BY CONTROL WORDS.
  8655. *
  8656. * *WRS* WRITES A PRU TO THE FILE BEING LOADED, BOUNDED BY
  8657. * CONTROL WORDS.
  8658. *
  8659. * ENTRY (X5) = AMOUNT OF DATA TO WRITE FROM *SECTOR*.
  8660. *
  8661. * EXIT SECTOR WRITTEN.
  8662. *
  8663. * USES X - 2, 3, 4, 6.
  8664. * A - 3.
  8665. *
  8666. * MACROS WRITEO, WRITEW.
  8667.  
  8668.  
  8669. WRS SUBR ENTRY/EXIT
  8670. SX2 5 NUMBER OF BYTES IN A WORD
  8671. IX4 X2*X5 COMPUTE BYTE COUNT OF PRU
  8672. SA3 PRUHEAD BLANK PRU HEADER
  8673. BX6 X3+X4 BUILD PRU HEADER WITH BYTE COUNT
  8674. WRITEO SF
  8675. ZR X5,WRS1 IF NO DATA IN PRU
  8676. WRITEW SF,SECTOR,X5 WRITE DATA
  8677. WRS1 WRITEW SF,EORWORD,1 WRITE EOR LEVEL WORD
  8678. EQ WRSX RETURN
  8679. TITLE SECONDARY SUBROUTINES.
  8680. CIT SPACE 4,15
  8681. ** CIT - COPY ONE ITEM FROM ONE FILE TO ANOTHER.
  8682. *
  8683. * ENTRY (X2) = ADDRESS OF FET TO READ FROM.
  8684. * (X5) = ADDRESS OF FET TO WRITE TO.
  8685. *
  8686. * EXIT ITEM COPIED.
  8687. * *EORUN* SET IF ITEM COPIED WAS END OF A RUN.
  8688. *
  8689. * USES X - 1, 2, 3, 5, 6, 7.
  8690. * A - 1, 2, 3, 5, 6, 7.
  8691. *
  8692. * MACROS GETITEM, PUTITEM.
  8693.  
  8694. CIT2 NG X1,CIT1 IF NEXT ITEM .LT. COPIED ITEM
  8695.  
  8696. CIT SUBR ENTRY/EXIT
  8697. SX6 X2 SAVE X FET ADDRESS
  8698. SX7 X5 SAVE Y FET ADDRESS
  8699. SA6 CITA
  8700. SA7 CITB
  8701. GETITEM X2,CITC
  8702. SA5 CITB
  8703. PUTITEM X5,CITC
  8704. SA2 CITA
  8705. SA1 X2+EOF CHECK STATUS OF THIS FILE
  8706. NZ X1,CIT1 IF EOF(X)
  8707. SA1 X2+PTR
  8708. SA3 CITC
  8709. SX6 B0+ CLEAR END OF RUN FLAG
  8710. SA6 EORUN
  8711. BX6 X1-X3
  8712. IX1 X1-X3
  8713. PL X6,CIT2 IF SAME SIGN (NO OVERFLOW POSSIBLE)
  8714. PL X3,CITX IF NEXT ITEM .GT. COPIED ITEM
  8715. CIT1 SX6 B1+ SET END OF RUN FLAG
  8716. SA6 EORUN
  8717. EQ CITX RETURN
  8718.  
  8719.  
  8720. CITA BSS 1 INPUT FET ADDRESS
  8721. CITB BSS 1 OUTPUT FET ADDRESS
  8722. CITC BSS ITEMSIZ BLOCK FOR HOLDING COPIED ENTRY
  8723. CRN SPACE 4,15
  8724. ** CRN - COPY RUN OF ENTRIES BETWEEN FILES.
  8725. *
  8726. * ENTRY (X2) = FET READ FROM.
  8727. * (X5) = FET WRITTEN TO.
  8728. *
  8729. * EXIT RUN COPIED FROM X2 FILE TO X5 FILE.
  8730. *
  8731. * USES X - 1, 2, 5, 6, 7.
  8732. * A - 1, 2, 5, 6, 7.
  8733. *
  8734. * MACROS COPITEM.
  8735.  
  8736.  
  8737. CRN SUBR ENTRY/EXIT
  8738. SX6 X2 SAVE INPUT FET ADDRESS
  8739. SX7 X5 SAVE OUTPUT FET ADDRESS
  8740. SA6 CRNA
  8741. SA7 CRNB
  8742.  
  8743. * REPEAT COPYING ITEMS UNTIL END-OF-RUN.
  8744.  
  8745. CRN1 SA2 CRNA
  8746. SA5 CRNB
  8747. COPITEM X2,X5
  8748. SA1 EORUN
  8749. ZR X1,CRN1 IF NOT END OF RUN BEING COPIED
  8750. EQ CRNX RETURN
  8751.  
  8752.  
  8753. CRNA BSS 1 INPUT FET ADDRESS
  8754. CRNB BSS 1 OUTPUT FET ADDRESS
  8755. DTR SPACE 4,15
  8756. ** DTR - DISTRIBUTE RUNS FROM C ONTO A AND B.
  8757. *
  8758. * ENTRY ALL ENTRIES ARE ON *CF*.
  8759. * ALL THREE FILES ARE READY TO GO.
  8760. *
  8761. * EXIT RUNS ARE DISTRIBUTED EVENLY BETWEEN *AF* AND *BF*.
  8762. *
  8763. * USES X - 1, 3.
  8764. * A - 1, 3.
  8765. *
  8766. * MACROS COPYRUN.
  8767.  
  8768.  
  8769. DTR SUBR ENTRY/EXIT
  8770.  
  8771. * REPEAT COPY RUNS UNTIL EOF(C).
  8772.  
  8773. DTR1 COPYRUN CF,AF
  8774. SA1 CF+EOF
  8775. NZ X1,DTR2 IF EOF(C)
  8776. COPYRUN CF,BF
  8777. SA1 CF+EOF
  8778. DTR2 ZR X1,DTR1 IF NOT EOF(C)
  8779. EQ DTRX RETURN
  8780. GIT SPACE 4,20
  8781. ** GIT - GET AN ITEM FROM A FILE.
  8782. *
  8783. * *GIT* PERFORMS A PASCAL-LIKE READ FROM A FILE INTO
  8784. * A SPECIFIED LOCATION. THIS INVOLVES MOVING THE
  8785. * CURRENT FILE POINTER VALUE INTO THE LOCATION AND
  8786. * READING THE NEXT ENTRY FROM THE FILE INTO THE POINTER.
  8787. *
  8788. * ENTRY (X0) = FET ADDRESS.
  8789. * (X5) = ITEM DESTINATION ADDRESS.
  8790. * FILE POINTER HAS DESIRED ENTRY, OR BAD VALUE
  8791. * IF THE FILE IS AT EOF.
  8792. *
  8793. * EXIT VALUE MOVED.
  8794. * EOF FLAG SET IF NEXT READ FAILS.
  8795. *
  8796. * USES X - 6.
  8797. * A - 6.
  8798. *
  8799. * MACROS MOVE, READW.
  8800.  
  8801.  
  8802. GIT SUBR ENTRY/EXIT
  8803. MOVE ITEMSIZ,X0+PTR,X5
  8804. READW X0,X0+PTR,ITEMSIZ
  8805. SX6 X1+ SET EOF FLAG APPROPRIATELY
  8806. SA6 X2+EOF
  8807. EQ GITX RETURN
  8808. MRG SPACE 4,20
  8809. ** MRG - MERGE PHASE OF MERGESORT.
  8810. *
  8811. * *MRG* IS THE LOGICAL COMPLEMENT OF ROUTINE *DTR*. *MRG*
  8812. * MERGES ALL THE RUNS DISTRIBUTED ONTO *AF* AND *BF* AND
  8813. * WRITES THEM ON *CF*.
  8814. *
  8815. * ENTRY *AF* AND *BF* HAVE ITEM RUNS.
  8816. *
  8817. * EXIT *AF* AND *BF* ARE EMPTY.
  8818. * *CF* CONTAINS ALL RUNS.
  8819. * NUMBER OF RUNS IS APPROXIMATELY CUT IN HALF.
  8820. *
  8821. * USES X - 1, 2, 3, 6.
  8822. * A - 1, 2, 3, 6.
  8823. *
  8824. * CALLS MRN.
  8825. *
  8826. * MACROS COPYRUN.
  8827.  
  8828.  
  8829. MRG SUBR ENTRY/EXIT
  8830.  
  8831. * WHILE NOT EOF(A) AND EOF(B) DO MERGERUN.
  8832.  
  8833. MRG1 SA2 AF+EOF
  8834. SA3 BF+EOF
  8835. CX2 X2
  8836. CX3 X3
  8837. IX2 X2+X3 EOF(A) OR EOF(B)
  8838. NZ X2,MRG2 IF EITHER AT EOF THEN STOP
  8839. RJ MRN MERGE ONE RUN ONTO C
  8840. SA1 NRUNS
  8841. SX6 1
  8842. IX6 X1+X6 INCREMENT COUNT OF RUNS
  8843. SA6 A1
  8844. EQ MRG1 LOOP FOR NEXT RUN TO MERGE
  8845.  
  8846. * COPY REST OF A ONTO C.
  8847.  
  8848. MRG2 SA2 AF+EOF
  8849. NZ X2,MRG3 IF EOF(A) THEN STOP
  8850. COPYRUN AF,CF
  8851. SA1 NRUNS
  8852. SX6 1
  8853. IX6 X1+X6 INCREMENT COUNT OF RUNS
  8854. SA6 A1
  8855. EQ MRG2 LOOP FOR NEXT RUN TO COPY
  8856.  
  8857. * COPY REST OF B ONTO C.
  8858.  
  8859. MRG3 SA3 BF+EOF
  8860. NZ X3,MRGX IF EOF(B) THEN RETURN
  8861. COPYRUN BF,CF
  8862. SA1 NRUNS INCREMENT COUNT OF RUNS
  8863. SX6 1
  8864. IX6 X1+X6
  8865. SA6 A1
  8866. EQ MRG3 LOOP FOR NEXT RUN TO COPY
  8867. MRN SPACE 4,15
  8868. ** MRN - MERGE ONE RUN FROM A AND B ONTO C.
  8869. *
  8870. * ENTRY AT LEAST ONE RUN IS ON *AF* AND ON *BF*.
  8871. *
  8872. * EXIT ONE FEWER RUN ON *AF* AND *BF*.
  8873. * ONE MORE RUN ON *CF*.
  8874. *
  8875. * USES X - 1, 3, 4.
  8876. * A - 1, 3, 4.
  8877. *
  8878. * MACROS COPITEM, COPYRUN.
  8879.  
  8880.  
  8881. MRN SUBR ENTRY/EXIT
  8882.  
  8883. * REPEAT COPYING ITEMS UNTIL END-OF-RUN.
  8884.  
  8885. MRN1 SA3 AF+PTR
  8886. SA4 BF+PTR
  8887. BX1 X3-X4
  8888. IX3 X4-X3
  8889. PL X1,MRN3 IF SAME SIGN (NO OVERFLOW POSSIBLE)
  8890. NG X4,MRN4 IF A.KEY .LT. B.KEY
  8891.  
  8892. * A.KEY .GT. B.KEY.
  8893.  
  8894. MRN2 COPITEM BF,CF
  8895. SA1 EORUN
  8896. ZR X1,MRN1 IF NOT END OF RUN ON B
  8897. COPYRUN AF,CF
  8898. EQ MRNX RETURN
  8899.  
  8900. MRN3 NG X3,MRN2 IF A.KEY .GT. B.KEY
  8901.  
  8902. * A.KEY .LE. B.KEY.
  8903.  
  8904. MRN4 COPITEM AF,CF
  8905. SA1 EORUN
  8906. ZR X1,MRN1 IF NOT END OF RUN ON A
  8907. COPYRUN BF,CF
  8908. EQ MRNX RETURN
  8909. PIT SPACE 4,10
  8910. ** PIT - WRITE AN ITEM TO A FILE.
  8911. *
  8912. * ENTRY (X2) = FET ADDRESS.
  8913. * (X5) = ADDRESS OF ITEM TO WRITE.
  8914. *
  8915. * MACROS WRITEW.
  8916.  
  8917.  
  8918. PIT SUBR ENTRY/EXIT
  8919. WRITEW X2,X5,ITEMSIZ
  8920. EQ PITX RETURN
  8921. RST SPACE 4,15
  8922. ** RST - REWIND FILE AND PREPARE FOR READING.
  8923. *
  8924. * *RST* REWINDS THE SPECIFIED FILE AND READS THE FIRST
  8925. * ENTRY INTO THE FILE-S POINTER.
  8926. *
  8927. * ENTRY (X2) = FET ADDRESS.
  8928. *
  8929. * EXIT FILE REWOUND AND PARTIALLY READ
  8930. * EOF FLAG SET IF FILE IS EMPTY.
  8931. *
  8932. * USES X - 6.
  8933. * A - 6.
  8934. *
  8935. * MACROS READ, READW, REWIND.
  8936.  
  8937.  
  8938. RST SUBR ENTRY/EXIT
  8939. REWIND X2,R
  8940. READ X2,R
  8941. READW X2,X2+PTR,ITEMSIZ
  8942. SX6 X1+ NON-ZERO IF READW HIT EOR/EOF/EOI
  8943. SA6 X2+EOF
  8944. EQ RSTX RETURN
  8945. RWR SPACE 4,10
  8946. ** RWR - REWIND FILE AND PREPARE FOR WRITING.
  8947. *
  8948. * ENTRY (X2) = FET ADDRESS.
  8949. *
  8950. * EXIT FILE REWOUND, EOF FLAG SET ON.
  8951. *
  8952. * USES X - 6.
  8953. * A - 6.
  8954. *
  8955. * MACROS REWIND, WRITE.
  8956.  
  8957.  
  8958. RWR SUBR ENTRY/EXIT
  8959. REWIND X2,R
  8960. WRITE X2,*
  8961. SX6 77B FLAG FILE ALWAYS EOF
  8962. SA6 X2+EOF
  8963. EQ RWRX RETURN
  8964. TITLE COMMON DECKS.
  8965. SPACE 4,10
  8966. * COMMON DECKS.
  8967.  
  8968.  
  8969. *CALL COMCARM
  8970. *CALL COMCCDD
  8971. *CALL COMCCCE
  8972. *CALL COMCCIO
  8973. *CALL COMCCOD
  8974. *CALL COMCCPM
  8975. *CALL COMCDXB
  8976. *CALL COMCLFM
  8977. *CALL COMCMVE
  8978. *CALL COMCPFM
  8979. *CALL COMCPOP
  8980. *CALL COMCRDC
  8981. *CALL COMCRDO
  8982. *CALL COMCRDS
  8983. *CALL COMCRDW
  8984. *CALL COMCSNM
  8985. *CALL COMCSYS
  8986. *CALL COMCUSB
  8987. *CALL COMCWTC
  8988. *CALL COMCWTH
  8989. *CALL COMCWTO
  8990. *CALL COMCWTS
  8991. *CALL COMCWTW
  8992. *CALL COMCZTB
  8993. TITLE FETS AND BUFFERS.
  8994. FETS SPACE 4,10
  8995. * FETS.
  8996.  
  8997.  
  8998. I BSS 0 INPUT
  8999. INPUT FILEB IBUF,IBUFL,(FET=8)
  9000.  
  9001. O BSS 0 OUTPUT
  9002. OUTPUT FILEB OBUF,OBUFL,(FET=8)
  9003.  
  9004. DB BSS 0 DATABASE
  9005. ZZZZZG0 FILEB OLDBUF,OLDBUFL,(FET=15D)
  9006.  
  9007. NUMBERS BSS 0 FILE TO HOLD TAPE NUMBERS
  9008. ZZZZZG4 FILEB DIRBUF,DIRBUFL,(FET=11D)
  9009.  
  9010. CF BSS 0 MERGE SORT FILE
  9011. ZZZZZG5 FILEB CFBUF,CFBUFL,FET=MFETSIZ
  9012. CFPTR BSSZ 6
  9013. CFEOF BSSZ 1
  9014.  
  9015. AF BSS 0 MERGE SORT SCRATCH FILE ONE
  9016. ZZZZZG8 FILEB AFBUF,AFBUFL,FET=MFETSIZ
  9017. AFPTR BSSZ 6
  9018. AFEOF BSSZ 1
  9019.  
  9020. BF BSS 0 MERGE SORT SCRATCH FILE TWO
  9021. ZZZZZG9 FILEB BFBUF,BFBUFL,FET=MFETSIZ
  9022. BFPTR BSSZ 6
  9023. BFEOF BSSZ 1
  9024.  
  9025. NEW BSS 0 PERMANENT FILE BEING PROCESSED
  9026. ZZZZZG1 FILEB NEWBUF,NEWBUFL,(FET=16D),EPR
  9027.  
  9028. TF BSS 0 TAPE FILE
  9029. TAPE FILEB TFBUF,TFBUFL,(FET=TFETSIZ)
  9030. DATA 0 WRITTEN FLAG FOR PRIMARY TAPE
  9031. DATA 0 CURRENT REEL VSN FOR PRIMARY TAPE
  9032. DATA 0 CHARACTERISTICS - DENSITY, MEDIUM, ETC
  9033. DATA 1 INITIAL REQUEST FLAG
  9034. DATA 0 RING REQUIRED IF NON-ZERO
  9035. DATA 0 MASS STORAGE FLAG
  9036. DATA 0 DUMP VSN VARIABLE
  9037. DATA 0 DUMP NAME VARIABLE
  9038. DATA 0 DUMP LFN VARIABLE
  9039. CFC DATA 0 DUMP CURRENT FILE POSITION
  9040. CRC DATA 0 DUMP CURRENT RECORD POSITION
  9041. DATA 0 DUMP CURRENT FILE NAME (RMS)
  9042.  
  9043. MF BSS 0 NEW TAPE FOR *COMPACT*
  9044. NTAPE FILEB MFBUF,MFBUFL,(FET=TFETSIZ)
  9045. DATA 0 WRITTEN FLAG FOR COMPACTED TAPE
  9046. DATA 0 CURRENT REEL VSN FOR COMPACTED TAPE
  9047. DATA 0 CHARACTERISTICS - DENSITY, MEDIUM, ETC
  9048. DATA 1 INITIAL REQUEST FLAG
  9049. DATA 0 RING REQUIRED IF NON-ZERO
  9050. DATA 0 MASS STORAGE FLAG
  9051. DATA 0 COMPACT VSN VARIABLE
  9052. DATA 0 COMPACT NAME VARIABLE
  9053. DATA 0 COMPACT LFN VARIABLE
  9054. FILENUM DATA 0 COMPACT CURRENT FILE POSITION
  9055. RECNUM DATA 0 COMPACT CURRENT RECORD POSITION
  9056. DATA 0 COMPACT CURRENT FILE NAME (RMS)
  9057.  
  9058. SF BSS 0 SCRATCH FILE FOR COPY
  9059. ZZZZZG2 FILEB SFBUF,SFBUFL,(FET=16D)
  9060.  
  9061. OPLDF BSS 0 OPLD TEMPORARY STORAGE FILE
  9062. ZZZZZG3 FILEB RLDBUF,RLDBUFL
  9063.  
  9064. UPDATES BSS 0 UPDATES FILE
  9065. ZZZZZG6 FILEB TNBUF,TNBUFL
  9066.  
  9067. CAT BSS 0 CATLIST HOLDING FILE
  9068. ZZZZZG7 FILEB CLSBUF,CLSBUFL,(FET=10D)
  9069. TITLE PRS - PRESET ROUTINES.
  9070. USE PRESET
  9071. PRS SPACE 4,20
  9072. ** PRS - PRESET PROGRAM.
  9073. *
  9074. * *PRS* CRACKS THE COMMAND LINE, CHECKS SYSTEM ORIGIN
  9075. * PRIVILEGES AND ACCORDINGLY SETS UP THE APPROPRIATE HEADINGS
  9076. * FOR OUTPUT. IN ADDITION, IT CHECKS I/O ASSIGNMENT.
  9077. *
  9078. * ENTRY NONE.
  9079. *
  9080. * EXIT NONE.
  9081. *
  9082. * USES X - ALL.
  9083. * A - ALL.
  9084. * B - 2, 3, 6, 7.
  9085. *
  9086. * CALLS ARM, DXB, POP, RSP, STF, USB, ZAP.
  9087. *
  9088. * MACROS ABORT, CLOCK, CSET, DATE, EREXIT, GETCN, GETJO,
  9089. * GETPFP, JDATE, MESSAGE, MEMORY, PDATE, READ, SETLOF,
  9090. * SYSTEM, WRITE, WRITEC.
  9091.  
  9092.  
  9093. RECLAIM SB1 1
  9094. MEMORY CM,MEMORY,R,RFL= SET/GET FL (FOR BACK LEVEL SUPPORT)
  9095. REPRIEVE RPVBLK,SETUP,233B SET REPRIEVE MASKS
  9096.  
  9097. * CRACK COMMAND LINE.
  9098.  
  9099. SB2 CCDR ADDRESS OF CONTROL CARD IMAGE
  9100. RJ USB UNPACK CONTROL CARD TO STRING BUFFER
  9101. SB6 USBB SET ADDRESS OF STRING BUFFER
  9102. RJ POP PICK OFF *RECLAIM* VERB
  9103. NG B6,PRS15 IF *POP* DETECTED AN ERROR
  9104. ZR B6,PRS1 IF *POP* FOUND A TERMINATOR
  9105. SB3 CCART SET CONTROL CARD ARGUMENT TABLE
  9106. RJ ARM PROCESS ARGUMENTS
  9107. NZ X1,PRS15 IF *ARM* DETECTED AN ERROR
  9108. PRS1 SX2 23B SET EOR STATUS IF *I=* OR *L=*
  9109. SA1 I INPUT FET
  9110. MX0 6*7
  9111. BX6 X0*X1
  9112. BX6 X2+X6 ADD BINARY AND COMPLETE BITS
  9113. SA6 A1 REPLACE IT
  9114. SA1 O OUTPUT FET
  9115. BX6 X0*X1
  9116. ZR X6,PRS2 IF *L=0*
  9117. BX6 X2+X6 MERGE BINARY AND COMPLETE BITS
  9118. SA6 A1 REPLACE IT
  9119. PRS2 SA0 I SET FET ADDRESS FOR R4 *ZAP*
  9120. SX2 I SET FET ADDRESS FOR R5 *ZAP*
  9121. SX0 USBB SET BUFFER ADDR FOR R4 *ZAP*
  9122. SA1 CCIN COMMAND LINE INPUT FLAG SET BY *ARM*
  9123. ZR X1,PRS3 IF *Z* ARGUMENT NOT GIVEN
  9124. RJ ZAP *Z* ARGUMENT PROCESSOR
  9125. PRS3 DATE DATE
  9126. CLOCK TIME
  9127. SA4 CCART SET ARGUMENT TABLE ADDRESS
  9128. SB6 TKPR KEYWORD TABLE ADDRESS
  9129. SA5 CCDR COMMAND LINE IMAGE
  9130. SB2 B0+ NO SPECIAL SKIP
  9131. RJ RSP REMOVE PASSWORD FROM COMMAND LINE
  9132. MESSAGE CCDR,0 ISSUE COMMAND LINE TO DAYFILE
  9133. PDATE CATSKL GET PACKED DATE AND TIME
  9134. MX0 -36
  9135. SA2 CATSKL
  9136. BX2 -X0*X2
  9137. SB7 FCUD
  9138. PRS3.1 SA1 CATSKL+B7
  9139. BX1 X0*X1
  9140. BX6 X1+X2
  9141. SA6 A1 STORE PACKED DATE/TIME IN PFC SKELETON
  9142. SB7 B7-1
  9143. NE B7,B1,PRS3.1 IF NOT FINISHED STORING DATE/TIME
  9144. SX6 B1+
  9145. SA6 RBPF SET BYPASS FLAG
  9146. GETCN CATSKL+FCCN SAVE CHARGE/PROJECT FOR LOCAL FILE DUMPS
  9147. SX6 B0+
  9148. SA6 RBPF CLEAR BYPASS FLAG
  9149. GETPFP OLDBUF
  9150. SA1 OLDBUF+2 SAVE USER NAME
  9151. MX0 42
  9152. BX6 X0*X1
  9153. SA6 UND
  9154. SA6 UNV
  9155. BX6 -X0*X1
  9156. SA6 CATSKL+FCUI SAVE USER INDEX FOR LOCAL FILE DUMPS
  9157. SA1 OLDBUF+1 SAVE PACK NAME
  9158. BX6 X1
  9159. SA6 HDRPN
  9160. SA1 OLDBUF SAVE FAMILY NAME
  9161. BX6 X1
  9162. SA6 FAMILY
  9163.  
  9164. * CONVERT TODAYS DATE TO PACKED JULIAN.
  9165.  
  9166. JDATE DUMPDT *DUMP* DATE
  9167. SB7 B1
  9168. MX0 30D
  9169. SA5 DUMPDT
  9170. LX5 30D
  9171. BX5 X0*X5
  9172. RJ DXB CONVERT DISPLAY TO BINARY
  9173. SA6 DUMPDT
  9174.  
  9175. * CHECK IF TMS IS ACTIVE.
  9176.  
  9177. SX6 B1+ SET BYPASS FLAG
  9178. SA6 RBPF
  9179. SYSTEM SFM,R,TMSTAT,GTSF*100B
  9180. SA2 RBPF CHECK BYPASS FLAG
  9181. BX6 X6-X6 PRESET FOR TMS NOT ACTIVE
  9182. SA6 A2 CLEAR BYPASS FLAG
  9183. SA1 TMSTAT
  9184. ZR X2,PRS3.2 IF PRE-TMS SYSTEM
  9185. MX6 1
  9186. BX6 X1*X6 TMS ACTIVE BIT
  9187. LX1 59-58
  9188. BX6 X1*X6 TMS BINARIES BIT
  9189. PRS3.2 SA6 A1 SET TMS STATUS
  9190.  
  9191. * DETERMINE JOB ORIGIN TYPE.
  9192.  
  9193. GETJO JOBORIG
  9194. SA1 JOBORIG
  9195. SX0 1 GIVE SPECIAL PERMISSION FOR SYOT
  9196. SX7 HEADER0
  9197. SX2 X1-SYOT
  9198. ZR X2,PRS7 IF SYSTEM ORIGIN THEN SET FULL LIST
  9199. SX1 X1-IAOT
  9200. NZ X1,PRS4 IF THIS JOB IS NOT INTERACTIVE
  9201. CSET NORMAL
  9202. SX6 B1+ INDICATE CHARACTER SET MODE CHANGED
  9203. SA6 RECSET
  9204.  
  9205. * CHECK FOR SPECIAL PRIVILEGES.
  9206.  
  9207. PRS4 SX7 HEADER0 HEADER LENGTH
  9208. SA1 USERDB
  9209. SX0 B1 ALLOW FULL ACCESS TO USER DATABASE
  9210. NZ X1,PRS7 IF USER DATABASE
  9211. SX0 B0 RESTRICT ACCESS TO SITE DATABASE
  9212. BX6 X6-X6
  9213. SA6 PRIVARG TERMINATE LIST OF ALLOWED ARGUMENTS
  9214. SX7 X7-3
  9215. EQ PRS8 SET ACCESS LEVEL
  9216.  
  9217. * BUILD HEADER FOR PRIVILEGED USERS.
  9218.  
  9219. PRS7 SA1 HEAD2
  9220. SX2 2R U
  9221. BX6 X1+X2
  9222. SA6 A1 SET HEADER
  9223.  
  9224. * SET ACCESS LEVEL AND HEADER SIZE.
  9225.  
  9226. PRS8 BX6 X0 FLAG FOR SPECIAL ACCESS
  9227. SA7 HLENGTH
  9228. SA6 ACCESS
  9229.  
  9230. * CHECK FOR TERMINAL FILES.
  9231.  
  9232. SA1 CCIN
  9233. NZ X1,PRS8.1 IF INPUT IS FROM COMMAND LINE
  9234. SX2 I
  9235. RJ STF CHECK FOR INPUT FILE DISPOSITION
  9236. SA6 IDT
  9237. ZR X6,PRS8.1 IF INPUT IS A TERMINAL FILE
  9238. READ I READ FIRST PART OF DISK INPUT FILE
  9239. PRS8.1 WRITE O,* PRESET WRITE FUNCTION
  9240. SX2 O CHECK OUTPUT FILE EQUIPMENT TYPE
  9241. RJ STF
  9242. SA6 ODT
  9243. MX0 42
  9244. NZ X6,PRS8.2 IF OUTPUT NOT ASSIGNED TO *TTY*
  9245.  
  9246. * REMOVE *PAGE* FROM HEADER IF *TTY* ASSIGNED.
  9247.  
  9248. SA1 OPTION 10 SPACES
  9249. BX6 X1
  9250. SA6 HEAD1.0
  9251. SETLOF LOFPTR SET LIST-OF-FILES ADDRESS
  9252. EQ PRS9 SET UP DATABASE USER NAME
  9253.  
  9254. * SET PRINT PARAMETERS IF NOT TERMINAL OUTPUT.
  9255.  
  9256. PRS8.2 GETPP OBUF,MLPP,PRSB GET PAGE LENGTH AND PRINT DENSITY
  9257. WRITEC O,PRSB SET PRINT DENSITY
  9258. WRITEC O,PRSC ISSUE INITIAL PAGE EJECT
  9259.  
  9260. * SET UP DATABASE FILE PARAMETERS.
  9261.  
  9262. PRS9 SA1 NDBPW
  9263. BX0 X1
  9264. SA1 NDBPN
  9265. BX6 X1
  9266. SA1 DEFPW
  9267. BX7 X1
  9268. SA2 DEFUN
  9269. SA3 NDBUN
  9270. SA4 DEFNAM
  9271. SA5 NDBNAM
  9272. SA1 USERDB
  9273. NZ X1,PRS10 IF USER DATABASE IS REQUESTED
  9274. SA1 ACCESS CHECK FOR PRIVILEGED ACCESS
  9275. NZ X1,PRS9.1 IF SPECIAL ACCESS ALLOWED
  9276. NZ X3,PRS15 IF *UN* PARAMETER IS USED
  9277. NZ X5,PRS15 IF *DB* PARAMETER IS USED
  9278. NZ X6,PRS15 IF *PN* PARAMETER IS USED
  9279. NZ X0,PRS15 IF *PW* PARAMETER IS USED
  9280. SA1 NDBR
  9281. NZ X1,PRS15 IF *R* PARAMETER IS USED
  9282. PRS9.1 SA1 DEFPN GET DEFAULT PACK NAME
  9283. EQ PRS10.2 CHECK IF PACK NAME SPECIFIED
  9284.  
  9285. PRS10 BX1 X2-X3
  9286. NZ X1,PRS10.1 IF DEFAULT USER NAME NOT SPECIFIED
  9287. BX1 X4-X5
  9288. ZR X1,PRS15 IF DEFAULT FILE NAME IS SPECIFIED
  9289. PRS10.1 BX7 X7-X7 CLEAR DEFAULT PASSWORD
  9290. BX2 X2-X2 CLEAR DEFAULT USER NAME
  9291. SX1 B0+ CLEAR DEFAULT PACK NAME
  9292. PRS10.2 ZR X6,PRS11 IF PACK NAME NOT SPECIFIED
  9293. SA1 NDBR GET DEVICE TYPE IF SPECIFIED
  9294. NZ X1,PRS10.3 IF DEVICE TYPE IS SPECFIED
  9295. SA1 DEFR DEFAULT DEVICE TYPE
  9296. PRS10.3 BX1 X1-X6 EXCHANGE DEVICE TYPE AND PACK NAME
  9297. BX6 X6-X1 DEVICE TYPE
  9298. BX1 X1-X6 PACK NAME
  9299. PRS11 SA6 RDT SAVE DEVICE TYPE
  9300. ZR X3,PRS12 IF USER NAME NOT SPECIFIED
  9301. SA2 UND CHECK THE CURRENT USER NAME
  9302. BX2 X2-X3
  9303. ZR X2,PRS12 IF CURRENT USER NAME IS SPECIFIED
  9304. BX2 X3
  9305. PRS12 BX6 X2
  9306. SA6 DBUN
  9307. BX6 X1 SAVE PACK NAME TO BE USED
  9308. SA6 DBPN
  9309. BX6 X4
  9310. ZR X5,PRS13 IF FILE NAME NOT SPECIFIED
  9311. BX6 X5
  9312. LX5 6
  9313. SX5 X5-1R0
  9314. NZ X5,PRS13 IF NOT DB=0
  9315. SX6 B0+
  9316. PRS13 SA6 DBNAM
  9317. ZR X0,PRS14 IF PASSWORD NOT SPECIFIED
  9318. BX7 X0
  9319. PRS14 SA7 DBPW
  9320. EQ MAIN ENTER MAIN LOOP
  9321.  
  9322. PRS15 SA4 CCART
  9323. SB6 TKPR
  9324. SA5 CCDR
  9325. SB2 B0+
  9326. RJ RSP REMOVE PASSWORD FROM CONTROL CARD
  9327. MESSAGE CCDR,0,R ISSUE CONTROL CARD TO DAYFILE
  9328. MESSAGE PRSA,3 * RECLAIM ARGUMENT ERROR.*
  9329. WRITEC O,PRSA
  9330. EQ ABT1 ABORT *RECLAIM*
  9331.  
  9332.  
  9333. PRSA DATA C* RECLAIM ARGUMENT ERROR.*
  9334. PRSB DATA 1LS PRINT DENSITY FORMAT EFFECTOR
  9335. PRSC DATA 1L1 PAGE EJECT FORMAT EFFECTOR
  9336. TITLE OPTIONS.
  9337. SPACE 4,10
  9338. * OPTION TABLES.
  9339. SPACE 4,10
  9340. * COMMAND OPTION TABLE.
  9341.  
  9342. CCART BSS COMMAND OPTION TABLE
  9343. I ARG 0,I,0,1 INPUT FILE NAME
  9344. L ARG 0,O,0,1 OUTPUT FILE NAME
  9345. Z ARG -NOEQV,CCIN,0,1 *Z* INPUT FLAG
  9346. NA ARG -NOEQV,NAP,0,1 NO ABORT ON TRIVIAL ERRORS
  9347. NH ARG -NOEQV,NHV,0,1 NO HEADER ON OUTPUT
  9348. NV ARG -NOEQV,NVV,0,1 NO VALIDATION OF DUMP FILE
  9349. T ARG 0,NUMBERS,0,1 FILE WITH VSN-S FOR UPDATE
  9350. DB ARG 0,NDBNAM,400B,1
  9351. UN ARG 0,NDBUN,0,1 OWNER OF DATABASE
  9352. PN ARG 0,NDBPN,400B,1 PACK NAME OF DATABASE
  9353. R ARG 0,NDBR,400B,1 DEVICE TYPE OF DATABASE
  9354. PW ARG 0,NDBPW,0,1 PASSWORD OF DATABASE
  9355. S ARG -SITEDB,USERDB,0,1 SITE/USER DATABASE FLAG
  9356. CON 0 ARGUMENT LIST TERMINATOR
  9357. SPACE 4,10
  9358. * TABLE OF SECURE KEYWORDS.
  9359.  
  9360. TKPR BSS 0 TABLE OF KEYWORDS TO REMOVE
  9361. DATA 0LPW PASSWORD
  9362. CON 0 END OF TABLE
  9363. SPACE 4,10
  9364. * DATABASE FILE PARAMETERS FROM COMMAND LINE.
  9365.  
  9366. NDBUN BSSZ 1 NEW DATABASE USER NAME
  9367. NDBPN BSSZ 1 NEW DATABASE PACK NAME
  9368. NDBR BSSZ 1 NEW DATABASE DEVICE TYPE
  9369. NDBNAM BSSZ 1 NEW DATABASE FILE NAME
  9370. NDBPW BSSZ 1 NEW DATABASE PASSWORD
  9371. SPACE 4,10
  9372. * DEFAULT DATABASE FILE PARAMETERS.
  9373.  
  9374. DEFUN DATA 0LSYSTEMX DEFAULT USER NAME
  9375. DEFPN DATA 0 DEFAULT PACK NAME (CURRENT PACK)
  9376. DEFR DATA 0 DEFAULT DEVICE TYPE (SYSTEM DEFAULT)
  9377. DEFNAM DATA 0LRECLDB DEFAULT FILE NAME
  9378. DEFPW DATA 0LARPASS DEFAULT PASSWORD
  9379. SPACE 4,10
  9380. * PRESET COMMON DECKS.
  9381.  
  9382.  
  9383. *CALL COMCRSP
  9384. *CALL COMCSTF
  9385. *CALL COMCZAP
  9386. SPACE 4,10
  9387. * BUFFERS.
  9388.  
  9389. USE BUFFERS
  9390.  
  9391. BEGIN BSSN RECLAIM
  9392. OBUF BSSN OBUFL OUTPUT BUFFER
  9393. DIRBUF BSSN DIRBUFL *NUMBERS*, MERGESORT BUFFER
  9394. AFBUF EQU DIRBUF REUSE DIRBUF FOR MERGESORT SCRATCH ONE
  9395. IBUF BSSN IBUFL INPUT BUFFER
  9396. OLDBUF BSSN OLDBUFL DATABASE IN/SORT1 SCRATCH BUFFER
  9397. TFBUF BSSN TFBUFL PRIMARY DUMP FILE BUFFER
  9398. MFBUF BSSN MFBUFL *COMPACT* DUMP FILE BUFFER
  9399. SFBUF EQU MFBUF REUSE MFBUF FOR LOAD FILE BUFFER
  9400. NEWBUF EQU MFBUF REUSE MFBUF FOR DATABASE OUT BUFFER
  9401. TNBUF BSSN TNBUFL *UPDATES* BUFFER
  9402. BFBUF EQU TNBUF REUSE TNBUF FOR MERGESORT SCRATCH TWO
  9403. CFBUF BSSN CFBUFL MERGESORT BUFFER
  9404. WSA BSSN WSAL WORKING STORAGE BUFFER
  9405. RLDBUF BSSN RLDBUFL *OPLDF* BUFFER
  9406. PRMITH BSSN 1 PERMIT HEADER
  9407. CATBUF BSSN TCATBFL CATLIST BUFFER
  9408. CLSBUF BSSN CLSBUFL FILE *CATLIST* BUFFER
  9409. PFTAB BSSN PFTABL+5 PERMANENT FILE NAMES TABLE
  9410. NNTAB BSSN PFTABL+5 STORAGE FOR NEW NAMES
  9411.  
  9412. * THE FOLLOWING MUST BE THE LAST STORAGE DEFINITION BECAUSE THE
  9413. * PERMIT BUFFER IS EXTENDED ON A *LOAD* BY INCREASING THE JOB
  9414. * FIELD LENGTH.
  9415.  
  9416. PRMITB BSSN PRMITBL PERMIT BUFFER
  9417. RFL= BSSN 0 SET INITIAL FIELD LENGTH
  9418. END BSSN
  9419.  
  9420.  
  9421. SDM= EQU 0 SUPPRESS SYSTEM-ISSUED DAYFILE MESSAGE
  9422. SPACE 4,10
  9423. * OVERFLOW CHECK.
  9424.  
  9425.  
  9426. USE PRESET
  9427. ERRPL *-IBUF PRESET OVERFLOWS INTO INPUT BUFFER
  9428. SPACE 4
  9429. END RECLAIM