<?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: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528198#M5369</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241468"&gt;@dbcrow&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks.&amp;nbsp; I didn't post the complete code, which contains informats, input, statements, etc.&amp;nbsp; It's exactly the code generated by the import wizard, and just substitutes the correct local file path (infile "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt) for the temporary file path used by the wizard (INFILE 'C:\Users\DCrow\AppData\Local\Temp\SEG23860\Intercensal_2000-2010_DBInput_csv-e23e36cbe8d24b5d9fb12eca6ee6c71d.txt').&amp;nbsp; That's literally the only difference between the wizard-generated code, which works, and the code with the local file path, which doesn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas why my code isn't working?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Isn't working" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of&amp;nbsp;text pasted into a code box, the actual results and the expected results. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have an INFORMAT there should be no reason to repeat it on the INPUT statement.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jan 2019 22:58:23 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-01-17T22:58:23Z</dc:date>
    <item>
      <title>Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528149#M5359</link>
      <description>&lt;P&gt;I'm having a devil of a time doing something that should be really easy (and is really easy with other stats programs I've used, including R and Stata):&amp;nbsp; importing a comma-delimited file into SAS.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here're the first few lines from the file ("Intercensal_2000-2010_DBInput_csv.txt", a publicly available data &lt;A href="http://www.dof.ca.gov/Forecasting/Demographics/Estimates/Race-Ethnic/2000-2010/Intercensal_2000-2010_DBInput_csv.zip" target="_self"&gt;file&lt;/A&gt; from California's Department of Finance):&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;"CountyCode","CountyName","Year","RaceCode","RaceName","Gender","Age","Population"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",0,2701.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",1,2722.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",2,2707.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",3,2710.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",4,2888.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",5,2891.000000000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"01","Alameda",4/1/2000 0:00:00,"1","White","Female",6,2962.000000000&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully import them with this "proc import" code, but some fields (CountyName and RaceName) are truncated.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import datafile="[File Path]\Intercensal_2000-2010_DBInput_csv.txt" out=pop.population replace dbms=csv;
	delimiter = ",";
	getnames=yes;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My understanding is that using "infile" in a data statement gives me more flexibility in specifying informats, lengths, inputs, etc., but getting the right combination, dealing with the double quotation marks, and so on is also proving to be a hassle.&amp;nbsp; So I tried using the Data Import Wizard, and get exactly the right file,&amp;nbsp; However, I substitute this Wizard-generated code:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; INFILE 'C:[FilePath]\Local\Temp\SEG23860\Intercensal_2000-2010_DBInput_csv-e23e36cbe8d24b5d9fb12eca6ee6c71d.txt'
        LRECL=75
        ENCODING="WLATIN1"
        TERMSTR=CRLF
        DLM='7F'x
        MISSOVER
        DSD ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with this code, containing the local file path:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  INFILE "H:\[LocalFilePath]\Population\Intercensal_2000-2010_DBInput_csv.txt"
        LRECL=75
        ENCODING="WLATIN1"
        TERMSTR=CRLF
        DLM='7F'x
        MISSOVER
        DSD ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a SAS dataset with the correct number of rows and columns, and correctly-named variable headers, but all missing data.&amp;nbsp; What gives?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 20:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528149#M5359</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T20:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528150#M5360</link>
      <description>proc import datafile="[File Path]\Intercensal_2000-2010_DBInput_csv.txt" out=pop.population replace dbms=csv;&lt;BR /&gt;	delimiter = ",";&lt;BR /&gt;	getnames=yes;&lt;BR /&gt;guessingrows=100000;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Try that first.&lt;BR /&gt;It'll take longer.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jan 2019 20:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528150#M5360</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T20:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528151#M5361</link>
      <description>&lt;P&gt;Have no idea why, but worked like a charm!&amp;nbsp; Thanks, Reeza.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 20:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528151#M5361</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T20:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528154#M5362</link>
      <description>GUESSINGROWS option was added. That forces SAS to scan more lines before it determines the length and types for fields. In general, it's never a good idea to use PROC IMPORT because it guesses, and not always well. For text files, it's generally a good idea to write your data step and I'm guessing files from the gov have decent enough docs that would make that easy. But this is also a good way to get around quickly. I use this route only when it's a one time read. If I need to read a data set regularly, I'll write a data step.</description>
      <pubDate>Thu, 17 Jan 2019 20:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528154#M5362</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T20:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528157#M5363</link>
      <description>And INFILE only creates a connection to a data set, it doesn't read anything in, INPUT would be used to read the data. And usually the option would be TRUNCOVER not MISSOVER.</description>
      <pubDate>Thu, 17 Jan 2019 20:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528157#M5363</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T20:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528158#M5364</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I didn't post the complete code, which contains informats, input, statements, etc.&amp;nbsp; It's exactly the code generated by the import wizard, and just substitutes the correct local file path (infile "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt) for the temporary file path used by the wizard (INFILE 'C:\Users\DCrow\AppData\Local\Temp\SEG23860\Intercensal_2000-2010_DBInput_csv-e23e36cbe8d24b5d9fb12eca6ee6c71d.txt').&amp;nbsp; That's literally the only difference between the wizard-generated code, which works, and the code with the local file path, which doesn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why my code isn't working?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my complete code:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname pop "H:\EPICenter\Population";
