<?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 error with proc import in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632362#M77802</link>
    <description>&lt;P&gt;Hi, I am trying to import a csv data set into sas and I keep geting this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problems were detected with provided names. See LOG.&lt;BR /&gt;19950 proc import&lt;BR /&gt;19950! datafile='C:\Users\mp675\Contacts\Desktop\Robert\alimliquida\AlimLiqdataset.csv' out=one&lt;BR /&gt;19950! replace;&lt;BR /&gt;19951 /**********************************************************************&lt;BR /&gt;19952 * PRODUCT: SAS&lt;BR /&gt;19953 * VERSION: 9.4&lt;BR /&gt;19954 * CREATOR: External File Interface&lt;BR /&gt;19955 * DATE: 13MAR20&lt;BR /&gt;19956 * DESC: Generated SAS Datastep Code&lt;BR /&gt;19957 * TEMPLATE SOURCE: (None Specified.)&lt;BR /&gt;19958 ***********************************************************************/&lt;BR /&gt;19959 data WORK.ONE ;&lt;BR /&gt;19960 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;19961 infile 'C:\Users\mp675\Contacts\Desktop\Robert\alimliquida\AlimLiqdataset.csv'&lt;BR /&gt;19961! delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;19962 informat farm_date_id_id3_id2_nefa_bhba_b $82. ;&lt;BR /&gt;19963 format farm_date_id_id3_id2_nefa_bhba_b $82. ;&lt;BR /&gt;19964 input&lt;BR /&gt;19965 farm_date_id_id3_id2_nefa_bhba_b $&lt;BR /&gt;19966 ;&lt;BR /&gt;19967 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;BR /&gt;19968 run;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 08:35:44 GMT</pubDate>
    <dc:creator>robertw</dc:creator>
    <dc:date>2020-03-16T08:35:44Z</dc:date>
    <item>
      <title>error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632362#M77802</link>
      <description>&lt;P&gt;Hi, I am trying to import a csv data set into sas and I keep geting this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problems were detected with provided names. See LOG.&lt;BR /&gt;19950 proc import&lt;BR /&gt;19950! datafile='C:\Users\mp675\Contacts\Desktop\Robert\alimliquida\AlimLiqdataset.csv' out=one&lt;BR /&gt;19950! replace;&lt;BR /&gt;19951 /**********************************************************************&lt;BR /&gt;19952 * PRODUCT: SAS&lt;BR /&gt;19953 * VERSION: 9.4&lt;BR /&gt;19954 * CREATOR: External File Interface&lt;BR /&gt;19955 * DATE: 13MAR20&lt;BR /&gt;19956 * DESC: Generated SAS Datastep Code&lt;BR /&gt;19957 * TEMPLATE SOURCE: (None Specified.)&lt;BR /&gt;19958 ***********************************************************************/&lt;BR /&gt;19959 data WORK.ONE ;&lt;BR /&gt;19960 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;19961 infile 'C:\Users\mp675\Contacts\Desktop\Robert\alimliquida\AlimLiqdataset.csv'&lt;BR /&gt;19961! delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;19962 informat farm_date_id_id3_id2_nefa_bhba_b $82. ;&lt;BR /&gt;19963 format farm_date_id_id3_id2_nefa_bhba_b $82. ;&lt;BR /&gt;19964 input&lt;BR /&gt;19965 farm_date_id_id3_id2_nefa_bhba_b $&lt;BR /&gt;19966 ;&lt;BR /&gt;19967 if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */&lt;BR /&gt;19968 run;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 08:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632362#M77802</guid>
      <dc:creator>robertw</dc:creator>
      <dc:date>2020-03-16T08:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632363#M77803</link>
      <description>&lt;P&gt;Are you sure that the file is a delimitted by comma? The line&lt;/P&gt;
&lt;PRE&gt;19965 farm_date_id_id3_id2_nefa_bhba_b $&lt;/PRE&gt;
&lt;P&gt;seems to show that field are separated by underscore.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 08:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632363#M77803</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-16T08:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632365#M77805</link>
      <description>&lt;P&gt;Should be, I created the excel data set and then saved as csv.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 09:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632365#M77805</guid>
      <dc:creator>robertw</dc:creator>
      <dc:date>2020-03-16T09:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632370#M77806</link>
      <description>&lt;P&gt;Please copy/paste a few lines from the start of the file into a window opened with the {i} button. If sensitive information is included, replace it with X's or 0's, but keep all lengths as is.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 09:39:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632370#M77806</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-16T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632378#M77807</link>
      <description>&lt;PRE&gt;farm	date	id	id3	id2	nefa	bhba	bcs	dim	lact	fdat	punteo	prep	treatment	cal
931	26/06/2019	39	93139	500049	0.07	0.164	3.5	7	6	19/06/2019	0	0	CONTROL	1.26
5587	29/07/2019	98	558798	500160	0.1	0.273	3.25	-20	7	18/08/2019	1	1	POWER.UP	2.46
5587	05/08/2019	98	558798	500161	0.11	0.18	.	-13	7	18/08/2019	1	1	POWER.UP	1.58
5587	12/08/2019	98	558798	500153	0.19	0.738	3.25	-6	7	18/08/2019	1	1	POWER.UP	2.13
5587	19/08/2019	98	558798	500171	0.75	0.61	2.75	1	7	18/08/2019	1	1	POWER.UP	1.56
5587	26/08/2019	98	558798	500174	0.2	0.879	2.75	8	7	18/08/2019	1	1	POWER.UP	2.12
5587	03/09/2019	98	558798	500176	0.3	0.22	2.25	16	7	18/08/2019	1	1	POWER.UP	2.01
5587	13/09/2019	98	558798	.	.	.	2.75	.	7	18/08/2019	1	1	POWER.UP	.&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 10:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632378#M77807</guid>
      <dc:creator>robertw</dc:creator>
      <dc:date>2020-03-16T10:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632384#M77808</link>
      <description>&lt;P&gt;That is not a csv (no commas), this is tab-separated.&lt;/P&gt;
