<?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: Importing issue in csv file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339112#M77352</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104494"&gt;@Ravikumarpa4&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;What you probably also want to do once you've read your data into variables is to run a translate() function or the like to replace the LF with a blank or a comma. If you don't do this then some Proc's will print your data as below (Proc Print example):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7609i3423368B626FE21A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2017 06:59:09 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-03-08T06:59:09Z</dc:date>
    <item>
      <title>Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339101#M77345</link>
      <description>&lt;P&gt;Hi tried to import attached csv file i'm able to import data but its not comping in proper way attached input csv and output csv file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log&lt;/P&gt;&lt;P&gt;1 data WORK.CUSTOMER ;&lt;/P&gt;&lt;P&gt;2 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;/P&gt;&lt;P&gt;3 infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' delimiter = ',' MISSOVER DSD&lt;/P&gt;&lt;P&gt;3 ! lrecl=32767 firstobs=2 ;&lt;/P&gt;&lt;P&gt;4 informat CustomerID $4.;&lt;/P&gt;&lt;P&gt;5 informat CompanyName $28. ;&lt;/P&gt;&lt;P&gt;6 informat ContactName $28. ;&lt;/P&gt;&lt;P&gt;7 informat City $16. ;&lt;/P&gt;&lt;P&gt;8 informat Country $12. ;&lt;/P&gt;&lt;P&gt;9 informat DivisionID best32. ;&lt;/P&gt;&lt;P&gt;10 informat Address $50. ;&lt;/P&gt;&lt;P&gt;11 informat Fax $18. ;&lt;/P&gt;&lt;P&gt;12 informat Phone $18. ;&lt;/P&gt;&lt;P&gt;13 informat PostalCode $10. ;&lt;/P&gt;&lt;P&gt;14 informat StateProvince $2. ;&lt;/P&gt;&lt;P&gt;15 format CustomerID $4. ;&lt;/P&gt;&lt;P&gt;16 format CompanyName $28. ;&lt;/P&gt;&lt;P&gt;17 format ContactName $28. ;&lt;/P&gt;&lt;P&gt;18 format City $16. ;&lt;/P&gt;&lt;P&gt;19 format Country $12. ;&lt;/P&gt;&lt;P&gt;20 format DivisionID best12. ;&lt;/P&gt;&lt;P&gt;21 format Address $50. ;&lt;/P&gt;&lt;P&gt;22 format Fax $18. ;&lt;/P&gt;&lt;P&gt;23 format Phone $18. ;&lt;/P&gt;&lt;P&gt;24 format PostalCode $10. ;&lt;/P&gt;&lt;P&gt;25 format StateProvince $2. ;&lt;/P&gt;&lt;P&gt;26 input&lt;/P&gt;&lt;P&gt;27 CustomerID $&lt;/P&gt;&lt;P&gt;28 CompanyName $&lt;/P&gt;&lt;P&gt;29 ContactName $&lt;/P&gt;&lt;P&gt;30 City $&lt;/P&gt;&lt;P&gt;31 Country $&lt;/P&gt;&lt;P&gt;32 DivisionID&lt;/P&gt;&lt;P&gt;33 Address $@&lt;/P&gt;&lt;P&gt;34 Fax $&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;ERROR 22-322: Expecting a name.&lt;/P&gt;&lt;P&gt;35 Phone $&lt;/P&gt;&lt;P&gt;36 PostalCode $&lt;/P&gt;&lt;P&gt;37 StateProvince $&lt;/P&gt;&lt;P&gt;38 ;&lt;/P&gt;&lt;P&gt;39 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;/P&gt;&lt;P&gt;40 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.CUSTOMER may be incomplete. When this step was stopped there were 0&lt;/P&gt;&lt;P&gt;observations and 11 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.19 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;41 data WORK.CUSTOMER ;&lt;/P&gt;&lt;P&gt;42 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;/P&gt;&lt;P&gt;43 infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' delimiter = ',' MISSOVER DSD&lt;/P&gt;&lt;P&gt;43 ! lrecl=32767 firstobs=2 ;&lt;/P&gt;&lt;P&gt;44 informat CustomerID $4.;&lt;/P&gt;&lt;P&gt;45 informat CompanyName $28. ;&lt;/P&gt;&lt;P&gt;46 informat ContactName $28. ;&lt;/P&gt;&lt;P&gt;47 informat City $16. ;&lt;/P&gt;&lt;P&gt;48 informat Country $12. ;&lt;/P&gt;&lt;P&gt;49 informat DivisionID best32. ;&lt;/P&gt;&lt;P&gt;50 informat Address $50. ;&lt;/P&gt;&lt;P&gt;51 informat Fax $18. ;&lt;/P&gt;&lt;P&gt;52 informat Phone $18. ;&lt;/P&gt;&lt;P&gt;53 informat PostalCode $10. ;&lt;/P&gt;&lt;P&gt;54 informat StateProvince $2. ;&lt;/P&gt;&lt;P&gt;55 format CustomerID $4. ;&lt;/P&gt;&lt;P&gt;56 format CompanyName $28. ;&lt;/P&gt;&lt;P&gt;57 format ContactName $28. ;&lt;/P&gt;&lt;P&gt;58 format City $16. ;&lt;/P&gt;&lt;P&gt;59 format Country $12. ;&lt;/P&gt;&lt;P&gt;60 format DivisionID best12. ;&lt;/P&gt;&lt;P&gt;61 format Address $50. ;&lt;/P&gt;&lt;P&gt;62 format Fax $18. ;&lt;/P&gt;&lt;P&gt;63 format Phone $18. ;&lt;/P&gt;&lt;P&gt;64 format PostalCode $10. ;&lt;/P&gt;&lt;P&gt;65 format StateProvince $2. ;&lt;/P&gt;&lt;P&gt;66 input&lt;/P&gt;&lt;P&gt;67 CustomerID $&lt;/P&gt;&lt;P&gt;68 CompanyName $&lt;/P&gt;&lt;P&gt;69 ContactName $&lt;/P&gt;&lt;P&gt;70 City $&lt;/P&gt;&lt;P&gt;71 Country $&lt;/P&gt;&lt;P&gt;72 DivisionID&lt;/P&gt;&lt;P&gt;73 Address $&lt;/P&gt;&lt;P&gt;74 Fax $&lt;/P&gt;&lt;P&gt;75 Phone $&lt;/P&gt;&lt;P&gt;76 PostalCode $&lt;/P&gt;&lt;P&gt;77 StateProvince $&lt;/P&gt;&lt;P&gt;78 ;&lt;/P&gt;&lt;P&gt;79 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;/P&gt;&lt;P&gt;80 run;&lt;/P&gt;&lt;P&gt;NOTE: The infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' is:&lt;/P&gt;&lt;P&gt;Filename=C:\Users\Training5\Desktop\New folder\Customers.csv,&lt;/P&gt;&lt;P&gt;RECFM=V,LRECL=32767,File Size (bytes)=9630,&lt;/P&gt;&lt;P&gt;Last Modified=07Mar2017:07:29:42,&lt;/P&gt;&lt;P&gt;Create Time=07Mar2017:07:29:37&lt;/P&gt;&lt;P&gt;NOTE: 100 records were read from the infile 'C:\Users\Training5\Desktop\New folder\Customers.csv'.&lt;/P&gt;&lt;P&gt;The minimum record length was 33.&lt;/P&gt;&lt;P&gt;The maximum record length was 135.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.CUSTOMER has 100 observations and 11 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.10 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 05:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339101#M77345</guid>
      <dc:creator>Ravikumarpa4</dc:creator>
      <dc:date>2017-03-08T05:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339102#M77346</link>
      <description>&lt;P&gt;Please post log snippets using the {i} button, so that the formatting is preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a stray @ in your input statement causing an error (very obvious). Fix that first and try again.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 05:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339102#M77346</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-08T05:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339103#M77347</link>
      <description>&lt;P&gt;now i tried with @&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; WORK.CUSTOMER ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _EFIERR_ = 0; &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* set the ERROR detection macro variable */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\Users\Training5\Desktop\New folder\Customers.csv'&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;delimiter&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;','&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dsd&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;MISSOVER&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;lrecl&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;32767&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;firstobs&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CustomerID &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$4.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CompanyName &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$28.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ContactName &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$28.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; City &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$16.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Country &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$12.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DivisionID &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;best32.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Address &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$50.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Fax &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$18.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Phone &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$18.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PostalCode &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;informat&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; StateProvince &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CustomerID &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$4.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; CompanyName &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$28.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ContactName &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$28.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; City &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$16.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Country &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$12.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DivisionID &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;best12.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Address &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$50.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Fax &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$18.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Phone &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$18.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; PostalCode &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; StateProvince &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$2.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;input&lt;/P&gt;&lt;P&gt;CustomerID $&lt;/P&gt;&lt;P&gt;CompanyName $&lt;/P&gt;&lt;P&gt;ContactName $&lt;/P&gt;&lt;P&gt;City $&lt;/P&gt;&lt;P&gt;Country $&lt;/P&gt;&lt;P&gt;DivisionID&lt;/P&gt;&lt;P&gt;Address $ @&lt;/P&gt;&lt;P&gt;Fax $&lt;/P&gt;&lt;P&gt;Phone $&lt;/P&gt;&lt;P&gt;PostalCode $&lt;/P&gt;&lt;P&gt;StateProvince $&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; _ERROR_ &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symputx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'_EFIERR_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;); &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* set ERROR detection macro variable */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;log&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;FONT face="Courier New" size="2"&gt;653  data WORK.CUSTOMER    ;