data pop.pop2000_2010_2;
    LENGTH
        CountyCode         8
        CountyName       $ 13
        Year               8
        RaceCode           8
        RaceName         $ 16
        Gender           $ 6
        Age                8
        Population         8 ;
    FORMAT
        CountyCode       BEST2.
        CountyName       $CHAR13.
        Year             DATETIME18.
        RaceCode         BEST1.
        RaceName         $CHAR16.
        Gender           $CHAR6.
        Age              BEST3.
        Population       BEST16. ;
    INFORMAT
        CountyCode       BEST2.
        CountyName       $CHAR13.
        Year             DATETIME18.
        RaceCode         BEST1.
        RaceName         $CHAR16.
        Gender           $CHAR6.
        Age              BEST3.
        Population       BEST16. ;
    INFILE "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt"
        LRECL=75
        ENCODING="WLATIN1"
        TERMSTR=CRLF
        DLM='7F'x
        MISSOVER
        DSD ;
    INPUT
        CountyCode       : ?? BEST2.
        CountyName       : $CHAR13.
        Year             : ?? ANYDTDTM16.
        RaceCode         : ?? BEST1.
        RaceName         : $CHAR16.
        Gender           : $CHAR6.
        Age              : ?? BEST3.
        Population       : ?? COMMA16. ;
RUN;
*/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 21:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528158#M5364</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T21:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528162#M5365</link>
      <description>PROC IMPORT code worked? Is SAS on a Server there? If you're running that code, you'd have to be on local mode.</description>
      <pubDate>Thu, 17 Jan 2019 21:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528162#M5365</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T21:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528165#M5366</link>
      <description>Posting the log may help with telling you where the error is.&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Jan 2019 21:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528165#M5366</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T21:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528198#M5369</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241468"&gt;@dbcrow&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks.&amp;nbsp; I didn't post the complete code, which contains informats, input, statements, etc.&amp;nbsp; It's exactly the code generated by the import wizard, and just substitutes the correct local file path (infile "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt) for the temporary file path used by the wizard (INFILE 'C:\Users\DCrow\AppData\Local\Temp\SEG23860\Intercensal_2000-2010_DBInput_csv-e23e36cbe8d24b5d9fb12eca6ee6c71d.txt').&amp;nbsp; That's literally the only difference between the wizard-generated code, which works, and the code with the local file path, which doesn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas why my code isn't working?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Isn't working" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of&amp;nbsp;text pasted into a code box, the actual results and the expected results. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have an INFORMAT there should be no reason to repeat it on the INPUT statement.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 22:58:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528198#M5369</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-17T22:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528205#M5373</link>
      <description>&lt;P&gt;Thanks for this reply, ballardw.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll notice that in my original post, I was more specific about "not working." I get a SAS data file with the correct number of rows and columns, and correctly named variables, but missing data in all the cells.&amp;nbsp; I thought this description was sufficient to give an understanding of the problem, but here's a picture of the data set produced.&amp;nbsp; The following million rows are the same, but I trust the first ten are sufficient to see the problem with the outputted data set.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data_set.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26356i9236DDDE4A9EC3D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="data_set.png" alt="data_set.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's the code again.&amp;nbsp; Note that this exactly the code that the Import Wizard generated, except that the path file refers to a server drive instead of a temporary file on my local C: drive.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname pop "H:\EPICenter\Population";
