<?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: Format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252313#M56813</link>
    <description>&lt;P&gt;You just need two additional columns in your dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data details;
input start $ 1-2 label $50.;
fmtname = 'xnational';
type = 'C';
datalines;
1 AFGAN
2 MULTIPLE
3 OTHER
;
run;

proc format library=work cntlin=details;
run;

data want;
nationality = put("1",$xnational.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Feb 2016 07:28:57 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-02-25T07:28:57Z</dc:date>
    <item>
      <title>Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252308#M56812</link>
      <description>&lt;P&gt;data details;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;input start $ 1-2 label $50. ;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;datalines;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;nbsp;AFGAN&lt;/P&gt;
&lt;P&gt;2 MULTIPLE&lt;/P&gt;
&lt;P&gt;3 OTHER&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;am new to formats how can i create a macro with input dataset as parameter &amp;amp; create format from the dataset details! &amp;nbsp;help ?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252308#M56812</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-02-25T07:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252313#M56813</link>
      <description>&lt;P&gt;You just need two additional columns in your dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data details;
input start $ 1-2 label $50.;
fmtname = 'xnational';
type = 'C';
datalines;
1 AFGAN
2 MULTIPLE
3 OTHER
;
run;

proc format library=work cntlin=details;
run;

data want;
nationality = put("1",$xnational.);
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252313#M56813</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-25T07:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252315#M56814</link>
      <description>can i code this in a macro &amp;amp; how can i test it for all values in the details dataset?</description>
      <pubDate>Thu, 25 Feb 2016 07:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252315#M56814</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-02-25T07:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252317#M56815</link>
      <description>&lt;P&gt;No need for Macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data details;                                                                                                                             
   input start $ 1-2 label $50. ;
   fmtname='fmt'; 
   type='n';                                                                                        
   datalines;   
1 AFGAN
2 MULTIPLE
3 OTHER
;
RUN;
proc format cntlin=details;run;

data _NULL_;
 test=1; fmt=put(test,fmt.); putlog test= fmt=;
 test=2; fmt=put(test,fmt.); putlog test= fmt=;
 test=4; fmt=put(test,fmt.); putlog test= fmt=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252317#M56815</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-25T07:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252320#M56816</link>
      <description>@ xiabut the data is huge so need a macro %macro fmt(inds=);</description>
      <pubDate>Thu, 25 Feb 2016 07:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252320#M56816</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-02-25T07:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252321#M56817</link>
      <description>&lt;P&gt;No matter how big a dataset is, the code stays the same. NO need for a macro.&lt;/P&gt;
&lt;P&gt;Unless you have other requirements that you did not mention.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252321#M56817</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-25T07:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252322#M56818</link>
      <description>ok let me rephrase %macro fmt(inds=); is my requirement to do the code.</description>
      <pubDate>Thu, 25 Feb 2016 07:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252322#M56818</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-02-25T07:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252323#M56819</link>
      <description>&lt;P&gt;What is the inds parameter in the macro? The dataset that contains the layout of the format, or the dataset that the format should be applied on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252323#M56819</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-25T07:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252324#M56820</link>
      <description>DS that the format should be applied on?</description>
      <pubDate>Thu, 25 Feb 2016 07:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252324#M56820</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2016-02-25T07:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252325#M56821</link>
      <description>&lt;P&gt;Then you need more parameters. Which column(s) should which format be applied to?&lt;/P&gt;
&lt;P&gt;In the end you may find that writing a macro that solves all cases will be more effort than simply writing the format assignments by hand.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252325#M56821</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-25T07:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252351#M56824</link>
      <description>&lt;P&gt;Are you asking if you can use the FORMAT as a source for valid values for data cleaning?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 12:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252351#M56824</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-02-25T12:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252383#M56825</link>
      <description>&lt;P&gt;Unfortunately, you have a difficult task.&amp;nbsp; You will need to go back to the person who gave you the requirements and tell them that they have no idea what they are talking about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look at output data sets based on a format, there are roughly 20 variables.&amp;nbsp; That means you will need roughly 20 parameters on such a macro, depending on which features of a format you would like to utilize.&amp;nbsp; There is no way that a single parameter can do that.&amp;nbsp; If you can narrow down the features that are needed, you can reduce the number of parameters.&amp;nbsp; But you have to start with a list of features.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 14:48:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Format/m-p/252383#M56825</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-02-25T14:48:13Z</dc:date>
    </item>
  </channel>
</rss>