654  %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
655  infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' delimiter = ',' dsd MISSOVER
655! lrecl=32767 firstobs=2 ;
656  informat CustomerID $4.;
657  informat CompanyName $28. ;
658  informat ContactName $28. ;
659  informat City $16. ;
660  informat Country $12. ;
661  informat DivisionID best32. ;
662  informat Address $50.;
663  informat Fax $18. ;
664  informat Phone $18. ;
665  informat PostalCode $10. ;
666  informat StateProvince $2. ;
667  format CustomerID $4. ;
668  format CompanyName $28. ;
669  format ContactName $28. ;
670  format City $16. ;
671  format Country $12. ;
672  format DivisionID best12. ;
673  format Address $50. ;
674  format Fax $18. ;
675  format Phone $18. ;
676  format PostalCode $10. ;
677  format StateProvince $2. ;
678  input
679  CustomerID $
680  CompanyName $
681  ContactName $
682  City $
683  Country $
684  DivisionID
685  Address $ @
686  Fax $
         -
         22
ERROR 22-322: Expecting a name.

687  Phone $
688  PostalCode $
689  StateProvince $
690  ;
691  if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
692  run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.CUSTOMER may be incomplete.  When this step was stopped there were 0
         observations and 11 variables.
WARNING: Data set WORK.CUSTOMER was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339103#M77347</guid>
      <dc:creator>Ravikumarpa4</dc:creator>
      <dc:date>2017-03-08T06:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339104#M77348</link>
      <description>&lt;P&gt;Your code HAS an&amp;nbsp;@ that is the issue. Check the line above the ERROR. Both logs, same place.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339104#M77348</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-08T06:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339106#M77349</link>
      <description>&lt;PRE&gt;819  data WORK.CUSTOMER    ;