data pop.pop2000_2010_2;
    LENGTH
        CountyCode         8
        CountyName       $ 13
        Year               8
        RaceCode           8
        RaceName         $ 16
        Gender           $ 6
        Age                8
        Population         8 ;
    FORMAT
        CountyCode       BEST2.
        CountyName       $CHAR13.
        Year             DATETIME18.
        RaceCode         BEST1.
        RaceName         $CHAR16.
        Gender           $CHAR6.
        Age              BEST3.
        Population       BEST16. ;
    INFORMAT
        CountyCode       BEST2.
        CountyName       $CHAR13.
        Year             DATETIME18.
        RaceCode         BEST1.
        RaceName         $CHAR16.
        Gender           $CHAR6.
        Age              BEST3.
        Population       BEST16. ;
    INFILE "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt"
        LRECL=75
        ENCODING="WLATIN1"
        TERMSTR=CRLF
        DLM='7F'x
        MISSOVER
        DSD ;
    INPUT
        CountyCode       : ?? BEST2.
        CountyName       : $CHAR13.
        Year             : ?? ANYDTDTM16.
        RaceCode         : ?? BEST1.
        RaceName         : $CHAR16.
        Gender           : $CHAR6.
        Age              : ?? BEST3.
        Population       : ?? COMMA16. ;
RUN;&lt;/PRE&gt;&lt;P&gt;And here's the complete log:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                            13:59 Tuesday, January 15, 2019

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='H:\EPICenter\Population\2000_2009_pop.egp';
6          %LET _CLIENTPROJECTPATHHOST='CDI1542D6018062';
7          %LET _CLIENTPROJECTNAME='2000_2009_pop.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18             GPATH=&amp;amp;sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22         
23         GOPTIONS ACCESSIBLE;
24         libname pop "H:\EPICenter\Population";
NOTE: Libref POP was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: H:\EPICenter\Population
25         data pop.pop2000_2010_2;
26             LENGTH
27                 CountyCode         8
28                 CountyName       $ 13
29                 Year               8
30                 RaceCode           8
31                 RaceName         $ 16
32                 Gender           $ 6
33                 Age                8
34                 Population         8 ;
35             FORMAT
36                 CountyCode       BEST2.
37                 CountyName       $CHAR13.
38                 Year             DATETIME18.
39                 RaceCode         BEST1.
40                 RaceName         $CHAR16.
41                 Gender           $CHAR6.
42                 Age              BEST3.
43                 Population       BEST16. ;
44             INFORMAT
45                 CountyCode       BEST2.
46                 CountyName       $CHAR13.
47                 Year             DATETIME18.
48                 RaceCode         BEST1.
49                 RaceName         $CHAR16.
50                 Gender           $CHAR6.
51                 Age              BEST3.
52                 Population       BEST16. ;
53             INFILE "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt"
54                 LRECL=75
2                                                          The SAS System                            13:59 Tuesday, January 15, 2019

55                 ENCODING="WLATIN1"
56                 TERMSTR=CRLF
57                 DLM='7F'x
58                 MISSOVER
59                 DSD ;
60             INPUT
61                 CountyCode       : ?? BEST2.
62                 CountyName       : $CHAR13.
63                 Year             : ?? ANYDTDTM16.
64                 RaceCode         : ?? BEST1.
65                 RaceName         : $CHAR16.
66                 Gender           : $CHAR6.
67                 Age              : ?? BEST3.
68                 Population       : ?? COMMA16. ;
69         RUN;

NOTE: The infile "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt" is:
      Filename=H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt,
      RECFM=V,LRECL=75,File Size (bytes)=73342782,
      Last Modified=19Mar2013:10:37:42,
      Create Time=19Mar2013:10:37:42

NOTE: 1001109 records were read from the infile "H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt".
      The minimum record length was 61.
      The maximum record length was 75.
      One or more lines were truncated.
NOTE: The data set POP.POP2000_2010_2 has 1001109 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           2.10 seconds
      cpu time            0.60 seconds
      

