b$ ***** DIMS *****  INITIALIZATION  A-Z \ cs' (P,"*")( (%);"DIMS" ) (P,"*")- ACT-5A TERMINAL2,P Dan's Information Management SystemU for Basic-80 and CP/M7Z originates from PIMS written by Madan L. Gupta5_ which comes from A People's Data Base System)` by Gupta and Brent Lander (1977)7d re-written by Dan Dugan, 1979, 1980, 1981, 1982$n Release 1.0 -- public domain5x makes random disk records of 128 or 255 bytes- allows 15 or 30 data fields in record),,  stack space for MBASIC 5.x A-Z ) init vars in this order for speedj""""T""SKIPPARSFSEARC then these for COMMONrNPPPPPTT""F"""" D() ( )  commands: (), ( ), ()  30 names + stop + NO SEARCHWOR( ), SEARCHFIEL( ), SKIPWOR( ), LOOKFIEL( )1NDRIVE P  init disk name strings$ (!);NDRIVE"disk system.  WARM ENTRY  A-Z \ cs"    save header    r  goto  h  reopen'      done   4  backup!    renumber<some not needed but commoned to keep places for speed$ ,,,,,,,,T,SKIPPARS,F,SEARC, ,,N,P,P,P,P,P,,,T,T,(),(),(), SEARCHWOR(),SEARCHFIEL(),SKIPWOR(),LOOKFIEL(),D(),,F.  8 NO-FILE MENU -L F  RESET here for floppy systemQ "" R NDRIVE T_S s(D()"????????.d?")""  () "There are no data files on the disk." e VT s("b:????????.d?")""  () "There are no data files on disk B." e 3V ()"Here are the data files on the disk:` D()"*.D?" e @j ();"**************** DIMS MENU *****************@t ();"Open any data file shown above ............... 1>~ ();"Install new disk ............................ 2> ();"Design structure of a new file (DCREATE) ..... 3> ();"Change number of disk drives for this session. 4> ();"Exit DIMS to Basic ........................... 9> ();"Exit DIMS to CP/M ............................ 0 ();(0,*)C (); "To continue enter a number ................... ";)v() ( ) "1"    safety for floppies "0"  "1" r "2" &  "3" D()"DCREATE" "4" 2  "9" \  ( 2 (SUB) ASK # DISKS 7< ();"Number of disks in system";NDRIVEA NDRIVE F NDRIVE <#P (SUB) INSTALL DISK NAMES Z n2d DD$(1) (2) (3) (4) (5) ' file groups%f main trans data dupe misc&g pgms pgms file file files!n 1,"M:","M:","A:","A:","M:"!x 2,"M:","M:","B:","M:","M:"! 3,"A:","A:","B:","C:","A:"! 4,"A:","A:","B:","C:","D:"     D() NDRIVE  "4" # NDRIVE ,,,,G"One disk system - data on drive A, programmes in drive M." ^-"Two disk system: B: = main data files> ()"M: = programs, backup data files, aux. data files  ^Q "Three disk system: A: = main program, transient programs, aux data files! ()"B: = main data files# ()"C: = backup data files " ^:,"Four disk system: A: = main and transient programs!6 ()"B: = main data files#@ ()"C: = backup data files!J ()"D: = aux. data files2^ ()"Hit return to continue."v()hr LOAD HEADER &|   get name & open up files \ cs   get record X parse into B$'s  ( ()() load names% x((),)"stop"  ()  &(())N  # cols8 ()"File "" is open. It has""records." EXIT TO DEDIT / ()"Waiting while DEDIT is loading." D()"DEDIT",+ (SUB) WRITE T$ AS RECORD # I  F :,&%& (,)  latter half0 #,F%: x(,)  first halfD #,FN"X (SUB) PARSE STRING b&lw(,(~))  delimiterv   ()(,,)(,)  l  (SUB) SAVE HEADERS + ()"Saving file header" ('); ""`   ()(~) Tx((),) T"stop"   -"()(~) add N at end    put rec 0  "*";-NT x put dupe head "!"$4 BACKUP makes dupe file $>  D()".DD"F H   open up .DD on 27R"Copying main file to dupe file, same numbers."\  .f u() "Copy aborted."  (p  "+";  get record I in T$8z NT x"*";  put record NR   to DEDIT,  RENUMBER COPY MAIN TO DUPE $  D()".DD"F   open 26 "Copying main file to dupe file, renumbering." N  2 u() "Renumber aborted."     get rec I in T$* () "0";   skip it> "+";NNT x"!";  put rec NR &   save header (NR)10  ERASE MAIN FILE AND COPY DUPE TO MAIN : DD "The following operation removes space from deleted records:N  "Erasing main file.X D()".D"F(b "Copying dupe to main file."l `  open both filesv  F(N) #, "&";  #, "*";  N   put header  RETURN TO DEDIT $  GENERAL ERROR ROUTINES , ` 5 j  if disk empty?   "CAN'T READ HEADER PROPERLY" / = "Out of disk space." ) 5 "FILE NOT FOUND" 8   UCV ""  () " "* ((,, ))=4 ` { (,,)( ) H #> (,,)(,,)H R ,\  (SUB) CLEAR SCREEN (TERM DEP) f ()"E"()"H";p -  (SUB) OPEN UP FILES GET NAME ""   clear change flag:  ()   goto commmand NDRIVE  * s(D()"????????.d?")"" O (s(D()"????????.d",)"" s(D()"????????.d2",)"")   # s("B:????????.d?")"" A (s("B:????????.d",)"" s("B:????????.d2",)"")  <  (); "Name of the file you want to open";  NDRIVE  ! s("????????.d?")"" ) "" s("????????.d?",)  # s("b:????????.d?")"" + "" s("b:????????.d?",) x(,)    UCverter   make UC(  TEST NAME, EXTRACT FILE TYPE   "I",,D()".D"0F F" " j  file is type 1 @   $: "BAD FILE NAME"       !$ 5  .not found. L8"I",,D()".D2"0BF F"2" j  file is type 2L 5 N  V;N "FILE NOT FOUND"     P  V "` OPEN UP FILES FOR REAL j  %t "R",,D()".D"F~ #, & "R",,D()".DD"F #,  $ (SUB) GET REC. I IN T$ "" F ,& #,F  latter half x(,). #,F  whole or first half  (SUB) SHOW FIELDS   N  () ( ();> "##";;". "x((),)" "|((),)(2<%x (SUB) PUT T1$ AS REC NR  F , (T,) #,FN x(T,) #,FN# (SUB) CLOSE DUPE FILE + F N ","Closing dupe file,"N"records. ""  ! ()(~)% x((),)"stop"  T"(N)(~)*NNN xNN" ,$h RE-OPEN AFTER DISK ERR r t (N)(~)*N