Date: Mon, 19 Apr 1999 13:25:00 +1200
Reply-To: Mark Bodt <markbodt@STSS.CO.NZ>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Mark Bodt <markbodt@STSS.CO.NZ>
Subject: Re: DOS path names
In-Reply-To: <351F014A925CD011A25A0000F802CBDB024DE903@AU-ASTRA-MAIL1.as
tra.au.astra.com>
Content-Type: text/plain; charset="us-ascii"
At 02:29 19/04/99 +0200, you wrote:
>Dear All
>
>We have an application which we use to perform checks on our data. As part
>of this process, users assign themselves a new userid. A new subdirectory is
>then created for the userid. In the code this is done using:
>
> data _null_ ;
> call system("md &dm\userarea\&user");
> run;
>
>where dm and user are previously defined macro variables.
>
>The problem we are having is that our directories have been structured
>taking advantage of the Windows environment, i.e. directory names of length
>greater than 8 characters, spaces in the names and so on. What this means
>is that when it comes time to submit the system call DOS cannot recognise
>the path that we have enterred.
>
<snip>
Jason (& Dr John)
The problem lies in the DOS command that you have in your call system
statement. If you refer to long filenames, then you must enclose them in
double quotes. For example:
%let dir="d:\mark bodt";
data _null_ ;
call system('md ' ||quote(&dir));
run;
will create a folder called d:\mark bodt
HTH
Mark
+------------------------------------------+--------------------------+
| Mark Bodt | |
| Sunken Treasure Software Systems Ltd | SAS Institute(NZ) Ltd. |
| Specialising in SAS(R) Software | Quality Partner. |
| Consultancy in the Asia / Pacific Region | |
+------------------------------------------+--------------------------+
| PO Box 9472, Marion Square, Wellington, New Zealand |
| Ph (025) 725 386 Fax +64 4 385 8670 Email: markbodt@stss.co.nz |
+---------------------------------------------------------------------+
|