70         */
71         
72         GOPTIONS NOACCESSIBLE;
73         %LET _CLIENTTASKLABEL=;
74         %LET _CLIENTPROCESSFLOWNAME=;
75         %LET _CLIENTPROJECTPATH=;
76         %LET _CLIENTPROJECTPATHHOST=;
77         %LET _CLIENTPROJECTNAME=;
78         %LET _SASPROGRAMFILE=;
79         %LET _SASPROGRAMFILEHOST=;
80         
81         ;*';*";*/;quit;run;
82         ODS _ALL_ CLOSE;
83         
84         
85         QUIT; RUN;
86         &lt;/PRE&gt;&lt;P&gt;I don't know how to interpret this log file well enough to know what the problem is.&amp;nbsp; Maybe it has to do with "one or more lines are truncated," but that doesn't tell me much.&amp;nbsp; Maybe it tells you more!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the clarification on INFORMATS and INPUTS.&amp;nbsp; As I say, I'm just using the code generated by the import wizard.&amp;nbsp; Maybe I'll streamline it once I get it to work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, I'd appreciate any advice you could give.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528205#M5373</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T23:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528206#M5374</link>
      <description>&lt;P&gt;Reeza-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just posted the log in reply to ballardw.&amp;nbsp; I'd appreciate any further help you could give.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528206#M5374</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T23:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528208#M5375</link>
      <description>&lt;P&gt;Yes, SAS is on a server.&amp;nbsp; Let me look into local mode--although, to be accurate, the file I'm trying to read in is on H:\, a server drive.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528208#M5375</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T23:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528210#M5376</link>
      <description>&lt;PRE&gt;      data WORK.WANT    ;


      infile 'H:\EPICenter\Population\Intercensal_2000-2010_DBInput_csv.txt' delimiter = ',' TRUNCOVER DSD lrecl=100 firstobs=2  termstr=CRLF encoding="WLATIN1";
         informat CountyCode $4. ;
         informat CountyName $11. ;
         informat Year anydtdtm40. ;
         informat RaceCode $3. ;
         informat RaceName $18. ;
         informat Gender $8. ;
         informat Age best32. ;
         informat Population best32. ;
         format CountyCode $4. ;
         format CountyName $11. ;
         format Year datetime. ;
         format RaceCode $3. ;
         format RaceName $18. ;
         format Gender $8. ;
         format Age best12. ;
         format Population best12. ;
      input
                  CountyCode  $
                  CountyName  $
                  Year
                  RaceCode  $
                  RaceName  $
                  Gender  $
                  Age
                  Population
      ;

      run;
&lt;/PRE&gt;
&lt;P&gt;What happens with this code?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528210#M5376</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-17T23:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528213#M5378</link>
      <description>&lt;P&gt;Totally works.&amp;nbsp; Was it adding "truncover" instead of "missover"?&amp;nbsp; Also, what lines in the log pointed out the error?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the hand-holding.&amp;nbsp; I'm still learning the ropes in SAS, so explicit orientation really helps me understand a lot of the steps that more experienced SAS users take for granted.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 23:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528213#M5378</guid>
      <dc:creator>dbcrow</dc:creator>
      <dc:date>2019-01-17T23:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528355#M5406</link>
      <description>I downloaded the file and looked at the documentation to determine how to read your file. I didn't really look at your code to see it does/doesn't work, but the colons and '07' confused me though I suppose EG generates it that way.</description>
      <pubDate>Fri, 18 Jan 2019 16:07:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528355#M5406</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-18T16:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528366#M5409</link>
      <description>&lt;P&gt;I was very surprised to generated code with&amp;nbsp; dlm='7F'x.&amp;nbsp; That character is sometimes referred to as a delete character and not very displayable. I would not be surprised to find out that however that got into the code as a delimiter that the body of the data did not actually have those characters between fields. Which would mean that none of the variable would be read correctly and all the variables blank as shown. That you marked &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s solution as correct where hers used a comma for the delimiter is an indication that may be a major player in this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be tempted to send the file, the generated code and the options you used in the Wizard to tech support to see if they can determine what happened.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thing is ?? suppresses data error messages. It is possible that removing the ?? might have created some messages that indicate something related to what is happening.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 16:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528366#M5409</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-01-18T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problems Importing Text File; Wizard-Generated Code Doesn't Work When Modifying Path File</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528372#M5410</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;A question from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130467"&gt;@Liz_Perkin&lt;/a&gt;&amp;nbsp;seems to have generated very similar code using EG again. I wonder if SAS made a change somewhere that isn't generating correct code in M6? or EG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/241468"&gt;@dbcrow&lt;/a&gt;&amp;nbsp;I would definitely consider sending this to SAS Tech Support.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 16:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problems-Importing-Text-File-Wizard-Generated-Code-Doesn-t-Work/m-p/528372#M5410</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-18T16:38:20Z</dc:date>
    </item>
  </channel>
</rss>

