Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50147/resdec.doc
There are no other files named resdec.doc in the archive.
			PROGRAM RESDEC
			--------------

	   RECONSTRUCTION OF A DECTAPE'S DIRECTORY
	   ---------------------------------------

	AUTHOR:   C.B. ECKHARDT
	ADDRESS:  AERONAUTICAL RESEARCH LABS
	          FISHERMENS BEND
	          VICTORIA
	          AUSTRALIA

     ############
     #   USE:   #
     ############

	RESDEC IS A PROGRAM DESIGNED TO BE USED MAINLY WHEN A DECTAPE'S
     DIRECTORY GETS OVERWRITTEN WITH GARBAGE, OR ZEROED UNINTENTIONALLY.
     IT MAY ALSO BE OF USE IF SOME BLOCKS GET OVERWRITTEN, SINCE CERTAIN
     PARTIAL FILES ARE RECOVERABLE.

     ###################
     #  WHAT IT DOES:  #
     ###################

	RESDEC RECONSTRUCTS A DECTAPE'S DIRECTORY BY READING THE LINK
     WORDS IN ALL DATA BLOCKS. FOR EACH COMPLETE FILE FOUND A NAME
     (FILE1,FILE2,...FILE22) IS ENTERED IN THE DIRECTORY BLOCK, AND THE
     REQUISITE DIRECTORY BLOCK "SLOTS" UPDATED AS REQUIRED.
	IF MORE THAN 22 COMPLETE FILES ARE FOUND, THE EXTRA ONES ARE
     OUTPUT ON TO DSK WITH THE FILE-NAMES(FILEX1,FILEX2,...).
	RESDEC ALSO ENABLES THE USER TO RECLAIM PARTIAL FILES OF THE
     FOLLOWING TWO TYPES:
	  (1)  THE FIRST N LINKED BLOCKS OF A FILE ARE FOUND, AND
	  (2)  THE LAST  N LINKED BLOCKS OF A FILE ARE FOUND.
	IN THE INITIAL RUN OF RESDEC (SEE SAMPLE TTY OUTPUT) THE USER
     IS MERELY INFORMED OF THE EXISTENCE OF ANY PARTIAL FILES. (ENTRIES
     UNDER THE HEADING "NO. OF BLOKS" GIVE THE NO. OF BLOCKS (IN OCTAL)
     ON DECTAPE.)
	BY USING THE REENTER COMMAND THE USER CAN RECLAIM ANY OF THE
     PARTIAL FILES REQUIRED. IN THE ORDER THEY ARE REQUESTED THEY WILL
     BE OUTPUT ON TO DSK WITH THE FILE-NAMES BITSF1,BITSF2,...BITSF9.

     ####################
     #  HOW TO USE IT:  #
     ####################

	[1]	MOUNT THE DECTAPE WRITE-ENABLED AND ASSIGN IT.
	     RUN RESDEC.SAV.

	[2]     WHEN THE PROGRAM HAS EXITED, A LISTING OF THE DECTAPE'S
	     DIRECTORY SHOULD BE OBTAINED . THE NO. OF BLOCKS LISTED
	     FOR THE FILE-NAMES, WHEN COMPARED TO AN OLD DIRECTORY LIST-
	     ING, SHOULD SPEED UP THE IDENTIFICATION (I.E. RENAMING) OF
	     FILE1,FILE2,ETC. CONSIDERABLY (AS COMPARED TO TYPING OUT
	     THE FIRST FEW LINES OF EACH OF FILE1,FILE2,ETC.).

	[3]	IN ORDER TO ACCESS ANY OF THE PARTIAL FILES FOUND,
	     FOLLOW THE PROCEDURE ILLUSTRATED IN THE SAMPLE TTY OUTPUT.
	     AFTER EACH REQUEST FOR A PARTIAL FILE THE MESSAGE:
	                1ST. BLOK# =
	     INDICATES THAT THE FILE HAS BEEN OUTPUT ON TO DSK AS A FILE
	     CALLED BITSF1,BITSF2,...BITSF9.
		TO EXIT TYPE ^C.
		IF THE USER WISHES TO WRITE OUT MORE THAN 9 PARTIAL
	     FILES, HE MUST RENAME OR DELETE AS MANY OF THE FILES
	     BITSF1,BITSF2,ETC. AS THOSE HE REQUIRES IN EXCESS OF 9.
	     THIS IS BECAUSE FOR EACH REQUEST IN A PARTICULAR .REE, A
	     LOOKUP IS DONE FOR THE FILE-NAMES BITSF1,BITSF2,ETC. ON
	     DSK. IF ALL 9 FILE-NAMES ARE ON DSK THE ERROR MESSAGE
	                 NOTE-3
	     WILL BE TYPED OUT.

	[4]	NO PROBLEMS SHOULD BE ENCOUNTERED IN RUNNING RESDEC
	     ON OTHER INSTALLATIONS. RESDEC.MAC IS ASSEMBLED AND
	     LOADED IN THE NORMAL FASHION, RESULTING IN A NON-REENTRANT
	     SAV VERSION. RESDEC IS A NON-SHARABLE PROGRAM.











































	#######################
	#  SAMPLE TTY OUTPUT  #
	#######################

	.R PIP

	*DSK:/X_DTA2:RESDEC.SAV

	*^C

	.RUN DSK RESDEC

	DECTAPE DRIVE NO. = 1

	PARTIAL FILES OF TYPE(1) DETECTED:
	 1ST. BLOK#   NO. OF BLOKS


	PARTIAL FILES OF TYPE(2) DETECTED:
	 1ST. BLOK#   NO. OF BLOKS
	       101        17

	EXIT
	^C

	.GET DSK RESDEC
	JOB SETUP
	^C

	.REE


	DECTAPE DRIVE NO. = 1

	1ST. BLOK# = 101

	1ST. BLOK# = ^C

	.DIR DTA1:

	231. FREE BLOCKS LEFT
	FILE1	    75  01-JAN-64
	FILE2	    09  01-JAN-64
	FILE3	    24  01-JAN-64
	FILE4	    32  01-JAN-64
	FILE5	    04  01-JAN-64
	FILE6	    04  01-JAN-64
	FILE7	    16  01-JAN-64
	FILE8	    08  01-JAN-64
	FILE9	    04  01-JAN-64
	FILE10	    06  01-JAN-64
	FILE11	    23  01-JAN-64
	FILE12	    11  01-JAN-64
	FILE13	    04  01-JAN-64
	FILE14	    04  01-JAN-64
	FILE15	    04  01-JAN-64
	FILE16	    11  01-JAN-64
	FILE17      12  01-JAN-64
	FILE18	    15  01-JAN-64
	FILE19      12  01-JAN-64
	FILE20	    04  01-JAN-64
	FILE21	    06  01-JAN-64
	FILE22	    55  01-JAN-64

	.DIR

	DIRECTORY    1000,1011 12:00  11-JAN-65

	BITSF1		 15   <055>  11-JAN-65

	TOTAL BLOCKS     15

	.

	################################
	#  PREVIOUS DECTAPE DIRECTORY  #
	################################

	.DIR DTA0:

	216. FREE BLOCKS LEFT
	ROM.MAC     11  25-DEC-64
	FRED  .MAC  15  25-NOV-64
	TOM   .MAC  04  30-NOV-64
	DICK  .MAC  12  16-OCT-64
	HARRY .MAC  19  25
	MABEL .MAC  12  17-OCT-64
	DAD   .MAC  55  04-FEB-64
	FOO   .MAC  06  25-DEC-64
	ROT   .MAC  04  13-MAR-64
	TABLE .MAC  04  27-MAY-64
	CHAIR .MAC  11  01-OCT-64
	RED   .SRC  06  04-APR-64
	BLACK .SAV  23  31-DEC-64
	BLUE  .REL  04  14-AUG-64
	WHITE .OPR  08  14-AUG-64
	GREEN .SAV  16  25-AUG-64
	YELL        04  10-NOV-64
	SCREAM.MAC  04  21-JAN-64
	ROCK  .MAC  32  19-SEP-64
	ROCK  .SAV  09  20-SEP-64
	INVERT.MAC  24  12-AUG-64
	ROT2  .DSK  75  05-JUN-64

	.

	##############
	#  MATCHING  #
	##############

	   CLEARLY SOME OF THE FILES: FILE1,FILE2,ETC. CAN BE RENAMED
	IMMEDIATELY. E.G.

	FILE1  = ROT2.DSK    ( 75 BLOCKS EACH)
	FILE2  = ROCK.SAV    ( 09 BLOCKS EACH)
	FILE3  = INVERT.MAC  ( 24 BLOCKS EACH)

	   TO SEPERATE FILES OF THE SAME SIZE, E.G. DICK.MAC AND
	MABEL.MAC, THE FIRST FEW LINES OF THE FILES, FILE17 AND FILE19,
	WOULD NEED TO BE TYPED OUT.
	##############
	#  APPENDIX  #   ERROR MESSAGES OUTPUT ON TTY
	##############   ============================

	   MESSAGE:			REASON:
	   --------			-------

	    NOTE-1		INDICATES THAT A FILE IS INFINITELY LOOPED
				INTO ITSELF. I.E.THE LINK-WORDS POINTED FROM
				BLOK(A)->BLOK(B)->BLOK(C)->BLOK(A) FOR
				EXAMPLE. AS A RESULT OF THIS LOOPING
				(ACC.3) WHICH IS USED AS A COUNTER FOR
				THE NO. OF BLOCKS IN A COMPLETE FILE
				WOULD REACH 575(DEC) WHICH IS IMPOSSIBLE.
				RESDEC SIMPLY IGNORES THE FILE ASSOCIATED
				WITH THESE BLOCKS, AND CONTINUES.

	    NOTE-2		CAN'T INIT DECTAPE.

	    NOTE-3		AS EXPLAINED ABOVE IN [3].

	    NOTE-4		THE LINK-WORDS WOULD SEEM TO INDICATE
				THAT THERE ARE AT LEAST 40(DEC) FILES ON
				THE DECTAPE(ALTHOUGH SOME WILL ONLY BE
				PARTIAL FILES).IT MUST BE VERY SCRAMBLED.
				IF THE USER WANTS TO CONTINUE ANYWAY, HE
				COULD INCREASE THE NO. OF WORDS ASSIGNED
				TO FSTFBL FROM ^D40, CHANGE THE INSTRUCT-
				IONS AT COMPAR+5,AK2+1, AND INCREASE THE
				NO. OF NAMES IN DNAMES.

	    NOTE-5		CAN'T INIT DSK.

	    NOTE-6		CAN'T DO AN ENTER ON DSK.

	    NOTE-7		RESDEC HAS RUN OUT OF DSK FILE-NAMES. THE
				USER MUST HAVE FILES OF THE NAMES FILEX1,
				FILEX2,ETC. ON HIS DSK AREA, OR HAS
				CHANGED RESDEC.MAC AFTER HAVING PREVIOUSLY
				RECEIVED THE ERROR MESSAGE, NOTE-4, AND
				NOT ADDED A SUFFICIENT NO. OF NAMES TO
				THE LIST IN DNAMES.

	-----------------------------------------------------