<?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: Data importing step in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865878#M38259</link>
    <description>&lt;P&gt;Never use PROC IMPORT for text files. Write the DATA step yourself, according to the documentation of the csv file. Guarantees consistent and correct results, which the guessing of PROC IMPORT can't.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2023 09:38:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-03-23T09:38:40Z</dc:date>
    <item>
      <title>Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865872#M38257</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am importing a CSV file from a location to SAS. When I am importing the data is imported and I can see the output results as normal but in the log it shows an error as Import unsuccessful. Can you please suggest the error that I am doing in importing the file?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc import 
datafile='\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Files To Send\EQ_Trace_2023_02_10_10FEB2023.CSV'
out=Feb_release
dbms=csv
replace;
run;

Log:
     

Errors detected in submitted DATA step. Examine log.
995394 rows created in WORK.FEB_RELEASE from \\lowell2.local\shares\Public\Trace\Trace Integrity Analyst 
Data\BAU_Processes\SAS\Enhanced TPT\Files To Send\EQ_Trace_2023_02_10_10FEB2023.CSV.
  
  
  
ERROR: Import unsuccessful.  See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           2.60 seconds
      user cpu time       1.48 seconds
      system cpu time     0.07 seconds
      memory              8646.65k
      OS Memory           39020.00k
      Timestamp           03/23/2023 09:01:20 AM
      Step Count                        60  Switch Count  11
      &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2023 09:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865872#M38257</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-03-23T09:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865873#M38258</link>
      <description>&lt;P&gt;You are showing proc import code, and the log says:&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;Errors detected in submitted DATA step.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think it is not all the log information you are sharing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 09:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865873#M38258</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-03-23T09:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865878#M38259</link>
      <description>&lt;P&gt;Never use PROC IMPORT for text files. Write the DATA step yourself, according to the documentation of the csv file. Guarantees consistent and correct results, which the guessing of PROC IMPORT can't.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 09:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865878#M38259</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-23T09:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865882#M38260</link>
      <description>&lt;P&gt;I used the data step to import the file as you suggested and it ran without any errors but the dataset is blank. It is showing only the number of rows but no data in the dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EQ_Trace_2023_02_10_10FEB2023; 
infile '\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Storage\Monthly Washes\Trace_2023_02_10\elnz_Lowell_10Feb.CSV';
input ;
run;
Log:
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='S:\Trace\Trace Integrity Analyst Data\Projects and Tasks\3. Sandeep\Equifax released.egp';
6          %LET _CLIENTPROJECTPATHHOST='LWLT5CG9322XFL';
7          %LET _CLIENTPROJECTNAME='Equifax released.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=SVG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         %macro HTML5AccessibleGraphSupported;
15             %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;
16         %mend;
17         ODS LISTING GPATH=&amp;amp;sasworklocation;
18         FILENAME EGHTML TEMP;
19         ODS HTML5(ID=EGHTML) FILE=EGHTML
20             OPTIONS(BITMAP_MODE='INLINE')
21             %HTML5AccessibleGraphSupported
22             ENCODING='utf-8'
23             STYLE=HTMLBlue
24             NOGTITLE
25             NOGFOOTNOTE
26             GPATH=&amp;amp;sasworklocation
27         ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
28         
29         data EQ_Trace_2023_02_10_10FEB2023;
30         infile '\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Storage\Monthly
30       ! Washes\Trace_2023_02_10\elnz_Lowell_10Feb.CSV';
31         input ;
32         run;

NOTE: Compression was disabled for data set WORK.EQ_TRACE_2023_02_10_10FEB2023 because compression overhead would increase the size 
      of the data set.
NOTE: The infile '\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Storage\Monthly 
      Washes\Trace_2023_02_10\elnz_Lowell_10Feb.CSV' is:
      
      Filename=\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Storage\Monthly 
      Washes\Trace_2023_02_10\elnz_Lowell_10Feb.CSV,
      RECFM=V,LRECL=32767,
      File Size (bytes)=263495880,
      Last Modified=15Feb2023:10:23:24,
      Create Time=15Feb2023:10:27:08

NOTE: 995395 records were read from the infile '\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst 
      Data\BAU_Processes\SAS\Enhanced TPT\Storage\Monthly Washes\Trace_2023_02_10\elnz_Lowell_10Feb.CSV'.
      The minimum record length was 114.
      The maximum record length was 1345.
