: DBASES.BAS v 1.3 - Database management program for Tandy 600 & Heath ZP-150": Copyright 1986 - David Dunn Thomas - All rights reserved: This program may NOT be submitted, published, or uploaded to other BBS, local or national, in any format without author's permission in writing. : Contact author at 2308 Chetwood Circle, #103; Timonium, MD; (301) 252-5379c : Program will be tailored to user's specifications on stipended request. : : ,:(,)(,),,BF:(,d)(,i),,BF: ,: :" D A T A B A S E M A N A G E R "::  ,:"by David Dunn Thomas":  ,!:"Copyright 1986": A :  IK: R(),I(),N$(),N(),D$(),E$(),D(),FT(): I P:S$S$" ":DA$DA$"-"::BL$(S$,,)"":U$"$$####,.##"  "DBCALLS.LIB":: '  RNUMF(H,R): Z$$():Z(Z$):# ,<,: :"Press any key ->";::" ";:  : D PH$"("(D$(),)")"(D$(),,)"-"(D$(),):D$()PH$:PH$"("(D$(),)")"(D$(),,)"-"(D$(),):D$()PH$ D DT$(D$(),)"/"(D$(),,)"/"(D$(),):D$()DT$ F  : I R: ROPEN(H,I): FGET(H,N(),I(I)): RCLOSE(H):: HP$" "H$" Section ":: ,((P(HP$))),: : HP$:: ,@:"Date: ": H : ,,: R"records in "F$: : ,  DBOPEN(F$,,H): : NF: I NF: N$(I): FGID(H,N$(I),N(I)): FGTYPE(H,N(I),FT(I))::@  QSTART(H,R())  FT(FS) QFIELD(H,R(),N(FS),M,,Q) : QFIELD(H,R(),N(FS),M,,Q$)  QEND(H,R()):DF:  J NF:D$(J)BL$  FT(J) FGET(H,N(J),D(J)) : FGET(H,N(J),D$(J)) J:: );: K NFG D K " Z ";N$(K)" ";: n K;N$(K)" ";: ()A );t :" 0 Exit"::  , : :"Selection?";::" ";: NF Z:    Z 4 : Z ZNF  : :  : I R$ I(I)Q : } : )"Item/Number"Q" not on record in "F$"; use "(")"4) Find"("):  : 4!  )"0) Equal to")"1) Not equal to"2)"2) Less than":  )"3) Greater than")"4) Less or equal"2)"5) Greater or equal"M"  )"6) Exit to Menu": , ,: :"What kind of Match?";::" ";j#  : Z 4 : :y$ J NF% FT(J) FPUT(H,N(J),D(J)) : FPUT(H,N(J),D$(J))&: RCLOSE(H):' ,,: :" D A T A B A S E M A N A G E R ":N( ,:"Your FILE section has the following available:": ): "*.DAT") , ,:"Type file desired, without extension: to Exit ";F$:D: F$"" * I (F$): (F$,I,)"." )"No extension, please ...": ) : [+ I (F$): ((F$,I,))` ((F$,I,)){ (F$,I,)(((F$,I,)) )a,r-F$F$".DAT". F$"CHECKS.DAT" :D: : 4/ F$"PHONBOOK.DAT" :D: : 40 F$"ADRESS.DAT" :D: : 41: Reserved for future .DAT@2: Reserved for future .DAT3: )"Sorry, no DATA statements for "F$"!":  :: '4H$"Database Manager: Master Menu": 5:  )"1) Add new "F$" records"-)"5) Delete "F$" records"-6:  )"2) Edit "F$" records"-)"6) Print "F$" records"m7:  )"3) Sort "F$" records"-)"7) Change database file"8:  )"4) Find "F$" records"-)"8) Exit Program"9 , ,: :"Select number:";::" ";:  : Z Z :; Z <,d,x,,,,,7<H$"Add New Records": =:  )"Enter data for each field; at any field to quit.":> IE NF? );: : " "N$(IE);)":";:: );: E$(IE)@ E$(IE)"" 4A D IE " Ten digits only: aaabbbcccc"SB D (IE IE) " Ten digits only: aaabbbcccc"C D IE " Six digits only: mmddyy"DE D F,G,HFD()(E$()):D$()E$():D$()E$():D$()E$():D()(E$()): I8GD()(E$()):D$()E$():D$()E$():D$()E$():D()(E$()): I}HD()(E$()):D( )(E$( )): IE :D$(IE)E$(IE):: II RCREATE(H): $: <dH$"Edit Files and Records": : R ::  )"No records in "F$" to edit ... "Be:  );: "Which Item/Number to change? to Exit ";Q: Q 4[f :FS:M: g I R: DF RFIND(H,I,,R(),I)h I(I)Q i : i ROPEN(H,I)j k I NFl );: : I;N$(I);)":";:: );m FT(I) D$(I) : D(I) n I^o  )"Change which field number? to Exit ";: CH}p CH RCLOSE(H): 4r  )"Enter new data for ";: : N$(CH)" :";:: " ";D$(CH)t FT(CH) D(CH)(D$(CH))v $:: )D$(CH)" recorded for "N$(CH):  : dzxH$"Sort Records": : R ::  )"No records in "F$" to sort ... ";:  : 4y:  )"In which of these fields do you wish data to be sorted? "z 8{ , :"Sorting "F$" by "N$(Z)" field ....";: DBSORT(H,,N(Z)):" -> SORTED!"::: A :: 4H$"Find Records": : R :::  )"No records in "F$" to find ...";:  : 4:  )"Which of these fields do you wish to search?"  :FSZ: N$(Z)" field selected ...": !:M$Z$:MZJ ,(: "Word/number to search for ";Q$:Q(Q$): :: );N$(); );N$(););N$();*);N$();B);N$()(,)(,),,BF: I R: DF RFIND(H,I,,R(),I) ROPEN(H,I): : RCLOSE(H):   );: "########";D();H  );: FT() D(); : D$();t );: FT() D(); : D$(); *);: FT() D(); : D$(); B);: FT() U$;D() : D$()  IR  : J2 : J2,,: S$;: J2: ,, I+  : 4H$"Delete Records": : R ::  )"No records in "F$" to delete ... ";:  : 4: );:"Which Item/Number to delete? to Exit ";Q: Q 4 :FS:M:  I R: DF RFIND(H,I,,R(),I)8 I(I)Q  : K RDELETE(H,I) )"Delete another record? [y/n] ";:  : Z$"Y" Z$"y"  : 4 H$"Print Records & Mailing Labels": : R ::  )"No records in "F$" to print ... ";:  : 4 D \ : )"Do you wish to print ALL records from "F$"? [y/n] ";  : Z$"Y" Z$"y"  : Z$"N" Z$"n"  :  FS:Q:M:  ,: S$;: ,:"Which of these fields do you wish to select?"J! :FSZ:N$(Z)" field selected as printing criteria.": !:M$Z$:MZ! ,: "Word/number for printing criteria ";Q$:Q(Q$)! :LC! );N$(); );N$(););N$();*);N$();B);N$(): );(DA$,,K):LC: PG #" I R: DF RFIND(H,I,,R(),I)L" ROPEN(H,I): : RCLOSE(H):  l" );: "########";D();"  );: FT() D(); : D$();" );: FT() D(); : D$();" *);: FT() D(); : D$();# B);: FT() U$;D() : D$()N#LCLC:PG: LC8 LC: ( ):PGe# PG IR m# Iz# ( )#  : 4#:  )"1) Mailing Labels")"2) Records Printing"4)"3) Exit to Menu";#  : Z Z  $ Z ,,4A$: )"Mailing labels for ALL addresses? [y/n]";$  : Z$"Y" Z$"y"  : Z$"N" Z$"n"  : $FS:Q:M: : $ )"Select mailing area criteria:"% );: I : I;N$(I)" ";:: :"0 Exit to Menu";::" ";>%  : Z 4 : Z Z w%  )"Select "N$(Z)" for mailing ";: Q$:Q(Q$)%M:FSZ: % I R: DF RFIND(H,I,,R(),I)% ROPEN(H,I): : RCLOSE(H)% ) D$()" "D$()& ) D$()& ) D$()4& ) D$()", "D$()" "D( )<&:D& IT&  : 4|&: )"Print ALL records? [y/n] ";&  : Z$"Y" Z$"y"  : Z$"N" Z$"n"  : &FS:Q:M: : ' )"Record selection criteria:"J' );: I : I;N$(I)" ";:: :"0 Exit to Menu";::" ";u'  : Z 4 : Z Z '  )"Select "N$(Z)" for printing ";: Q$:Q(Q$)'M:FSZ: :LC' I R: DF RFIND(H,I,,R(),I)( ROPEN(H,I): : RCLOSE(H):  I( )N$()": "D();()N$()": "D$()v( )N$()": "D$();()N$()": "D$()( )N$()": "D$();()N$()": "D$()( )N$()": "D$();()N$()": "D$()( )N$()": "D$();()N$( )": "D( ))::LCLC+) LC8 LC: ( )3) I@) ( )P)  : 4o)H$"Change Database": ): )"About to close "F$" database files ...") ,,: "Are you sure you wish to close & switch files? [Y/N] ";0*  : Z$"Y" Z$"y"  : Z$"N" Z$"n" 4 : o* DBCLOSE(H): :: );F$" file closed.":  :: * ,: S$;: , :"Closing all files ...": DBCLOSE(H): : , :"Records, files, and DBCALLS library closed.";: C ::+, ^  -+-   [+. [ "Error""in line":  : 4l+/ DBERROR(E)+0 E  :::: '+1 EB  : )"No further records.": +2 EB  +3 EB  ,4 EB  K,5"Database Call Error #"E"in line":  : 4t, 5,Number,Date,Payee,Purpose,Amount, 5,Item,Name,Number,Comments,Settings, 10,Item,Last name,First name,Company,Office Phone,Home Phone,Street,City,ST,Zip