Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!pt0o+ From: pt0o+@andrew.cmu.edu (Percival Tieng) Newsgroups: comp.databases Subject: Re: dBASE III+ problem Message-ID: Date: Thu, 12-Nov-87 09:56:59 EST Article-I.D.: andrew.QVaQkvy00XoIAtg0Av Posted: Thu Nov 12 09:56:59 1987 Date-Received: Sat, 14-Nov-87 19:06:08 EST Organization: Carnegie Mellon University Lines: 48 In-Reply-To: <190@brl-tbd.ARPA> I know there has been a lot of replies to this problem and I would like to toss in my hat and give my fair share... One of the solutions proposed was from E.Roepe: STORE SPACE(8) TO DBNAME @5,10 SAY "Enter Database Name" GET DBNAME READ USE &DBNAME What I would like to add is the fact that when you use the command: STORE SPACE(8) TO DBNAME you are actually limiting the input space to 8 characters. This might pose problems when you have to specify paths or even drive specifications. The same is true when you say datab='test.dbf' A better way is to assign an arbitrary length to the character variable datab. STORE SPACE(10) TO DATAB && if we allow different drive specs or even STORE SPACE(20) TO DATAB && to allow for subdirectories If you wish to assign a default as in datab = 'test.dbf': use: STORE 'test.dbf' + SPACE(12) TO DATAB space(12) to set the length of datab to 20. To store an arbritrary filename ( maybe assigned as default earlier in the program ) to a character variable ( which we want to retain as having a length of 20 ), STORE LEFT( deffilename + space(20), 20 ) TO DATAB where deffilename may be of any length. Hope this all helps...