820  %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
821  infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' delimiter = ',' dsd MISSOVER
821! lrecl=32767 firstobs=2 ;
822  informat CustomerID $4.;
823  informat CompanyName $28. ;
824  informat ContactName $28. ;
825  informat City $16. ;
826  informat Country $12. ;
827  informat DivisionID best32. ;
828  informat Address $50.;
829  informat Fax $18. ;
830  informat Phone $18. ;
831  informat PostalCode $10. ;
832  informat StateProvince $2. ;
833  format CustomerID $4. ;
834  format CompanyName $28. ;
835  format ContactName $28. ;
836  format City $16. ;
837  format Country $12. ;
838  format DivisionID best12. ;
839  format Address $50. ;
840  format Fax $18. ;
841  format Phone $18. ;
842  format PostalCode $10. ;
843  format StateProvince $2. ;
844  input
845  CustomerID $
846  CompanyName $
847  ContactName $
848  City $
849  Country $
850  DivisionID
851  Address $
852  Fax $
853  Phone $
854  PostalCode $
855  StateProvince $
856  ;
857  if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */
858  run;

NOTE: The infile 'C:\Users\Training5\Desktop\New folder\Customers.csv' is:
      Filename=C:\Users\Training5\Desktop\New folder\Customers.csv,
      RECFM=V,LRECL=32767,File Size (bytes)=9630,
      Last Modified=07Mar2017:07:29:42,
      Create Time=07Mar2017:07:29:37

NOTE: 100 records were read from the infile 'C:\Users\Training5\Desktop\New folder\Customers.csv'.
      The minimum record length was 33.
      The maximum record length was 135.
NOTE: The data set WORK.CUSTOMER has 100 observations and 11 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
but output not coming in proper way&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339106#M77349</guid>
      <dc:creator>Ravikumarpa4</dc:creator>
      <dc:date>2017-03-08T06:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339108#M77350</link>
      <description>&lt;P&gt;For your 2nd data step which executes without errors:&lt;/P&gt;
&lt;P&gt;1. remove the $ in the Input statement. You're already defining in your Informat statements how&amp;nbsp;text needs to be read into the SAS variables.&lt;/P&gt;
&lt;P&gt;2. add&amp;nbsp;TERMSTR=CRLF to your infile options&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason why your data gets messed up: You're having a linefeed LF in your data which SAS interpretes as an end of line indicator. Adding option&amp;nbsp;&lt;SPAN&gt;TERMSTR=CRLF instructs SAS to only interprete CRLF as end of line indicator.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A quick way to inspect source files for such issues is to use a tool like Notepad++ showing all characters (set under: &lt;EM&gt;View/Show Symbol/Show all Characters&lt;/EM&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7608i200F4C076B412150/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339108#M77350</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-03-08T06:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339112#M77352</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104494"&gt;@Ravikumarpa4&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;What you probably also want to do once you've read your data into variables is to run a translate() function or the like to replace the LF with a blank or a comma. If you don't do this then some Proc's will print your data as below (Proc Print example):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7609i3423368B626FE21A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 06:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339112#M77352</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-03-08T06:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Importing issue in csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339119#M77354</link>
      <description>&lt;P&gt;Just to make it clear what the stray @ caused:&lt;/P&gt;
&lt;PRE&gt;685  Address $ @
686  Fax $
         -
         22
ERROR 22-322: Expecting a name.&lt;/PRE&gt;
&lt;P&gt;The "@" is interpreted as the start of a position marker, so the next item in the code should designate a position; since this can be done with a number literal or a variable, "Fax" is interpreted as this &lt;U&gt;position&lt;/U&gt; variable. To continue in a syntactically correct way, SAS now expects the name of a variable &lt;U&gt;to be read&lt;/U&gt;. So the "$" comes unexpected and triggers the syntax error.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 07:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-issue-in-csv-file/m-p/339119#M77354</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-08T07:50:58Z</dc:date>
    </item>
  </channel>
</rss>

