<?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: raw data fetching in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377469#M3048</link>
    <description>&lt;P&gt;It's often a good idea to separate your formats from your INPUT statement. You can do it, but it's easier, IMO, to separate them out and then it tends to work as expected. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run a PROC IMPORT first, set GUESSINGROWS to a high number and then use/modify the code in the log as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149925"&gt;@jonty&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;“Client_ID_12_months_bill.txt” contains the 12 months credit&lt;SPAN&gt; card bill against each&lt;/SPAN&gt; client_id in&lt;SPAN&gt; single Import the data into SAS such that bill for each month is&amp;nbsp;&lt;/SPAN&gt;recorded as &lt;SPAN&gt;a separate observation and month number is also specific&lt;/SPAN&gt; (&lt;STRONG&gt;Bonus&lt;/STRONG&gt;&lt;STRONG&gt; question &lt;/STRONG&gt;&lt;SPAN&gt;– Month name instead of month number) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Import&amp;nbsp;&lt;/SPAN&gt;“Client_ID_12_months_bill(missing).txt” into SAS considering that there are churners in the data&lt;SPAN&gt; who left the company at different points of time during the year.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Data :- &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;102563 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $167.00 &amp;nbsp;$125.00 &amp;nbsp;$976.00 &amp;nbsp;$483.00 &amp;nbsp;$517.00 &amp;nbsp;$797.00 &amp;nbsp;$879.00 &amp;nbsp;$988.00 &amp;nbsp;$910.00 &amp;nbsp;$451.00 &amp;nbsp;$468.00 &amp;nbsp;$236.00&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kindly help :-&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;my code :-&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data &amp;nbsp; &amp;nbsp; &amp;nbsp;Bill_Summary;&lt;BR /&gt;infile &amp;nbsp; &amp;nbsp; &amp;nbsp;'/folders/myfolders/Jonty/Rawdata_files/Client_ID_12_months_bill.txt';&lt;BR /&gt;input &amp;nbsp; &amp;nbsp; &amp;nbsp;client_ID $ January Dollar10.2 Febuary Dollar10.2 March Dollar10.2 April Dollar10.2 May Dollar10.2 June Dollar10.2 July &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dollar10.2 August Dollar10.2 September Dollar10.2 October Dollar10.2 November Dollar10.2 December Dollar10.2;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2017 17:20:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-07-19T17:20:14Z</dc:date>
    <item>
      <title>raw data fetching</title>
      <link>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377454#M3046</link>
      <description>&lt;OL&gt;&lt;LI&gt;“Client_ID_12_months_bill.txt” contains the 12 months credit&lt;SPAN&gt; card bill against each&lt;/SPAN&gt; client_id in&lt;SPAN&gt; single Import the data into SAS such that bill for each month is&amp;nbsp;&lt;/SPAN&gt;recorded as &lt;SPAN&gt;a separate observation and month number is also specific&lt;/SPAN&gt; (&lt;STRONG&gt;Bonus&lt;/STRONG&gt;&lt;STRONG&gt; question &lt;/STRONG&gt;&lt;SPAN&gt;– Month name instead of month number) &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Import&amp;nbsp;&lt;/SPAN&gt;“Client_ID_12_months_bill(missing).txt” into SAS considering that there are churners in the data&lt;SPAN&gt; who left the company at different points of time during the year.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Data :- &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;102563 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $167.00 &amp;nbsp;$125.00 &amp;nbsp;$976.00 &amp;nbsp;$483.00 &amp;nbsp;$517.00 &amp;nbsp;$797.00 &amp;nbsp;$879.00 &amp;nbsp;$988.00 &amp;nbsp;$910.00 &amp;nbsp;$451.00 &amp;nbsp;$468.00 &amp;nbsp;$236.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly help :-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;my code :-&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data &amp;nbsp; &amp;nbsp; &amp;nbsp;Bill_Summary;&lt;BR /&gt;infile &amp;nbsp; &amp;nbsp; &amp;nbsp;'/folders/myfolders/Jonty/Rawdata_files/Client_ID_12_months_bill.txt';&lt;BR /&gt;input &amp;nbsp; &amp;nbsp; &amp;nbsp;client_ID $ January Dollar10.2 Febuary Dollar10.2 March Dollar10.2 April Dollar10.2 May Dollar10.2 June Dollar10.2 July &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dollar10.2 August Dollar10.2 September Dollar10.2 October Dollar10.2 November Dollar10.2 December Dollar10.2;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 16:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377454#M3046</guid>
      <dc:creator>jonty</dc:creator>
      <dc:date>2017-07-19T16:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: raw data fetching</title>
      <link>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377467#M3047</link>
      <description>&lt;P&gt;Answer depends upon whether you want to output records for all months or only&amp;nbsp;those with non-missing balances. The following is for the latter:&lt;/P&gt;
