copies thereof & !may be provided or otherwise made available to any other & !person. No title to and ownership of the software is hereby & !transferred. & ! & !The information in this software is subject to change without & !notice and should not be construed as a commitment by Whittier & !College or the author. & ! & !Whittier College assumes no responsibility for the use or & !reliability of its software on equipment that is not supplied & !by Whittier College. Whittier College supplies no equipment. & ! & !***************************************************************& ! 12 ! & ! This program was written for internal use and has not & !been significantly modified for export. You may need to make & !changes to fit your system or needs. If you have any problems & !please contact: & ! & ! David Garland & ! Whittier College & ! Whittier CA 90601 & ! (213) 693-0771 ext 289 & ! 20 ! & ! RETRIE & ! & !A program to look at Retrieval Blockettes & ! & !See UFD.BAS or UFD.DOC for details on how the program works & ! 100 ! & !Get the account number & ! 110 PRINT "Account number"; \ & INPUTLINE PPN$ \ & PPN$ = CVT$$(PPN$,-1%) 120 IF PPN$ = "" THEN GOTO 900 130 BRACKET% = INSTR(1%,PPN$,"(") \ & IF BRACKET% = 0% & THEN PPN$ = "[" + PPN$ + "]" 200 ! & !open up and dimension the UFD; get cluster size & ! 210 OPEN PPN$ FOR INPUT AS FILE #1% 220 DIM #1%, U%(3583%,7%) & !up to 3584 blockettes of 8 words each 230 CLU% = U%(31%,0%) 300 ! & !get name of file & ! 310 INPUT "File name"; FILE$ 320 IF FILE$ = "" THEN GOTO 100 330 FILE$ = CVT$$(FILE$,32%) 400 ! & !look through name blockettes for it and process & ! 410 PTR% = FNLINK%(U%(0%,0%)) & !first word of first blockette is a link to first NB 420 IF PTR% = 0% THEN GOTO 500 !a zero pointer is end of NB's 430 TFILE$ = RAD$(U%(PTR%,1%)) + RAD$(U%(PTR%,2%)) + "." & + RAD$(U%(PTR%,3%)) 440 TFILE$ = CVT$$(TFILE$,2%) 450 IF TFILE$ = FILE$ & THEN GOSUB 2000 \ & GOTO 300 460 PTR% = FNLINK%(U%(PTR%,0%)) !get link to next NB 470 GOTO 420 500 ! & !couldn't find the file & ! 510 PRINT "Can't find a file by that name." 520 GOTO 300 900 ! & !done & ! 910 CLOSE #1% 920 GOTO 32767 2000 ! & ! & ! SUBROUTINE: Print data for current file & ! & ! 2200 ! & !find Retrieval Blockette & ! 2210 RB% = FNLINK%(U%(PTR%,7%)) 2300 ! & !print the data & ! 2310 FOR I% = 1% TO 7% 2320 DCN% = U%(RB%,I%) 2330 IF DCN% <> 0% THEN PRINT DCN% 2340 NEXT I% 2350 IF U%(RB%,0%) <> 0% & THEN RB% = FNLINK%(U%(RB%,0%)) \ & GOTO 2300 2400 ! & !to print the contents of the file: & !(1) open the disk non file structured with a record size equal & ! to the cluster size. (See DISK.DOC or SYS.DOC for how to & ! find the cluster size.) & !(2) field the buffer at the same size & !(3) for each value of DCN%, use GET #?, BLOCK DCN% to get the & ! appropriate cluster and then print it & ! 2900 RETURN 8000 ! & ! & ! FUNCTIONS & ! & ! 8010 ! & !convert link word to Blockette number & ! & !bits 9 to 11 are the cluster number. The first line gets & ! these bits and multiplies by cluster size & !bits 12 to 15 are block number. The next line gets these and & ! multiplies by 32 (number of blockettes per block) & !bits 4 to 8 are the blockette number. The last line adds & ! this. & !the other bits of the link are not relevant here & ! 8020 DEF FNLINK%(L%) = & ((( L% AND 3584%) / 512% ) * CLU% & + ( SWAP%( L% AND -4096% ) / 16% )) * 32% & + (( L% AND 496%) / 16%) 32767 END RETRIEBAS[.050021]RETRIE.BAS[.050021]   X1혀4¿