<?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: Delimiter Issue using Infile in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626070#M184599</link>
    <description>&lt;P&gt;Your samples are simple comma-separated, so&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "....." dlm=',' dsd truncover lrecl=3575;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should be sufficient.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 07:51:02 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-02-20T07:51:02Z</dc:date>
    <item>
      <title>Delimiter Issue using Infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626065#M184596</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’m having an issue importing data using the ‘infile’ command. The issue seems too relate to the delimiter, however I cannot find a solution to the issue. I’ve even imported using File-&amp;gt;Import and applied these settings however it still will not work. The reason I need to do it manually is that I have 2,500 files to import. Once the logic is fixed, I can nest the code inside a do loop and continue using a data dictionary.&lt;/P&gt;&lt;P&gt;I’ve included the first 5 column headers below; the first 4 will not populate in the output file, the 5th has the data from the first 4 columns bunched together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; B._20121121;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat iMonth BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat iYear BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat LEGAL_ENTITY_NUMBER BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat GL_ACCOUNT BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Informat COST_CENTER $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format iMonth BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format iYear BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format LEGAL_ENTITY_NUMBER BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format GL_ACCOUNT BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format COST_CENTER $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile 'XXXXX&lt;/P&gt;&lt;P&gt;LRECL=&lt;STRONG&gt;3575&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ENCODING="WLATIN1"&lt;/P&gt;&lt;P&gt;TERMSTR=CRLF&lt;/P&gt;&lt;P&gt;DLM='9F'x&lt;/P&gt;&lt;P&gt;MISSOVER&lt;/P&gt;&lt;P&gt;DSD ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input iMonth: ?? BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input iYear: ?? BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input LEGAL_ENTITY_NUMBER: ?? BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input GL_ACCOUNT: ?? BEST12.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input COST_CENTER $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input SECTOR_CODE $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input card_assoc_id $;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a sample of the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on how to proceed? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 07:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626065#M184596</guid>
      <dc:creator>gsisme</dc:creator>
      <dc:date>2020-02-20T07:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delimiter Issue using Infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626070#M184599</link>
      <description>&lt;P&gt;Your samples are simple comma-separated, so&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "....." dlm=',' dsd truncover lrecl=3575;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;should be sufficient.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 07:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626070#M184599</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-20T07:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delimiter Issue using Infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626071#M184600</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the input. I've tried the above solution previously and it seems to duplicate the data from the 1st columns across the remainder of the table, with the exception of the very first observation which remains blank (see attached).&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 08:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626071#M184600</guid>
      <dc:creator>gsisme</dc:creator>
      <dc:date>2020-02-20T08:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Delimiter Issue using Infile</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626073#M184602</link>
      <description>&lt;P&gt;I copied your sample2.csv to our UNIX server and ran this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile '$HOME/sascommunity/Sample2.csv' dlm=',' dsd firstobs=2 truncover;
input
  iMonth
  iYear
  LEGAL_ENTITY_NUMBER
  GL_ACCOUNT
  COST_CENTER
;
run;

proc print data=want noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                  LEGAL_
  i        i     ENTITY_                   COST_
Month    Year     NUMBER    GL_ACCOUNT    CENTER

   .      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
  11      11        11          11          11  
&lt;/PRE&gt;
&lt;P&gt;Contents of Sample2.csv, for reference:&lt;/P&gt;
&lt;PRE&gt;iMonth,iYear,LEGAL_ENTITY_NUMBER,GL_ACCOUNT,COST_CENTER
.,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11
11,11,11,11,11&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Feb 2020 08:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delimiter-Issue-using-Infile/m-p/626073#M184602</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-20T08:16:18Z</dc:date>
    </item>
  </channel>
</rss>

