|
|
Pointing to a folder location
Hi,
I'm trying to let final user enter the directory location at the
beginning of the code instead of re-writing it all over the place. I
have another text file that reads into the code as well which might be
causing the problem. I've pasted a snippet below. Any insight is
appreciated.
%let folderlocation = \\abcd\My Documents\; /* this is where the user
enters the folder location*/
libname lib_x '"&folderlocation"';
libname output_x "&folderlocation\output_x";
%include "&folderlocation\data\macro01.sas" ;
%include "&folderlocation\data\macro02.sas" ;
%let variablelist= &folderlocation\input\variablelist.txt;
infile "&folderlocation\input\variables.txt";
|
|
0
|
|
|
|
Reply
|
lunacaelum (3)
|
7/22/2010 12:21:05 PM |
|
On Jul 22, 5:21=A0am, cael <lunacae...@gmail.com> wrote:
> Hi,
>
> I'm trying to let final user enter the directory location at the
> beginning of the code instead of re-writing it all over the place. I
> have another text file that reads into the code as well which might be
> causing the problem. =A0I've pasted a snippet below. Any insight is
> appreciated.
>
> %let folderlocation =3D \\abcd\My Documents\; =A0 =A0 /* this is where th=
e user
> enters the folder location*/
>
> libname lib_x '"&folderlocation"';
> libname output_x "&folderlocation\output_x";
>
> %include "&folderlocation\data\macro01.sas" ;
> %include "&folderlocation\data\macro02.sas" ;
> %let variablelist=3D &folderlocation\input\variablelist.txt;
> =A0 =A0 =A0 =A0 infile "&folderlocation\input\variables.txt";
So what's the question?
|
|
0
|
|
|
|
Reply
|
huang8012 (261)
|
7/22/2010 3:03:28 PM
|
|
You can make your code easier by pointing a FILEREF at the folder that
is storing text files like raw data or programs.
For example:
* Set folder location here ;
%let folderlocation = \\abcd\My Documents\;
* Set input variable list here ;
%let variablelist=My Vars.txt;
* Define input and output librefs and filerefs ;
libname output "&folderlocation\output_x";
libname input "&folderlocation\input" access=readonly;
filename sascode "&folderlocation\data";
filename input "&folderlocation\input";
%inc sascode(macro01);
%inc sascode("macro02.sas");
data .... ;
infile input("&variablelist") ...... ;
....
run;
|
|
0
|
|
|
|
Reply
|
Tom
|
7/23/2010 2:24:48 AM
|
|
%let folderlocation = \\abcd\My Documents\; -> ends with a backslash;
libname output_x "&folderlocation\output_x"; .> adds another
backslash
The resolved path in the libname statement will be: \\abcd\My Documents
\\output_x
-> the doubled backslash after "My Documents" will cause issues
HTH
Patrick
|
|
0
|
|
|
|
Reply
|
Patrick
|
7/23/2010 8:56:36 AM
|
|
|
3 Replies
219 Views
(page loaded in 0.268 seconds)
Similiar Articles: Create folder with SAS - comp.soft-sys.sasPointing to a folder location - comp.soft-sys.sas Create folder with SAS - comp.soft-sys.sas Pointing to a folder location - comp.soft-sys.sas Create folder with SAS ... Open Save Dialog box using Virtual Folders - comp.lang.javascript ...Hi, I have an file1.exe file stored at some physical location say C:\Test\file1.exe. I created a virtual folder say MyFolder pointing to my physical ... Windows 7 and attachments - comp.mail.eudora.ms-windowsPointing to a folder location - comp.soft-sys.sas Windows 7 and attachments - comp.mail.eudora.ms-windows >> >> I'm wondering whether the hanging POP check had to do with ... Re: Help with SAS code - Grouping character values - comp.soft-sys ...Re: Help with SAS code - Grouping character values - comp.soft-sys ... Re: SAS Online Training - comp.soft-sys.sas... soft-sys.sas Pointing to a folder location - comp ... Featureworks error after swbrowser.mdb changes, - comp.cad ...When the toolbox.ini file on a machine is altered to point towards the new folder location FeatureWorks throws an error: (FeatureWorks Add-In must be enabled ... Save File Location Error - PSP 9.01 - comp.graphics.apps.paint ...... start PSP 9.01 (Vista), I get a message "the folder ... you must fix this with file - Preferences - File Locations ... That did not fix it right away, but as some point the ... Transferring Data folder to Win7 -- no luck yet - comp.mail.eudora ...Another way to open the folder, after installation but ... via either "Run" (WindowsKey+R) or into the location bar ... the space doesn't work because Eudora is still pointing ... How to save files into a specific folder - comp.soft-sys.matlab ...[folder, baseFileName, extentions, version] = fileparts ... % At this point it's just going into the overlay ... Folders - comp.lang.javascript ... Remember location on ... Photoshop Plugins for PSP8 help - comp.graphics.apps.paint-shop ...... Instead of copying the .8bf file to PSP's plugin folder, point PSP at the folder where the original plugin was installed by going to File > Preferences > File Locations ... How to keep only 5 most recent files in certain folder - comp.unix ...... make a script that would run every couple hours and purge all files in certain folder ... Which, of course, is the whole point of using xargs(1) in the first place. Pointing to a folder location - sas - Mofeel Groupssas, Pointing to a folder location . comp.soft-sys.sas - The SAS statistics package. Two Personal Folder...pointing to the same location - Outlook BanterHello, i am using Outlook 2003. In the "All Mail Folders" section, i see TWO "Personal Folders" tree node. Both are pointing to the same same location ... 7/9/2012 11:37:08 AM
|
|
|
|
|
|
|
|
|