NOTE: The data set WORK.EQ_TRACE_2023_02_10_10FEB2023 has 995395 observations and 0 variables.
NOTE: DATA statement used (Total process time):
      real time           1.34 seconds
      user cpu time       0.48 seconds
      system cpu time     0.06 seconds
      memory              749.06k
      OS Memory           35428.00k
2                                                          The SAS System                            10:50 Wednesday, March 22, 2023

      Timestamp           03/23/2023 10:07:12 AM
      Step Count                        72  Switch Count  2
      

33         
34         %LET _CLIENTTASKLABEL=;
35         %LET _CLIENTPROCESSFLOWNAME=;
36         %LET _CLIENTPROJECTPATH=;
37         %LET _CLIENTPROJECTPATHHOST=;
38         %LET _CLIENTPROJECTNAME=;
39         %LET _SASPROGRAMFILE=;
40         %LET _SASPROGRAMFILEHOST=;
41         
42         ;*';*";*/;quit;run;
43         ODS _ALL_ CLOSE;
44         
45         
46         QUIT; RUN;
47         
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Mar 2023 10:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865882#M38260</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-03-23T10:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865890#M38261</link>
      <description>&lt;P&gt;Try importing the data with the infile method. As below code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA DWH4;
INFILE 'address of the file with its extension like (.csv)'
missover
dsd
firstobs=2;
/* $ = here represents the length of the data8/
/*for example a mobile number has should be of length 10 then it would be $10.*/
informat 'column1 name'n $100.;
informat 'column2 name'n $100.;


format 'column1 name'n $100.;
format 'column2 name'n $100.;


input

'Column1 name'n $
'Column2 name'n $;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It gives us more flexibility. Although, Importing is the best procedure but it sometimes creates problem. So what I did is to use infile method for a very large data.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 10:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865890#M38261</guid>
      <dc:creator>Kirito1</dc:creator>
      <dc:date>2023-03-23T10:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865901#M38262</link>
      <description>/*&lt;BR /&gt;Try guessingrows=max and  getnames=no options&lt;BR /&gt;*/&lt;BR /&gt;Proc import &lt;BR /&gt;datafile='\\lowell2.local\shares\Public\Trace\Trace Integrity Analyst Data\BAU_Processes\SAS\Enhanced TPT\Files To Send\EQ_Trace_2023_02_10_10FEB2023.CSV'&lt;BR /&gt;out=Feb_release&lt;BR /&gt;dbms=csv&lt;BR /&gt;replace;&lt;BR /&gt;guessingrows=max;&lt;BR /&gt;getnames=no ;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 23 Mar 2023 11:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865901#M38262</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-03-23T11:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865907#M38263</link>
      <description>The code ran successfully but it only pulled out 11 columns out of 72 and all the column headers were changed to VAR1, VAR2... to VAR11.</description>
      <pubDate>Thu, 23 Mar 2023 12:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865907#M38263</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-03-23T12:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865908#M38264</link>
      <description>&lt;P&gt;Never make your life unnecessary hard by using those stupid name literals. Use valid V7 SAS names.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 12:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865908#M38264</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-23T12:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865912#M38265</link>
      <description>&lt;P&gt;With an empty INPUT statement, no variables will be created/populated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You MUST (as I already said) write the DATA step according to the documentation of the file, where all variables and their attributes will be described.&lt;/P&gt;
&lt;P&gt;If you did not receive documentation, return to sender, or pay a visit to them wielding a suitable instrument, like a baseball bat.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case some pumpkin sent you the file without doc,&amp;nbsp;&lt;EM&gt;we&lt;/EM&gt; might be able to make some educated guesses when we see the file's contents. Open it with a text editor (NOT with Excel!!!) and copy/paste the first few lines into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 12:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865912#M38265</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-23T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865914#M38266</link>
      <description>So I suggested you post some your real data(not all) to test your code and find out where is problem.</description>
      <pubDate>Thu, 23 Mar 2023 12:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865914#M38266</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-03-23T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data importing step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865960#M38273</link>
      <description>&lt;P&gt;Copy the first 5 lines from the file. Open your file with a TEXT EDITOR to copy the text. On the forum open a text box with the &amp;lt;/&amp;gt; and paste the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF the content is sensitive AFTER pasting into the text box type over sensitive values with XXX (character) or 000 (numeric).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One suspects the file is not actually a simple CSV.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Data-importing-step/m-p/865960#M38273</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-23T15:02:46Z</dc:date>
    </item>
  </channel>
</rss>

