Table of Contents

GETTASV

Table Of Contents

  • [00007] GETTASV - GET VSNS FOR TAPE ALTERNATE STORAGE.
  • [00011] GET TAPE ALTERNATE STORAGE VSN(S).
  • [00091] DAYFILE MESSAGES.
  • [00151] COMMON DECKS.
  • [00164] TABLES.
  • [00168] COMMAND ARGUMENT VARIABLES.
  • [00182] ERROR MESSAGES.
  • [00192] MAIN PROGRAM.
  • [00194] MAIN PROGRAM.
  • [00389] SUBROUTINES.
  • [00391] ABT - ABORT PROCESSING.
  • [00415] CAP - CHECK FOR ALLOWABLE PATTERNS.
  • [00478] COMMON DECKS.
  • [00491] FILE ENVIRONMENT TABLES.
  • [00509] PRS - PRESET ROUTINES.
  • [00512] PRS - PRESET PROGRAM.
  • [00647] TDEN - TABLE OF TAPE DENSITIES.
  • [00674] TATF - TABLE OF ALLOWABLE TAPE FORMATS.
  • [00690] IME - ISSUE MESSAGE IF ERROR.

Source Code

GETTASV.txt
  1. IDENT GETTASV,FWA
  2. ABS
  3. SST
  4. ENTRY GETTASV
  5. ENTRY RFL=
  6. SYSCOM B1
  7. TITLE GETTASV - GET VSNS FOR TAPE ALTERNATE STORAGE.
  8. *COMMENT GETTASV - GET TAPE ALTERNATE STORAGE VSN(S).
  9. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1993.
  10. GETTASV SPACE 4,10
  11. *** GETTASV - GET TAPE ALTERNATE STORAGE VSN(S).
  12. *
  13. * R. E. DUNBAR. 93/10/11.
  14. SPACE 4,10
  15. *** *GETTASV* IS A UTILITY TO SELECT ONE OR TWO SYSTEM VSNS FOR
  16. * USE AS TAPE ALTERNATE STORAGE (*TAS*) ARCHIVE VOLUMES IN A
  17. * TAPE MANAGEMENT SYSTEM (*TMS*) ENVIRONMENT.
  18. SPACE 4,20
  19. *** COMMAND FORMAT.
  20. *
  21. *
  22. * GETTASV(P1,P2,...,PN)
  23. *
  24. *
  25. * *PN* MAY BE ONE OF THE FOLLOWING -
  26. *
  27. * PARAMETER DESCRIPTION
  28. * --------- -----------
  29. *
  30. * SS=FILE LOCAL FILE NAME OF THE *TFSP* MACHINE-
  31. * READABLE AUDIT FILE. FILE MUST BE IN THE
  32. * FORMAT CREATED BY THE *TFSP* *MREADVS*
  33. * DIRECTIVE. THE DEFAULT LFN IS *MREADVS*.
  34. *
  35. * P=PREFIX TWO-CHARACTER ALPHANUMERIC PREFIX FOR THE
  36. * ARCHIVE VSNS. DEFAULT IS *AA*.
  37. *
  38. * N=VSNS NUMBER OF VOLUMES. THE DEFAULT IS *1*.
  39. *
  40. * N=1 ONE VOLUME IS SELECTED, WITH A VSN
  41. * IN THE RANGE XX0000-XX4095, WHERE
  42. * *XX* IS THE PREFIX SPECIFIED BY THE
  43. * *P* PARAMETER.
  44. *
  45. * N=2 TWO VOLUMES ARE SELECTED, THE FIRST
  46. * VSN IN THE RANGE XX0000-XX4095, AND
  47. * A SECOND IN THE RANGE XX5000-XX9095.
  48. * *XX* IS THE PREFIX SPECIFIED BY THE
  49. * *P* PARAMETER. THE NUMERIC PORTION
  50. * OF THE SECONDARY VSN IS EXACTLY 5000
  51. * HIGHER THAN THAT OF THE PRIMARY VSN.
  52. *
  53. * D=DENSITY DUMP TAPE DENSITY. DEFAULT IS *GE*.
  54. *
  55. * D=HD/PE/GE, SELECT 9-TRACK MAGNETIC TAPE.
  56. * D=CE, SELECT CARTRIDGE TAPE.
  57. * D=AE, SELECT ACS CARTRIDGE TAPE.
  58. *
  59. * F=FORMAT DUMP TAPE FORMAT. DEFAULT IS *I*.
  60. *
  61. * F=I - INTERNAL FORMAT.
  62. * F=LI - LONG BLOCK INTERNAL FORMAT.
  63. *
  64. * T=LFN1 DESTAGE TAPE LFN. THE DEFAULT IS *TAPE*.
  65. * THE LOCAL FILE NAME FOR THE PRIMARY TAPE
  66. * TO RECEIVE THE DESTAGED PERMANENT FILES.
  67. *
  68. * VF=LFN2 VERIFY TAPE LFN. THE DEFAULT IS *PFVER*.
  69. * THE LOCAL FILE NAME FOR THE SECONDARY
  70. * TAPE TO RECEIVE BACKUP COPIES OF THE
  71. * DESTAGED PERMANENT FILES.
  72. *
  73. * C=ALTCMD ALTERNATE COMMAND. DEFAULT IS *SETTASV*.
  74. * THE COMMAND NAME TO BE USED IN AN *EXCST*
  75. * CALL TO PASS THE TAPE DENSITY, FORMAT AND
  76. * SELECTED VSN(S) ON FOR FURTHER PROCESSING.
  77. * *ALTCMD* MUST BE A PROGRAM OR PROCEDURE ON
  78. * THE SYSTEM LIBRARY OR AVAILABLE TO THE JOB
  79. * AS A LOCAL FILE OR IN A GLOBAL LIBRARY. IT
  80. * IS EXECUTED VIA *EXCST* AS FOLLOWS.
  81. *
  82. * ALTCMD(DENSITY,FORMAT,VSN1,,LFN1)
  83. *
  84. * OR
  85. *
  86. * ALTCMD(DENSITY,FORMAT,VSN1,VSN2,LFN1,LFN2)
  87. *
  88. * THE PROGRAM OR PROCEDURE CALLED MUST BE
  89. * ABLE TO ACCEPT SIX POSITIONAL PARAMETERS
  90. * AS SHOWN IN THE ORDER SHOWN.
  91. TITLE DAYFILE MESSAGES.
  92. SPACE 4,20
  93. *** DAYFILE MESSAGES.
  94. *
  95. * * ALTERNATE COMMAND INCORRECT.* - THE ALTERNATE COMMAND
  96. * SPECIFIED WITH THE *C* PARAMETER DOES NOT MEET THE
  97. * REQUIREMENTS FOR A *NOS* COMMAND NAME. IT MUST BE
  98. * SEVEN OR FEWER ALPHANUMERIC CHARACTERS.
  99. *
  100. * * AUDIT FILE IS EMPTY OR MISPOSITIONED.* - END OF
  101. * FILE OR END OF RECORD WAS DETECTED ON THE FIRST READ
  102. * OF THE *TFSP* MACHINE-READABLE AUDIT FILE.
  103. *
  104. * * AUDIT FILE IS WRONG VERSION OR MISPOSITIONED.* - THE AUDIT
  105. * FILE FILE VERSION NUMBER DOES NOT MATCH THE VERSION
  106. * NUMBER *GETTASV* IS PREPARED TO PROCESS.
  107. *
  108. * * GETTASV ABORTED.* - *GETTASV* HAS DETECTED AN ERROR OR
  109. * THE USER HAS INITIATED AN ABORT.
  110. *
  111. * * GETTASV ARGUMENT ERROR.* - AN INCORRECT ARGUMENT WAS
  112. * DETECTED ON THE *GETTASV* COMMAND. THE ARGUMENT WAS
  113. * EITHER TOO LARGE OR NOT AN ACCEPTABLE *NOS* FORMAT.
  114. *
  115. * * GETTASV COMPLETE.* - NORMAL COMPLETION. THE REQUESTED
  116. * VOLUMES HAVE BEEN SELECTED.
  117. *
  118. * * NO PRIMARY OR SECONDARY VSNS AVAILABLE.* - *GETTASV*
  119. * FOUND NEITHER PRIMARY NOR SECONDARY VSNS AVAILABLE
  120. * WITH THE PREFIX SPECIFIED.
  121. *
  122. * * PRIMARY LFN INCORRECT.* - THE PRIMARY DESTAGE TAPE LFN
  123. * SPECIFIED WITH THE *T* PARAMETER DOES NOT MEET THE
  124. * REQUIREMENTS FOR A *NOS* LOCAL FILE NAME. IT MUST
  125. * BE SEVEN OR FEWER ALPHANUMERIC CHARACTERS.
  126. *
  127. * * PRIMARY VSN NOT AVAILABLE.* - *GETTASV* COULD NOT FIND AN
  128. * AVAILABLE PRIMARY VSN WITH THE PREFIX SPECIFIED.
  129. *
  130. * * PRIMARY/SECONDARY VSN SET NOT AVAILABLE.* - *GETTASV* FOUND
  131. * AVAILABLE PRIMARY AND SECONDARY VSNS WITH THE PREFIX
  132. * SPECIFIED, BUT NO MATCHING PAIR.
  133. *
  134. * * SECONDARY LFN INCORRECT.* - THE SECONDARY DESTAGE TAPE LFN
  135. * SPECIFIED WITH THE *VF* PARAMETER DOES NOT MEET THE
  136. * REQUIREMENTS FOR A *NOS* LOCAL FILE NAME. IT MUST
  137. * BE SEVEN OR FEWER ALPHANUMERIC CHARACTERS.
  138. *
  139. * * SECONDARY VSN NOT AVAILABLE.* - *GETTASV* COULD NOT FIND AN
  140. * AVAILABLE SECONDARY VSN WITH THE PREFIX SPECIFIED.
  141. *
  142. * * TAPE DENSITY NOT RECOGNIZED.* - THE VALUE SPECIFIED FOR THE
  143. * *D* PARAMETER DOES NOT MATCH ANY KNOWN TAPE DENSITY.
  144. *
  145. * * TAPE FORMAT NOT RECOGNIZED.* - THE VALUE SPECIFIIED FOR
  146. * THE *F* PARAMETER IS NOT ONE OF THE TAPE FORMATS
  147. * ALLOWED FOR TAPE ALTERNATE STORAGE PURPOSES.
  148. *
  149. * * VSN PREFIX INCORRECT.* - THE VALUE SPECIFIED ON THE *P*
  150. * PARAMETER IS NOT TWO ALPHANUMERIC CHARACTERS.
  151. TITLE COMMON DECKS.
  152. SPACE 4,10
  153. * COMMON DECKS.
  154.  
  155.  
  156. *CALL COMCCMD
  157. *CALL COMCMAC
  158.  
  159. * BUFFER SIZE DEFINITIONS.
  160.  
  161. OBUFL EQU 1001B OUTPUT FILE BUFFER LENGTH
  162. ABUFL EQU 1001B AUDIT FILE BUFFER LENGTH
  163. ARECL EQU 24 AUDIT FILE RECORD LENGTH
  164. TITLE TABLES.
  165. FWA SPACE 4,10
  166. ORG 110B
  167. FWA EQU * PROGRAM ORIGIN
  168. TITLE COMMAND ARGUMENT VARIABLES.
  169. * COMMAND ARGUMENT VARIABLES.
  170. ARGS SPACE 4,10
  171. ACMD DATA C*SETTASV* ALTERNATE COMMAND PARAMETER
  172. DENS DATA C*GE* DENSITY PARAMETER
  173. ERFL CON 0 ERROR FLAG IF NONZERO
  174. FRMT DATA C*I* TAPE FORMAT PARAMETER
  175. LFN1 DATA C*TAPE* PRIMARY DESTAGE TAPE LFN
  176. LFN2 DATA C*PFVER* SECONDARY DESTAGE TAPE LFN
  177. MAXV VFD 12/0,24/4L4095,24/0 HIGHEST ALLOWABLE PRIMARY VSN
  178. NVSN DATA C*1* NUMBER OF VSNS PARAMETER
  179. PRFX DATA C*AA* PREFIX PARAMETER
  180. TTYP DATA C*MTNT* *TMS* TAPE TYPE
  181. VSEC CON 0 SECONDARY VSN FOUND IF NON-ZERO
  182. TITLE ERROR MESSAGES.
  183. * ERROR MESSAGES.
  184. SPACE 4,10
  185. ERAE DATA C* AUDIT FILE IS EMPTY OR MISPOSITIONED.*
  186. ERAV DATA C* AUDIT FILE IS WRONG VERSION OR MISPOSITIONED.*
  187. ERVE DATA C* NO PRIMARY OR SECONDARY VSNS AVAILABLE.*
  188. ERVF DATA C* SECONDARY LFN INCORRECT.*
  189. ERVM DATA C* PRIMARY/SECONDARY VSN SET NOT AVAILABLE.*
  190. ERVP DATA C* PRIMARY VSN NOT AVAILABLE.*
  191. ERVS DATA C* SECONDARY VSN NOT AVAILABLE.*
  192. TITLE MAIN PROGRAM.
  193. GETTASV SPACE 4,15
  194. ** GETTASV - MAIN PROGRAM.
  195. *
  196. * CALLS CAP, PRS, SNM.
  197. *
  198. * MACROS MESSAGE, READ, READC.
  199.  
  200.  
  201. GETTASV BSS 0 ENTRY
  202. RJ PRS PRESET
  203. READ SS,R READ FIRST AUDIT RECORD
  204. READC SS,AREC,ARECL
  205. SX5 ERAE * AUDIT FILE IS EMPTY OR MISPOSITIONED.*
  206. NZ X1,ABT IF EOR/EOF/EOI ON FIRST READ
  207. SA1 AREC
  208. MX6 -6
  209. LX1 6
  210. BX6 -X6*X1
  211. SX6 X6-1R2 CHECK FOR CORRECT AUDIT FILE VERSION
  212. ZR X6,GET2 IF CORRECT VERSION
  213. SX5 ERAV * AUDIT FILE IS WRONG VERSION OR MISPOS..*
  214. EQ ABT ABORT JOB
  215.  
  216. * READ AN AUDIT RECORD.
  217.  
  218. GET1 READC SS,AREC,ARECL READ AUDIT RECORD
  219. NZ X1,GET6 IF EOR/EOF/EOI
  220.  
  221. * CHECK FOR A USER NAME ASSOCIATED WITH THIS VSN.
  222.  
  223. GET2 SA1 AREC
  224. MX0 -12
  225. SA2 A1+1
  226. BX6 -X0*X1
  227. BX2 X0*X2
  228. BX6 X2+X6
  229. SA3 =10H
  230. BX6 X3-X6
  231. NZ X6,GET1 IF ASSIGNED TO A USER
  232.  
  233. * CHECK FOR AVAILABLE, ON-SITE, CENTER-OWNED SYSTEM VSN.
  234.  
  235. SA1 AREC+18
  236. SA2 =6LVAILON
  237. BX6 X1-X2
  238. AX6 24
  239. NZ X6,GET1 IF NOT AVAILABLE OR OFF SITE
  240. SX6 X1-3RCEN
  241. NZ X6,GET1 IF NOT CENTER-OWNED TAPE
  242. SA1 AREC+22
  243. LX1 -6
  244. SX6 X1-3RYES
  245. NZ X6,GET1 IF NOT SYSTEM TAPE
  246.  
  247. * CHECK FOR NON-RESERVED TAPE.
  248.  
  249. SA2 =1LN
  250. MX0 6
  251. LX1 24
  252. BX2 X1-X2
  253. BX6 X0*X2
  254. NZ X6,GET1 IF TAPE IS RESERVED
  255.  
  256. * CHECK FOR CORRECT TAPE TYPE (AT, CT, MTNT).
  257.  
  258. LX1 -18
  259. MX0 -6
  260. BX2 -X0*X1
  261. SA1 A1+1
  262. MX0 18
  263. BX1 X0*X1
  264. BX1 X1+X2
  265. LX1 54
  266. SA2 TTYP
  267. BX6 X1-X2
  268. NZ X6,GET1 IF NOT CORRECT TAPE TYPE
  269.  
  270. * CHECK THAT *VSN* AND *PRN* MATCH.
  271.  
  272. SA1 AREC+15
  273. MX0 -6*5
  274. BX6 -X0*X1 UPPER 5 OF *VSN*
  275. SA1 A1+1
  276. MX0 6
  277. BX7 X0*X1 LOWER 1 OF *VSN*
  278. BX1 X1-X7 REMOVE UPPER CHARACTER
  279. BX6 X6+X7 MERGE UPPER 5 AND LOWER 1 OF *VSN*
  280. MX0 6*7
  281. LX6 6*5 LEFT JUSTIFY *VSN*
  282. BX5 X0*X1 ISOLATE *PRN*
  283. LX5 6 LEFT JUSTIFY *PRN*
  284. BX7 X5-X6
  285. NZ X7,GET1 IF *VSN* AND *PRN* DO NOT AGREE
  286.  
  287. * (X5) = (X6) = VSN.
  288.  
  289. SA2 PRFX
  290. BX7 X2-X6
  291. AX7 48
  292. NZ X7,GET1 IF PREFIX DOES NOT MATCH
  293. SA2 GETA PATTERN FOR PRIMARY VSN
  294. SB2 6 MUST BE 6 CHARACTERS
  295. RJ CAP CHECK FOR ALLOWED PATTERN
  296. BX5 X6 RESTORE VSN
  297. NZ X1,GET3 IF WRONG PATTERN FOR PRIMARY VSN
  298. SA1 MAXV
  299. LX6 6*6
  300. IX1 X1-X6
  301. NG X1,GET1 IF NUMERIC PORTION EXCEEDS 4095
  302. SB5 GETC POINT TO COMMAND TO BE EXECUTED
  303. SA1 NVSN
  304. ZR X1,GET5 IF ONLY ONE VSN NEEDED
  305. SA1 TVSN
  306. SX7 X1+1 INCREMENT VSN COUNT
  307. SA6 TVSN+X7 SAVE VSN IN TABLE
  308. SA7 A1
  309. MX6 0 SET TABLE TERMINATE
  310. SA6 A6+B1
  311. EQ GET1 PROCESS NEXT AUDIT RECORD
  312.  
  313. GET3 SA2 GETB PATTERN FOR SECONDARY VSN
  314. SB2 6 MUST BE 6 CHARACTERS
  315. RJ CAP CHECK FOR ALLOWED PATTERN
  316. NZ X1,GET1 IF WRONG PATTERN FOR SECONDARY VSN
  317. SA1 NVSN
  318. SX5 ERVP * PRIMARY VSN NOT AVAILABLE.*
  319. ZR X1,ABT IF PRIMARY VSN NEEDED AND NOT FOUND
  320. LX6 6*6 RIGHT JUSTIFY SECONDARY VSN
  321. SX0 5
  322. LX0 18
  323. IX0 X6-X0 PRIMARY VSN TO LOOK FOR
  324. SA2 MAXV
  325. IX2 X2-X0
  326. NG X2,GET1 IF NUMERIC PORTION EXCEEDS 9095
  327. SA6 VSEC FLAG QUALIFYING SECONDARY VSN FOUND
  328. SA1 TVSN
  329. ZR X1,ABT IF NO ENTRIES IN VSN TABLE
  330. GET4 SA1 A1+B1
  331. ZR X1,GET1 IF NO MORE ENTRIES
  332. BX7 X0-X1
  333. NZ X7,GET4 IF NO MATCH
  334.  
  335. * (X1) = PRIMARY VSN, (X6) = SECONDARY VSN.
  336.  
  337. SB2 4*6
  338. LX5 X1,B2 SAVE AND LEFT JUSTIFY PRIMARY VSN
  339. LX1 X6,B2 LEFT JUSTIFY SECONDARY VSN
  340. SB2 1R#
  341. SB5 GETD
  342. RJ SNM SET SECONDARY VSN INTO COMMAND
  343. SA1 LFN2
  344. SB2 1R>
  345. RJ SNM SET SECONDARY LFN INTO COMMAND
  346.  
  347. * (X5) = PRIMARY VSN.
  348.  
  349. GET5 SB2 1R+
  350. BX1 X5
  351. RJ SNM SET PRIMARY VSN INTO COMMAND
  352. SA1 LFN1
  353. SB2 1R<
  354. RJ SNM SET PRIMARY LFN INTO COMMAND
  355. SA1 FRMT
  356. SB2 1R&
  357. RJ SNM SET TAPE FORMAT INTO COMMAND
  358. SA1 DENS
  359. SB2 1R/
  360. RJ SNM SET TAPE DENSITY INTO COMMAND
  361. SA1 ACMD
  362. SB2 1R-
  363. RJ SNM SET COMMAND NAME INTO COMMAND
  364. MESSAGE GETE,3,R * GETTASV COMPLETE.*
  365. EXCST B5 EXECUTE CONTROL STATEMENT
  366. ENDRUN
  367.  
  368. * AUDIT FILE IS EXHAUSTED AND NO SELECTION HAS BEEN MADE.
  369. * DETERMINE WHY AND ABORT WITH APPROPRIATE ERROR MESSAGE.
  370.  
  371. GET6 SA1 NVSN
  372. SX5 ERVP * PRIMARY VSN NOT AVAILABLE.*
  373. ZR X1,ABT IF NO PRIMARY VSN FOUND
  374. SA1 TVSN
  375. SX5 ERVE * NO PRIMARY OR SECONDARY VSNS AVAILABLE.*
  376. ZR X1,ABT IF NEITHER TYPE OF VSN FOUND
  377. SA1 VSEC
  378. SX5 ERVS * SECONDARY VSN NOT AVAILABLE.*
  379. ZR X1,ABT IF NO SECONDARY VSN FOUND
  380. SX5 ERVM * PRIMARY/SECONDARY VSN SET NOT AVAILABLE*
  381. EQ ABT
  382.  
  383.  
  384. GETA VFD 18/442333B,42/0 PRIMARY VSN PATTERN
  385. GETB VFD 18/443333B,42/0 SECONDARY VSN PATTERN
  386. GETC DATA C*-------(////,&&,++++++,,<<<<<<<)*
  387. GETD DATA C*-------(////,&&,++++++,######,<<<<<<<,>>>>>>>)*
  388. GETE DATA C* GETTASV COMPLETE.*
  389. TITLE SUBROUTINES.
  390. ABT SPACE 4,10
  391. ** ABT - ABORT PROCESSING.
  392. *
  393. * ENTRY (X5) = ADDRESS OF ERROR MESSAGE.
  394. *
  395. * EXIT ALL FILES RETURNED.
  396. * ERROR MESSAGES ISSUED.
  397. * *GETTASV* ABORTED.
  398. *
  399. * MACROS ABORT, MESSAGE, WRITEC, WRITER.
  400.  
  401.  
  402. ABT BSS 0 ENTRY
  403. MESSAGE X5,,R ISSUE ERROR MESSAGE
  404. WRITEC O,X5
  405.  
  406. * ENTER HERE FROM PRESET IF ERRORS DETECTED.
  407.  
  408. ABT1 WRITER OUTPUT,R
  409. MESSAGE ABTA,,R * GETTASV ABORTED.*
  410. ABORT ABORT
  411.  
  412.  
  413. ABTA DATA C* GETTASV ABORTED.*
  414. CAP SPACE 4,30
  415. ** CAP - CHECK FOR ALLOWABLE PATTERNS.
  416. *
  417. * CHECK PARAMETERS FOR ALLOWABLE CHARACTER PATTERNS.
  418. *
  419. * ENTRY (X5) = PARAMETER, LEFT JUSTIFIED ZERO FILLED.
  420. * (X2) = PATTERN, LEFT JUSTIFIED ZERO FILLED. PATTERN
  421. * CONSISTS OF ONE OCTAL DIGIT FOR EACH CHARACTER
  422. * POSITION OF THE PARAMETER. EACH OCTAL DIGIT
  423. * INDICATES THE CHARACTERS THAT ARE VALID FOR
  424. * THAT CHARACTER POSITION, AS FOLLOWS.
  425. *
  426. * 0 - ANY CHARACTER.
  427. * 1 - CHARACTERS A THROUGH Z.
  428. * 2 - DIGITS 0 THROUGH 4.
  429. * 3 - DIGITS 0 THROUGH 9.
  430. * 4 - CHARACTERS A THROUGH Z, DIGITS 0 THROUGH 9.
  431. * 5 - NO CHARACTER IS VALID.
  432. *
  433. * (B2) = MINIMUM NUMBER OF 6-BIT CHARACTERS.
  434. *
  435. * EXIT (X1) = 0 IF PARAMETER MATCHES PATTERN.
  436. * (X1) .NE. 0 IF PARAMETER DOES NOT MATCH PATTERN.
  437. *
  438. * USES X - 1, 2, 4, 5.
  439. * A - 1.
  440. * B - 2, 3, 4.
  441.  
  442.  
  443. CAP3 SX1 B2+ CHECK MINIMUM CHARACTER COUNT
  444.  
  445.  
  446. CAP SUBR ENTRY/EXIT
  447. CAP1 LX5 6
  448. MX1 -6
  449. BX1 -X1*X5
  450. BX5 X5-X1
  451. ZR X1,CAP3 IF ALL CHARACTERS CHECKED
  452. SB4 X1
  453. LX2 3
  454. SX1 X2 INDEX TO PATTERNS
  455. ZR X1,CAP2 IF NO RESTRICTION ON THIS CHARACTER
  456. BX2 X2-X1
  457. LX1 2 PATTERN INDEX * 4
  458. SB3 X1
  459. LX1 1 PATTERN INDEX * 8
  460. SB3 B3+X1 PATTERN INDEX * 12
  461. SA1 CAPA
  462. MX4 -6
  463. LX1 X1,B3
  464. BX4 -X4*X1
  465. SB3 X4
  466. GT B4,B3,CAPX IF CHARACTER OUT OF RANGE
  467. MX4 -6
  468. LX1 -6
  469. BX4 -X4*X1
  470. SB3 X4
  471. LT B4,B3,CAPX IF CHARACTER OUT OF RANGE
  472. CAP2 ZR B2,CAP1 IF MINIMUM SIZE REACHED
  473. SB2 B2-1
  474. EQ CAP1 CONTINUE WITH NEXT CHARACTER
  475.  
  476.  
  477. CAPA VFD 12/2LAZ,12/2L04,12/2L09,12/2LA9,12/2L10
  478. TITLE COMMON DECKS.
  479. SPACE 4,10
  480. * COMMON DECKS.
  481.  
  482.  
  483. *CALL COMCCIO
  484. *CALL COMCCPM
  485. *CALL COMCRDC
  486. *CALL COMCRDW
  487. *CALL COMCSNM
  488. *CALL COMCSYS
  489. *CALL COMCWTC
  490. *CALL COMCWTW
  491. TITLE FILE ENVIRONMENT TABLES.
  492. FETS SPACE 4,10
  493. * FETS.
  494.  
  495.  
  496. O BSS 0 OUTPUT FILE
  497. OUTPUT FILEB OBUF,OBUFL
  498. SS BSS 0 AUDIT FILE
  499. MREADVS FILEB ABUF,ABUFL
  500. SPACE 4,10
  501. * BUFFERS AND LARGE TABLES.
  502.  
  503. TVSN CON 0 TVSN TABLE - FIRST WORD IS COUNT
  504. AREC EQU TVSN+4098 AUDIT FILE RECORD BUFFER
  505. ABUF EQU AREC+ARECL AUDIT FILE BUFFER
  506. OBUF EQU ABUF+ABUFL OUTPUT FILE BUFFER
  507.  
  508. RFL= EQU OBUF+OBUFL SET INITIAL FIELD LENGTH
  509. TITLE PRS - PRESET ROUTINES.
  510. ORG TVSN+1
  511. PRS SPACE 4,20
  512. ** PRS - PRESET PROGRAM.
  513. *
  514. * CALLS ARG, CAP.
  515. *
  516. * MACROS MESSAGE.
  517.  
  518.  
  519. PRS SUBR ENTRY/EXIT
  520. SB1 1
  521.  
  522. * CRACK PARAMETERS FROM COMMAND.
  523.  
  524. SA1 ACTR GET NUMBER OF ARGUMENTS
  525. SB4 X1+
  526. SA4 ARGR GET FIRST ARGUMENT
  527. SB5 TCAT COMMAND ARGUMENT TABLE ADDRESS
  528. RJ ARG PROCESS ARGUMENTS
  529. SX5 PRSA * GETTASV ARGUMENT ERROR.*
  530. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  531.  
  532. * CHECK ALTERNATE COMMAND PARAMETER.
  533.  
  534. SA5 ACMD
  535. SA2 PRSC
  536. SB2 1 MUST BE AT LEAST 1 CHARACTER
  537. RJ CAP CHECK FOR ALLOWABLE PATTERN
  538. SX5 PRSD * ALTERNATE COMMAND INCORRECT.*
  539. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  540.  
  541. * CHECK PRIMARY LFN PARAMETER.
  542.  
  543. SA5 LFN1
  544. SA2 PRSC
  545. SB2 1 MUST BE AT LEAST 1 CHARACTER
  546. RJ CAP CHECK FOR ALLOWABLE PATTERN
  547. SX5 PRSI * PRIMARY LFN INCORRECT.*
  548. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  549.  
  550. * CHECK SECONDARY LFN PARAMETER.
  551.  
  552. SA5 LFN2
  553. SA2 PRSC
  554. SB2 1 MUST BE AT LEAST 1 CHARACTER
  555. RJ CAP CHECK FOR ALLOWABLE PATTERN
  556. SX5 ERVF * SECONDARY LFN INCORRECT.*
  557. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  558.  
  559. * CHECK PREFIX PARAMETER.
  560.  
  561. SA5 PRFX
  562. SA2 PRSB
  563. SB2 2 PREFIX MUST BE 2 CHARACTERS
  564. RJ CAP CHECK FOR ALLOWABLE PATTERN
  565. SX5 PRSH * VSN PREFIX INCORRECT.*
  566. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  567. SA1 PRFX COMBINE PREFIX WITH MAXIMUM DIGIT VALUE
  568. SA2 MAXV
  569. BX6 X1+X2
  570. SA6 A2+
  571.  
  572. * CHECK DENSITY PARAMETER.
  573.  
  574. MX0 30
  575. SA1 DENS
  576. SA2 TDEN
  577. PRS1 BX6 X1-X2
  578. SA2 A2+1
  579. BX7 X0*X6
  580. ZR X7,PRS2 IF CORRECT DENSITY
  581. NZ X2,PRS1 IF MORE DENSITIES TO CHECK
  582. SX1 B1+ FORCE ERROR INDICATION
  583. SX5 PRSE * TAPE DENSITY NOT RECOGNIZED.*
  584. RJ IME ISSUE MESSAGE FOR ERROR
  585.  
  586. PRS2 LX6 30
  587. SA6 TTYP SAVE *TMS* TAPE TYPE
  588.  
  589. * CHECK TAPE FORMAT PARAMETER.
  590.  
  591. SA1 FRMT VALIDATE TAPE FORMAT
  592. SA2 TATF
  593. PRS3 BX6 X1-X2
  594. SA2 A2+1
  595. BX7 X0*X6
  596. ZR X7,PRS4 IF CORRECT FORMAT
  597. NZ X2,PRS3 IF MORE FORMATS TO CHECK
  598. SX1 B1+ FORCE ERROR INDICATION
  599. SX5 PRSF * TAPE FORMAT NOT RECOGNIZED.*
  600. RJ IME ISSUE MESSAGE FOR ERROR
  601.  
  602. * CHECK AND CONVERT NUMBER OF VSNS PARAMETER.
  603.  
  604. PRS4 SA1 NVSN
  605. SX2 1R1
  606. LX1 6
  607. IX6 X1-X2
  608. SX1 X6-1
  609. SA6 NVSN STORE CONVERTED *NV* PARAMETER
  610. ZR X6,PRS5 IF NV=1
  611. SX5 PRSG * NUMBER OF VOLUMES MUST BE 1 OR 2.*
  612. RJ IME ISSUE MESSAGE IF ERROR ((X1).NE.0)
  613.  
  614. * SEE IF ANY PARAMETER ERRORS OCCURRED.
  615.  
  616. PRS5 SA1 ERFL
  617. ZR X1,PRSX IF NO ERRORS
  618. EQ ABT1 ABORT
  619.  
  620.  
  621. PRSA DATA C* GETTASV ARGUMENT ERROR.*
  622. PRSB VFD 6/44B,24/55555555B,30/0 PREFIX VALIDATION MASK
  623. PRSC VFD 21/4444444B,9/555B,30/0 COMMAND/LFN VALIDATION MASK
  624.  
  625. * PRESET ERROR MESSAGES.
  626.  
  627. PRSD DATA C* ALTERNATE COMMAND INCORRECT.*
  628. PRSE DATA C* TAPE DENSITY NOT RECOGNIZED.*
  629. PRSF DATA C* TAPE FORMAT NOT RECOGNIZED.*
  630. PRSG DATA C* NUMBER OF VOLUMES MUST BE 1 OR 2.*
  631. PRSH DATA C* VSN PREFIX INCORRECT.*
  632. PRSI DATA C* PRIMARY LFN INCORRECT.*
  633. TCAT SPACE 4,10
  634. * COMMAND ARGUMENT TABLE.
  635.  
  636. TCAT BSS 0 COMMAND ARGUMENT TABLE
  637. SS ARG SS,SS AUDIT FILE NAME
  638. P ARG PRFX,PRFX PREFIX CHARACTERS
  639. N ARG NVSN,NVSN NUMBER OF VSNS
  640. D ARG DENS,DENS TAPE DENSITY
  641. F ARG FRMT,FRMT TAPE FORMAT
  642. T ARG LFN1,LFN1 PRIMARY TAPE LFN
  643. VF ARG LFN2,LFN2 SECONDARY TAPE LFN
  644. C ARG ACMD,ACMD ALTERNATE COMMAND
  645. CON 0 ARGUMENT LIST TERMINATOR
  646. TDEN SPACE 4,15
  647. ** TDEN - TABLE OF TAPE DENSITIES.
  648. *
  649. * *TDEN* CONTAINS THE TAPE DENSITIES RECOGNIZED BY *GETTASV*
  650. * AND THE CORRESPONDING *TMS* TAPE TYPES.
  651. *
  652. *T 30/ DEN, 30/ TTYP
  653. *
  654. * DEN THE DISPLAY CODE SYMBOL FOR THE DENSITY.
  655. * TTYP THE DISPLAY CODE SYMBOL FOR THE *TMS* TAPE TYPE.
  656.  
  657.  
  658. TDEN BSS 0 TABLE OF TAPE DENSITIES VS DEVICE TYPES
  659. VFD 30/2LLO,30/4LMTNT
  660. VFD 30/2LHI,30/4LMTNT
  661. VFD 30/2LHY,30/4LMTNT
  662. VFD 30/2LHD,30/4LMTNT
  663. VFD 30/2LPE,30/4LMTNT
  664. VFD 30/2LGE,30/4LMTNT
  665. VFD 30/2LCE,30/4LCT
  666. VFD 30/2LAE,30/4LAT
  667. VFD 30/3L200,30/4LMTNT
  668. VFD 30/3L556,30/4LMTNT
  669. VFD 30/3L800,30/4LMTNT
  670. VFD 30/4L1600,30/4LMTNT
  671. VFD 30/4L6250,30/4LMTNT
  672. CON 0
  673. TATF SPACE 4,15
  674. ** TATF - TABLE OF ALLOWABLE TAPE FORMATS.
  675. *
  676. * *TATF* CONTAINS THE TAPE FORMATS ALLOWED BY *GETTASV*.
  677. *
  678. *T 30/ FMT, 30/ 0
  679. *
  680. * FMT THE DISPLAY CODE TAPE FORMAT.
  681.  
  682.  
  683. TATF BSS 0 TABLE OF ALLOWABLE TAPE FORMATS
  684. VFD 30/1LI,30/0
  685. VFD 30/2LLI,30/0
  686. CON 0
  687. SPACE 4,10
  688. * PRESET SUBROUTINES.
  689. IME SPACE 4,10
  690. ** IME - ISSUE MESSAGE IF ERROR.
  691. *
  692. * ENTRY (X1) = ERROR INDICATOR (NONZERO = ERROR).
  693. * (X5) = ADDRESS OF ERROR MESSAGE.
  694. *
  695. *
  696. * EXIT ERROR MESSAGE ISSUED IF (X1) NONZERO.
  697. * ERROR FLAG SET IF (X1) NONZERO.
  698. *
  699. * MACROS MESSAGE, WRITEC.
  700.  
  701.  
  702. IME SUBR ENTRY/EXIT
  703. ZR X1,IMEX IF NO ERROR INDICATED
  704. BX6 X1 SET ERROR FLAG
  705. SA6 ERFL
  706. MESSAGE X5,,R ISSUE ERROR MESSAGE
  707. WRITEC O,X5
  708. EQ IMEX RETURN
  709. SPACE 4,10
  710. * PRESET COMMON DECKS.
  711.  
  712.  
  713. *CALL COMCARG
  714. SPACE 4,10
  715. * OVERFLOW CHECK.
  716.  
  717.  
  718. ERRPL *-OBUF PRESET OVERFLOWS INTO OUTPUT BUFFER
  719. SPACE 4
  720. END