<?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 Modifying Data Set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Modifying-Data-Set/m-p/781814#M249180</link>
    <description>&lt;P&gt;How do I modify the Data step below to decrease the processing time by specifying the records of a specific branch instead of all branches?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA transaction; INFILE ’C:/MyRawData/BankTrans.csv’ DLM = ’,’ LRECL = 1500;&lt;BR /&gt;INPUT Branch Name Branch ID Trans ID Account Data MMDDYY8. Start Time Time8.&lt;BR /&gt;End Time Time8. Amount Balance;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 23:24:22 GMT</pubDate>
    <dc:creator>collegestudent2</dc:creator>
    <dc:date>2021-11-22T23:24:22Z</dc:date>
    <item>
      <title>Modifying Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modifying-Data-Set/m-p/781814#M249180</link>
      <description>&lt;P&gt;How do I modify the Data step below to decrease the processing time by specifying the records of a specific branch instead of all branches?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA transaction; INFILE ’C:/MyRawData/BankTrans.csv’ DLM = ’,’ LRECL = 1500;&lt;BR /&gt;INPUT Branch Name Branch ID Trans ID Account Data MMDDYY8. Start Time Time8.&lt;BR /&gt;End Time Time8. Amount Balance;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 23:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modifying-Data-Set/m-p/781814#M249180</guid>
      <dc:creator>collegestudent2</dc:creator>
      <dc:date>2021-11-22T23:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Modifying-Data-Set/m-p/781816#M249181</link>
      <description>&lt;UL&gt;
&lt;LI&gt;How big is the data set? 10-20 million of rows is very different than processing something that's a few hundred million rows.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;I don't think the code you've posted is correct or works at all, does it? I suspect things like "Branch ID" are a single field, which should then be BranchID or Branch_ID depending on your preference. You can have it named as "Branch ID" if you really want but then need to list it as 'Branch ID'n in the INPUT statement. I suspect BRANCH NAME should be a character field as well? Should it be Data or Date?&lt;/LI&gt;
&lt;LI&gt;Depending on the answer to my first question you can either just add a WHERE statement to filter it out, but it may be better to read it all once, split it by BranchID if necessary into smaller sets and go from there.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;If you need to eventually process all the data, instead I would recommend learning how to use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n06qlo77ayax2kn1xobou72cdz20.htm" target="_self"&gt;OBS= option&lt;/A&gt; to limit your data when testing and then removing it for actually running your process. You can also add an OBS= observation on the INFILE statement to process only a few records while you sort out the data step to read the data and then remove it once you're set.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA transaction; &lt;BR /&gt;INFILE 'C:/MyRawData/BankTrans.csv' DLM = ',' DSD LRECL = 1500 OBS=50;
INPUT BranchName $ BranchID $ TransID $ Account $ Date MMDDYY8. StartTime Time8.
EndTime Time8. AmountBalance;
IF BRANCHID = '12345';
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/407489"&gt;@collegestudent2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I modify the Data step below to decrease the processing time by specifying the records of a specific branch instead of all branches?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA transaction; INFILE ’C:/MyRawData/BankTrans.csv’ DLM = ’,’ LRECL = 1500;&lt;BR /&gt;INPUT Branch Name Branch ID Trans ID Account Data MMDDYY8. Start Time Time8.&lt;BR /&gt;End Time Time8. Amount Balance;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;EDIT: I changed the input code to read in fields like BRANCHID as characters which is the usual standard.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 00:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Modifying-Data-Set/m-p/781816#M249181</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-23T00:53:11Z</dc:date>
    </item>
  </channel>
</rss>