&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile datalines dlm='09'x dsd truncover firstobs=2;
input
  farm :$4.
  date :ddmmyy10.
  id :$2.
  id3 :$6.
  id2 :$6.
  nefa
  bhba
  bcs
  dim
  lact
  fdat :ddmmyy10.
  punteo
  prep
  treatment :$10.
  cal
;
format date fdat ddmmyy10.;
datalines;
farm	date	id	id3	id2	nefa	bhba	bcs	dim	lact	fdat	punteo	prep	treatment	cal
931	26/06/2019	39	93139	500049	0.07	0.164	3.5	7	6	19/06/2019	0	0	CONTROL	1.26
5587	29/07/2019	98	558798	500160	0.1	0.273	3.25	-20	7	18/08/2019	1	1	POWER.UP	2.46
5587	05/08/2019	98	558798	500161	0.11	0.18	.	-13	7	18/08/2019	1	1	POWER.UP	1.58
5587	12/08/2019	98	558798	500153	0.19	0.738	3.25	-6	7	18/08/2019	1	1	POWER.UP	2.13
5587	19/08/2019	98	558798	500171	0.75	0.61	2.75	1	7	18/08/2019	1	1	POWER.UP	1.56
5587	26/08/2019	98	558798	500174	0.2	0.879	2.75	8	7	18/08/2019	1	1	POWER.UP	2.12
5587	03/09/2019	98	558798	500176	0.3	0.22	2.25	16	7	18/08/2019	1	1	POWER.UP	2.01
5587	13/09/2019	98	558798	.	.	.	2.75	.	7	18/08/2019	1	1	POWER.UP	.
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Replace the datalines option in the infile statement with the path to your file, and replace the whole datalines block with a run; statement.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 10:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632384#M77808</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-16T10:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632395#M77809</link>
      <description>&lt;P&gt;file is saved as CSV, and in file properties is described as comma separated values. can the problem be realed to my office being in spanish?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632395#M77809</guid>
      <dc:creator>robertw</dc:creator>
      <dc:date>2020-03-16T11:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632407#M77810</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/316747"&gt;@robertw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;file is saved as CSV, and in file properties is described as comma separated values. can the problem be realed to my office being in spanish?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know, but the example you posted is clearly tab-separated.&lt;/P&gt;
&lt;P&gt;Did you open the "csv" with a simple text editor (e.g. notepad++) and copy/paste from there?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 11:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632407#M77810</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-16T11:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632413#M77811</link>
      <description>&lt;P&gt;Previously I copy pasted from excel, now I did opened it in netepad and for some reason it is usin " ; " instead of " , ". I will have to take a look at my office seting. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 12:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632413#M77811</guid>
      <dc:creator>robertw</dc:creator>
      <dc:date>2020-03-16T12:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: error with proc import</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632424#M77813</link>
      <description>&lt;P&gt;NEVER inspect a csv file with Excel, as Excel changes everything on opening. ALWAYS use a text editing tool, preferably one with a hex display mode. That'sw hy I suggested Notepad++.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So we just have to change the delimiter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile datalines dlm=';' dsd truncover firstobs=2;
input
  farm :$4.
  date :ddmmyy10.
  id :$2.
  id3 :$6.
  id2 :$6.
  nefa
  bhba
  bcs
  dim
  lact
  fdat :ddmmyy10.
  punteo
  prep
  treatment :$10.
  cal
;
format date fdat ddmmyy10.;
datalines4;
farm;date;id;id3;id2;nefa;bhba;bcs;dim;lact;fdat;punteo;prep;treatment;cal
931;26/06/2019;39;93139;500049;0.07;0.164;3.5;7;6;19/06/2019;0;0;CONTROL;1.26
5587;29/07/2019;98;558798;500160;0.1;0.273;3.25;-20;7;18/08/2019;1;1;POWER.UP;2.46
5587;05/08/2019;98;558798;500161;0.11;0.18;.;-13;7;18/08/2019;1;1;POWER.UP;1.58
5587;12/08/2019;98;558798;500153;0.19;0.738;3.25;-6;7;18/08/2019;1;1;POWER.UP;2.13
5587;19/08/2019;98;558798;500171;0.75;0.61;2.75;1;7;18/08/2019;1;1;POWER.UP;1.56
5587;26/08/2019;98;558798;500174;0.2;0.879;2.75;8;7;18/08/2019;1;1;POWER.UP;2.12
5587;03/09/2019;98;558798;500176;0.3;0.22;2.25;16;7;18/08/2019;1;1;POWER.UP;2.01
5587;13/09/2019;98;558798;.;.;.;2.75;.;7;18/08/2019;1;1;POWER.UP;.
;;;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that I needed to use datalines4 instead of datalines, to accommodate the semicolons in the datalines block.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 13:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-with-proc-import/m-p/632424#M77813</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-16T13:01:08Z</dc:date>
    </item>
  </channel>
</rss>

