<?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: Using defined formats with sas gpaths in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496901#M16981</link>
    <description>&lt;P&gt;Thanks a lot for that&lt;/P&gt;</description>
    <pubDate>Wed, 19 Sep 2018 11:31:46 GMT</pubDate>
    <dc:creator>Anita_n</dc:creator>
    <dc:date>2018-09-19T11:31:46Z</dc:date>
    <item>
      <title>Using defined formats with sas gpaths</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496829#M16976</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have defined a proc format&amp;nbsp; and a macro which looks for example like below. I want myfolder&amp;nbsp; on my gpath to be replaced with the defined formats. For example format &amp;amp;myfolder&amp;nbsp; $folder.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library = ft;
value $folder
        'foldernameA'= 'foldername A containing books'
        'foldernameB'= 'foldernameB containing pencils'
;
run;



%macro gdesign (myfie, myfolder);
&lt;BR /&gt;
***********some sas codes*****************;

ods listing gpath= "C:\graphs\&amp;amp;myfolder ";

***********some sas codes*****************;

%mend gdesign;&lt;BR /&gt;&lt;BR /&gt;%gdesign(folder1,foldernameA);&lt;BR /&gt;%gdesign(folder1, foldernameB);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I place this on the gpath ( like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing gpath= "C:\graphs\format &amp;amp;myfolder $folder. ";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;) I get an error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to do that?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 06:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496829#M16976</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-09-19T06:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using defined formats with sas gpaths</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496839#M16977</link>
      <description>&lt;P&gt;That is not really the place for formats, formats are applied to Data in Datasets.&amp;nbsp; You could fool it by using combinations of sysfunc and functins, but there really is no need.&amp;nbsp; You would use macro to do this kind of find/replace e.g (and you need to supply a concrete example of input/output for exact code):&lt;/P&gt;
&lt;PRE&gt;%gdesign(folder1,foldername A containing books);
%gdesign(folder1,foldername B containing pencils);&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Sep 2018 07:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496839#M16977</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-19T07:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using defined formats with sas gpaths</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496888#M16978</link>
      <description>&lt;P&gt;Thanks this worked fine. The only problem I still have is that . I need to use this in many macros,&amp;nbsp; that means I have to type in this long name always. I wish to store this in a variable so that if I call the variable it outputs foldername A contain books&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way out&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 10:52:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496888#M16978</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-09-19T10:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using defined formats with sas gpaths</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496900#M16980</link>
      <description>&lt;P&gt;Yes, instead of having it as a parameter, just put at the top of your program:&lt;/P&gt;
&lt;PRE&gt;%let fname=folder with pencils;
&lt;/PRE&gt;
&lt;P&gt;And then use &amp;amp;fname. throughout your other code, to change it, just change that one line.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 11:29:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496900#M16980</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-19T11:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using defined formats with sas gpaths</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496901#M16981</link>
      <description>&lt;P&gt;Thanks a lot for that&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 11:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-defined-formats-with-sas-gpaths/m-p/496901#M16981</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-09-19T11:31:46Z</dc:date>
    </item>
  </channel>
</rss>

