Date: Wed, 10 Jul 2002 13:27:03 -0700
Reply-To: Doug <queanbeyan@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Doug <queanbeyan@HOTMAIL.COM>
Subject: Re: assigning a libname to a directory
Content-Type: text/plain; charset=ISO-8859-1
What I came up with was to do ad 'x dir/b/l/b c:\strip\ >dir.txt';
and then to read in the dir.txt file, output to a dirtxt.dat file with
the tidied up result, and then to populate a list box with the info in
the dirtxt.dat file. I will try your suggestions as it saves a fair
bit of code as well as looks less prone to error.
Ace <firstname.lastname@example.org> wrote in message news:<email@example.com>...
> On 10 Jul 2002 02:47:15 -0700, firstname.lastname@example.org (Doug) wrote:
> >I have a frame that has a pushbutton (libnew) for a user to click to
> >select a directory to which a library should be mapped, however the
> >following doesn't do quite what I want...
> > call execcmdi('libassign');
> > lib1._repopulate();
> > strip=lblib1.selecteditem;
> >This only brings up the libassign thing - and the user would need to
> >key in the libname as well as map to their directory. I would like to
> >have libassign (or something like it) to simply ask for the path to
> >the directory for the the strip library and once selected to get SAS
> >to map the strip library to that directory. But I am unable to find a
> >way to do that at the moment.
> There's a number of alternatives which could be used - I'd suggest
> using the filedialog function to prompt for the directory path,
> something like:
> rc = filedialog('library',path) ;
> Then the libname function to assign it to a name of your choice:
> rc = libname('YOURLIB',path) ;