&lt;PRE&gt;data Bill_Summary (keep=client_ID balance month_num month_name);
  infile  '/folders/myfolders/Jonty/Rawdata_files/Client_ID_12_months_bill.txt' truncover;
  informat month1-month12 Dollar10.2;
  input      client_ID $ month1-month12;
  array months(*) month1-month12;
  do i=1 to dim(months);
    if not missing(months(i)) then do;
      balance=month(i);
      month_num=i;
      month_name=put(mdy(i,1,2017),monname.);
      output;
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 17:14:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377467#M3047</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-19T17:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: raw data fetching</title>
      <link>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377469#M3048</link>
      <description>&lt;P&gt;It's often a good idea to separate your formats from your INPUT statement. You can do it, but it's easier, IMO, to separate them out and then it tends to work as expected. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run a PROC IMPORT first, set GUESSINGROWS to a high number and then use/modify the code in the log as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149925"&gt;@jonty&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;“Client_ID_12_months_bill.txt” contains the 12 months credit&lt;SPAN&gt; card bill against each&lt;/SPAN&gt; client_id in&lt;SPAN&gt; single Import the data into SAS such that bill for each month is&amp;nbsp;&lt;/SPAN&gt;recorded as &lt;SPAN&gt;a separate observation and month number is also specific&lt;/SPAN&gt; (&lt;STRONG&gt;Bonus&lt;/STRONG&gt;&lt;STRONG&gt; question &lt;/STRONG&gt;&lt;SPAN&gt;– Month name instead of month number) &lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Import&amp;nbsp;&lt;/SPAN&gt;“Client_ID_12_months_bill(missing).txt” into SAS considering that there are churners in the data&lt;SPAN&gt; who left the company at different points of time during the year.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Data :- &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;102563 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $167.00 &amp;nbsp;$125.00 &amp;nbsp;$976.00 &amp;nbsp;$483.00 &amp;nbsp;$517.00 &amp;nbsp;$797.00 &amp;nbsp;$879.00 &amp;nbsp;$988.00 &amp;nbsp;$910.00 &amp;nbsp;$451.00 &amp;nbsp;$468.00 &amp;nbsp;$236.00&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Kindly help :-&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;my code :-&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data &amp;nbsp; &amp;nbsp; &amp;nbsp;Bill_Summary;&lt;BR /&gt;infile &amp;nbsp; &amp;nbsp; &amp;nbsp;'/folders/myfolders/Jonty/Rawdata_files/Client_ID_12_months_bill.txt';&lt;BR /&gt;input &amp;nbsp; &amp;nbsp; &amp;nbsp;client_ID $ January Dollar10.2 Febuary Dollar10.2 March Dollar10.2 April Dollar10.2 May Dollar10.2 June Dollar10.2 July &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dollar10.2 August Dollar10.2 September Dollar10.2 October Dollar10.2 November Dollar10.2 December Dollar10.2;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 17:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377469#M3048</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-19T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: raw data fetching</title>
      <link>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377482#M3050</link>
      <description>thanxx Reeza i did that with informat and formats it worked thanxx BTW</description>
      <pubDate>Wed, 19 Jul 2017 17:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/raw-data-fetching/m-p/377482#M3050</guid>
      <dc:creator>jonty</dc:creator>
      <dc:date>2017-07-19T17:47:55Z</dc:date>
    </item>
  </channel>
</rss>

