<?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: How to create informat from dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919261#M362094</link>
    <description>&lt;P&gt;Yes. If you want make a NUMERIC type informat, you need add "type='I'" .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fmt_cntlin;
     set sashelp.class( keep= name age rename=(name=start age=label));
     fmtname = "myfmt"; type='I';
run;

proc format cntlin = fmt_cntlin;
run;

data _null_;
 set sashelp.class;
 fmt=input(name,myfmt.);
 put name= age= fmt=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1709802901922.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94454i6DA8F0CB480A91BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1709802901922.png" alt="Ksharp_0-1709802901922.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 09:15:08 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-03-07T09:15:08Z</dc:date>
    <item>
      <title>How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919258#M362092</link>
      <description>&lt;P&gt;I am able to create &lt;STRONG&gt;format&lt;/STRONG&gt; from dataset with following simple step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fmt_cntlin;
     set codelist4 (keep= order term rename=(order=start term=label));
     fmtname = "myfmt";
run;

proc format cntlin = fmt_cntlin;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I am trying to create &lt;STRONG&gt;informat&lt;/STRONG&gt; with similar method. Is it possible to do so with some minor modifications? Maybe some changes in cntlin option or addition of type = 'i' statement after fmtname statement etc.?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919258#M362092</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-03-07T09:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919259#M362093</link>
      <description>&lt;P&gt;At the moment, it seems that I was able to solve this by using type = 'j' statement after fmtname statement. I will confirm it soon and will post a confirmed response here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919259#M362093</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-03-07T09:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919261#M362094</link>
      <description>&lt;P&gt;Yes. If you want make a NUMERIC type informat, you need add "type='I'" .&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fmt_cntlin;
     set sashelp.class( keep= name age rename=(name=start age=label));
     fmtname = "myfmt"; type='I';
run;

proc format cntlin = fmt_cntlin;
run;

data _null_;
 set sashelp.class;
 fmt=input(name,myfmt.);
 put name= age= fmt=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1709802901922.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94454i6DA8F0CB480A91BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1709802901922.png" alt="Ksharp_0-1709802901922.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919261#M362094</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-03-07T09:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919262#M362095</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;, many thanks!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 09:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919262#M362095</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-03-07T09:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919339#M362121</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/27897"&gt;@DrAbhijeetSafai&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;At the moment, it seems that I was able to solve this by using type = 'j' statement after fmtname statement. I will confirm it soon and will post a confirmed response here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When in doubt do a test.&lt;/P&gt;
&lt;P&gt;Make a format (or informat) of the type you want using normal VALUE or INVALUE statement. Then use CNTLOUT= option to make a dataset of the format.&amp;nbsp; Then examine the dataset and see what variables are used and what values they have.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 16:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/919339#M362121</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-07T16:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create informat from dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/953436#M372489</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Not "j" but "I" works for informat.&lt;/STRONG&gt; Many thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am replying to my own post for the purpose of documentation.&amp;nbsp; What a wonderful feeling it is to find out your own post some months back and finding answer in it next time when you search about it on the google! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 18:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-informat-from-dataset/m-p/953436#M372489</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-12-12T18:45:46Z</dc:date>
    </item>
  </channel>
</rss>

