<?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: CSV File Import : in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133178#M260788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to advance the pointer +1 after reading N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 May 2013 18:37:48 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2013-05-09T18:37:48Z</dc:date>
    <item>
      <title>CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133165#M260775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have to import a Comma Seprated file into SAS but there is a problem with one coulm (A), Coulmn(A) has multiple values seprated by commas.&lt;/P&gt;&lt;P&gt;while importing SAS also reads these commas, so shift the values in subsequent coulmns(B,C,..). so the data become courrpt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anay one please advice how can this exception(issue) be handle? so the multiple values in coulmn(A) remains in&amp;nbsp; Coulmn(A).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS gurus your support in this would be highly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ali J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 11:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133165#M260775</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-09T11:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133166#M260776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe you have a CSV because the specification for a CSV "says" that fields that contain the delimiter are to be quoted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know the total number of fields you can count from the right to find the column where the first field should end.&amp;nbsp; Then read that field with $VARYING and continue with the other fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Show example data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 12:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133166#M260776</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-09T12:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133167#M260777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide some example problem data, the code you are using to read it and what results you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 12:12:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133167#M260777</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2013-05-09T12:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133168#M260778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If column A &lt;STRONG&gt;always&lt;/STRONG&gt; has the same number of commas (eg 2) then you can define extra temporary columns A1 A2 A3 to import the data; after the input statement you then need something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A = catx (', ', A1, A2, A3) ;&lt;/P&gt;&lt;P&gt;which will restore the commas in a single column A.&amp;nbsp; Follow with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop A1 A2 A3 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise this &lt;EM&gt;might&lt;/EM&gt; work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Infile xxx MISSOVER [etc] ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input @ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Infile_ = reverse (_Infile_) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&amp;nbsp; C&amp;nbsp; B A3 A2 A1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D = left (reverse (D)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C = left (reverse (C)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A1 = left (reverse (A1)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A = catx (', ', A1, A2, A3) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop A1 A2 A3 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:15:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133168#M260778</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-05-09T13:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133169#M260779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replys.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Probably I did not explain the problem correctly. Please find attached sample data "SAMPL.csv"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are coulmns from A to W , when I import data it create coulmns by commas but in coulmn 'N' there are multiple values(&amp;gt;=2, not fixed) also seprated by&amp;nbsp; comma . SAS also read these values as different coulmns and shifts the value of adjacent coulmn. due to this extra coulmns cretae automatically and inapproprite data is filled in coulmns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me to resolve it, i am using SAS EG for data import&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133169#M260779</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-09T13:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133170#M260780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another suggestion if you have differing numbers of commas in column A.&lt;/P&gt;&lt;P&gt;Create an array of your desired variables, then&lt;/P&gt;&lt;P&gt;Create an array of character variables t1 - tM where M = number of input variables (n) + maximum number of commas.&lt;/P&gt;&lt;P&gt;The length of each temporary variable must exceed the length of any input variable.&lt;/P&gt;&lt;P&gt;Input the data into the variables t1 - tM as text.&lt;/P&gt;&lt;P&gt;if t{n+1} is not blank then&lt;/P&gt;&lt;P&gt;t1 = catx (', ', t{1}, t{2}) ;&lt;/P&gt;&lt;P&gt;t{2} = t{3} ; etc to t{M-1} = t{M} ;&lt;/P&gt;&lt;P&gt;repeat until t{n+1} is blank&lt;/P&gt;&lt;P&gt;copy values to the array of desired values&lt;/P&gt;&lt;P&gt;Drop all the t{*} values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use&amp;nbsp; do while () or do until () to loop until t{n+1} is blank&lt;/P&gt;&lt;P&gt;Use do k = 1 to n&amp;nbsp; to copy values from the t{*} array to the wanted values&lt;/P&gt;&lt;P&gt;Do any text to numeric conversion en route as required&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133170#M260780</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-05-09T13:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133171#M260781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure how EG handles input where the apparent number of data items exceeds the number of columns defined in the input.&amp;nbsp; I think you will have to write a data step anyway in a program module to handle this irregular data: modify my suggestion (above) to start at column N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 13:58:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133171#M260781</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2013-05-09T13:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133172#M260782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with RichardinOz.&amp;nbsp; The csv sample file was not built correctly.&amp;nbsp; The text string for N should have been "11,15,17".&lt;/P&gt;&lt;P&gt;If you know that N is the only column that can have multiple values together, then write your data step/ input statement to read in extra fields at the end (X1, X2, X3, etc.) and then shift everything back, depending on the number of extra values found.&amp;nbsp; I can also tell from the sample, that the number of extra values can vary from row to row.&lt;/P&gt;&lt;P&gt;I've had to deal with this myself, not fun.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this using arrays, but a simple way to show what you are doing with your sample data:&lt;/P&gt;&lt;P&gt;(let's say if you know you can have up to 5 values in that multiple string)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* starting with the maximum number of extra fields ;&lt;/P&gt;&lt;P&gt;length N_string $16 ; * (to hold 5 2-digit numbers and commas);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input A B&amp;nbsp; C etc... W X1 X2 X3 X4 ;&lt;/P&gt;&lt;P&gt;If X4 ^= ' ' then do ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * we have 5 values for N ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N_string = N || ',' || O || ',' || P || ',' || Q || ',' || R ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O = S ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P = T ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *fill in the rest as above;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; W = X4 ;&lt;/P&gt;&lt;P&gt;end ;&lt;/P&gt;&lt;P&gt;else if X3 ^= ' ' then do ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133172#M260782</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2013-05-09T14:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133173#M260783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at the file example only, HOW do you know the problem is with column N? That makes me think you know more about the file source than you are telling here. As structured, the file is NOT CSV as mentioned data_null. In this case it is only the file extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible I would go to the source of the file and try to find out how it is created. Then work to see if the source can properly quote qualify the text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133173#M260783</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-05-09T14:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133174#M260784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree that my first choice would be to go back to the entity that generated the false "csv" file, but assuming that's not possible, or the source can't do what you want, and you KNOW what the data should be, you can work around it.&lt;/P&gt;&lt;P&gt;If more than one column can have multiple values, then you can't work around it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this is only going to work if all the columns after the problem column (column N in the sample) are the same data type.&amp;nbsp; If you have a date column, or a text string in the columns that might be shifted, then you could lose data unless you read all columns in as string variables, and then convert the numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that I think about it, I should have included conversions from the numbers to strings when contatenating N, O, P, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133174#M260784</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2013-05-09T14:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133175#M260785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe your csv file is not real CSV file. Use double quote around it .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 14:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133175#M260785</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-05-09T14:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133176#M260786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming my assumptions are right.&amp;nbsp; If this works you can add the proper INFORMATS to read the numbers and dates etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;SPAN style="color: #000080; background-color: #ffffff;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; csv;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;dsd&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=col;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; (a b c d e f g h i j k l m)(:&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$12.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;) @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; column=col;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;CALL&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; SCAN(_infile_,&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;, position, length,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;','&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'mb'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; lengthN = Position - col-&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; n &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$varying32.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lengthN +1 (o p q r s t u v w)(:&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$12.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W&lt;BR /&gt;C1,6,T,45600,31-MAR-13,3800,0,0,0,3800,31-JUL-03,31-JUL-05,S,15 ,17,0,,0,0,12,0,0,0,0&lt;BR /&gt;C2,54,E,5000000,30-NOV-12,0,0,0,0,0,06-MAY-11,30-SEP-12,S,11 ,18,0,,0,1,0,0,0,0,0&lt;BR /&gt;C3,6,T,27835,31-MAR-13,15467,0,0,0,15467,04-AUG-07,04-FEB-09,S,15 ,17,0,,0,0,9,0,0,0,0&lt;BR /&gt;C4,54,T,1000000,31-AUG-12,999932,0,0,0,1317036,09-AUG-00,31-JUL-09,S,11 ,15 ,17,0,,0,0,5,0,0,0,0&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: data _null_ "+1"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 17:26:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133176#M260786</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-09T17:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133177#M260787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I love your idea, but a proc print shows that it is not quite working.&lt;/P&gt;&lt;P&gt;i thought perhaps the empty value of two commas together might be messing up the SCAN() (because SCAN might be calling two delimiters together as one delimiter), but it still didn't work when I added a space there.&amp;nbsp; The variable "o" is not getting populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 18:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133177#M260787</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2013-05-09T18:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133178#M260788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to advance the pointer +1 after reading N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 18:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133178#M260788</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-09T18:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133179#M260789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recive this data from extrenal source frequently and used to work on it, the external source often forget the quantifiers(" "), so to get the correct file waste time which is critical. i-e, i want to handle this exception at my end rather wasting time oftenly to get correct data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;help is required to write a procedure/data step to address this issue when it occurs. &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ali J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 04:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133179#M260789</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-10T04:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133180#M260790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot !&amp;nbsp; data_null_ and cwilson. it really work well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 05:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133180#M260790</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-10T05:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133181#M260791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that this is really simplistic and clunky (I never really got out of SASv6 mode!), but perhaps it can start you down a trail. Some of the code is bloated to provide intermediate outputs, and could easily be replaced. The assumption is that column N is the field with multiple commas, and that quotation marks are always omitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "C:\My SAS Files\sample.csv" lrecl=256 pad;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length aa a b c d e f g h i j k l m n o p q r s t u v w $12;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length ipt ript tipt $256.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input ipt $char256.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ript=trim(reverse(ipt));&lt;/P&gt;&lt;P&gt;&amp;nbsp; array field {*} a b c d e f g h i j k l m n o p q r s t u v w;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do ii=dim(field) to 15 by -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jj=index(ript,",");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if jj=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field(ii)=" ";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ript=substr(ript,2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field{ii}=reverse(substr(ript,1,jj-1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ript=trim(substr(ript,jj+1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tipt=left(reverse(ript));&lt;/P&gt;&lt;P&gt;&amp;nbsp; do ii=1 to 13;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jj=index(tipt,",");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if jj=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field(ii)=" ";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tipt=substr(tipt,2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; field{ii}=substr(tipt,1,jj-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tipt=trim(substr(tipt,jj+1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; n=trim(tipt);&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 15:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133181#M260791</guid>
      <dc:creator>DanWALDO</dc:creator>
      <dc:date>2013-05-10T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: CSV File Import :</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133182#M260792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DanWaldo !&lt;/P&gt;&lt;P&gt;your approch and code was awsome and i had sucefully implemented it with some customization&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 08:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-File-Import/m-p/133182#M260792</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-22T08:02:31Z</dc:date>
    </item>
  </channel>
</rss>

