<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: create a folder(Directory) for each car maker in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543771#M150333</link>
    <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;I have tried but still I got only one folder called "make" &amp;nbsp;instead of 38 folders...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; PROC SQL;
	create table bbbb  as
	select distinct Make as Make 	   
	from sashelp.cars 
	order by Make
;
QUIT;

data _null_;
NewDirectory=dcreate("sashelp.cars","/path/");
run;

Data cccc;
set bbbb;
by Make;
NewDirectory=dcreate("Make","/path/sashelp.cars");
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 17 Mar 2019 07:20:32 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2019-03-17T07:20:32Z</dc:date>
    <item>
      <title>create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543766#M150328</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to create a folder(Directory) for each car maker (SAShelp.cars data set)&lt;/P&gt;
&lt;P&gt;Name of the field &amp;nbsp;in&amp;nbsp;(SAShelp.cars data set is &amp;nbsp;"Make"&lt;/P&gt;
&lt;P&gt;What is the way to do it please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 06:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543766#M150328</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-03-17T06:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543767#M150329</link>
      <description>Sort by Make, use "by make" in a data step. On first.Make create the directory using function dcreate.</description>
      <pubDate>Sun, 17 Mar 2019 06:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543767#M150329</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-17T06:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543768#M150330</link>
      <description>&lt;P&gt;I know to create one&amp;nbsp;NewDirectory.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
NewDirectory=dcreate("RRRT1","path");
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, I dont know how to do it for multiple.&lt;/P&gt;
&lt;P&gt;Should I use macro?&lt;/P&gt;
&lt;P&gt;Can you show the code please?&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 06:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543768#M150330</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-03-17T06:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543769#M150331</link>
      <description>&lt;P&gt;Read &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;post again, thoroughly.&lt;/P&gt;
&lt;P&gt;You run a data step off your dataset, use by, and execute dcreate at the group change.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2019 07:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543769#M150331</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-17T07:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543771#M150333</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;I have tried but still I got only one folder called "make" &amp;nbsp;instead of 38 folders...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; PROC SQL;
	create table bbbb  as
	select distinct Make as Make 	   
	from sashelp.cars 
	order by Make
;
QUIT;

data _null_;
NewDirectory=dcreate("sashelp.cars","/path/");
run;

Data cccc;
set bbbb;
by Make;
NewDirectory=dcreate("Make","/path/sashelp.cars");
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Mar 2019 07:20:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543771#M150333</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-03-17T07:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543772#M150334</link>
      <description>Remove the quotes from "Make l" if you want the value in Make as directory name.</description>
      <pubDate>Sun, 17 Mar 2019 07:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543772#M150334</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-17T07:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543775#M150336</link>
      <description>Untested code - without group-processing:&lt;BR /&gt;Proc sort data=sashelp.cars out=work.make(keep=Make) nodupkey;&lt;BR /&gt;By make;&lt;BR /&gt;Run;&lt;BR /&gt;Data _null_;&lt;BR /&gt;Set Make;&lt;BR /&gt;&lt;BR /&gt;Length NewDirectory $ 200;&lt;BR /&gt;Retain NewDirectory;&lt;BR /&gt;&lt;BR /&gt;If _n_ =1 then do;&lt;BR /&gt;NewDirectory=dcreate("sashelp.cars","/path/");&lt;BR /&gt;End;&lt;BR /&gt;&lt;BR /&gt;MakeDir = dcreate(Make, NewDirectory);&lt;BR /&gt;Run;</description>
      <pubDate>Sun, 17 Mar 2019 07:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543775#M150336</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-03-17T07:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: create a folder(Directory) for each car maker</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543777#M150338</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.cars out=cars;
   by Make;
run;

data _null_;
   set cars;
   by Make;
   if first.Make then do;
      NewDirectory=dcreate(Make,"c:\");
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Mar 2019 07:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-a-folder-Directory-for-each-car-maker/m-p/543777#M150338</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-03-17T07:45:33Z</dc:date>
    </item>
  </channel>
</rss>

