<?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: Using PROC IMPORT to generate DATA step syntax in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299590#M63208</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;Thanks for the assistance. I'm not sure what this means:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;"DOS/Windows" or "UNIX" in the status line&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some sample data from the .csv file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CPSC_Case_no,trmt_date,psu,weight,stratum,age,sex,race,race_other,diag,diag_other,body_part,disposition,location,fmv,prod1,prod2,narr1,narr2,new_var_1,new_var_2 151260474,42363,8,4.9655,C,12,1,1,,59,,76,1,4,0,550,,"12YOM RESTRAINED BACK PASSENGER, HIS CAR T-BONED ANOTHER CAR, HIT FACE",ON CELL PHONE; EYELID LAC.,cell phone, 160211064,42361,90,4.9655,C,10,1,3,HISPANIC,71,SUBCONJ. HEMORRHAGE,77,1,0,0,550,4057,"10 YOM WAS LAYING DOWN WHEN A ""BIG"" CELL PHONE FELL OFF A TABLE &amp;amp; HIT",HIM IN THE LT. EYE -HEMORRHAGE IN EYEBALL.DX; SUBCONJUNCTIVAL HEMORRHAG,cell phone, 151254433,42360,32,4.9655,C,209,1,0,,59,,88,1,0,0,550,,"9 MOM PLAYING WITH DADS CELL PHONE, HIT HIMSELF IN THE MOUTH WITH IT DX",LACERATION TO GUM,cell phone, 151251194,42359,50,74.8813,L,20,2,0,,53,,75,1,1,0,550,4056,"20 YOF HEAD CONTUSION, LOOKING DOWN AT HER PHONE WHEN SHE TURNED HER HE","AD HITTING COAT RACK, NO LOC",0, 151246366,42358,78,97.9239,M,18,1,2,,71,GSW,92,1,1,0,550,,"18 YOM INJURED FINGER,SHOT FINGER WHILE TALKING ON PHONE,2 DAYS AGO.","DX-FRACTURE MIDDLE FINGER,HEALING GSW",0, 151248259,42357,32,4.9655,C,8,1,2,,57,,76,1,4,0,550,,"8 YOM RESTRAINED BACKSEAT OF CAR, MOM DRIVING TALKING ON PHONE LOST CO","NTROL HIT TELEPHONE POLE, PT HIT FACE OF SIBS CARSEAT DX NASAL FRACTURE",0,likely cell 151244167,42356,67,16.565,V,20,1,0,,59,,76,1,1,0,550,,20YOM LAC TO FOREHEAD AFTER FRIEND THREW CELL PHONE AT HIM. BLDG ATTENU,ATED AT HOME: DX LAC FOREHEAD,cell phone, 160119975,42355,8,4.9655,C,15,1,1,,71,NASAL INJURY,76,1,2,0,1893,550,"15YOM WAS LOOKING DOWN WHILE TEXTING, THE BARN DOOR SWUNG OPEN HITTING","HIM IN FACE YESTERDAY, INCREASED PAIN TODAY; NASAL INJURY",texting, 151245016,42351,8,4.9655,C,204,2,1,,62,,75,1,0,0,550,,4MOF HIT ON HEAD WHEN 2YO SIBLING THREW A CELL PHONE WHILE HAVING A TRA,NTRUM; HEAD INJURY,cell phone, 151232122,42351,61,16.565,V,202,2,3,UNKNOWN,53,,76,1,1,0,550,,2 MOF HIT ON THE FOREHEAD BY A CELL PHONE THAT HAD BEEN THROWN BY HER,"BROTHER, DX: CONTUSION OF FOREHEAD",cell phone,&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2016 16:00:13 GMT</pubDate>
    <dc:creator>_maldini_</dc:creator>
    <dc:date>2016-09-20T16:00:13Z</dc:date>
    <item>
      <title>Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299422#M63144</link>
      <description>&lt;P&gt;In the past I have used PROC IMPORT simply as a way of generating the DATA step syntax for reading a dataset into SAS. In other words, I would run PROC IMPORT and then copy and paste the underlying DATA step syntax from the log, and then change LENGTH, INFORMATS, etc. as needed. It was a shortcut for the DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The underlying syntax&amp;nbsp;no longer appears in the log. Am I missing something? Did this change recently?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm runnning SAS University Edition.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 01:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299422#M63144</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T01:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299424#M63145</link>
      <description>&lt;P&gt;I'm pretty sure you can only do this with delimited file imports. What type of file are you importing?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 02:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299424#M63145</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-09-20T02:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299432#M63150</link>
      <description>&lt;P&gt;Well...I'm trying to read-in a .csv file, but I'm getting the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Unable to sample external file, no data in first 5 records.&amp;nbsp;ERROR: Import unsuccessful. See SAS Log for details."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC IMPORT DATAFILE="/folders/myshortcuts/NEISS_Cell_Phone_Project/NEISS_2002_2015.csv"
    OUT=NEISS_2002_2015
    DBMS=csv
    replace;
    getnames=yes;
RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There IS data in the first 5 rows. Including when looking at the file in a text editor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a work around, I tried importing an Excel file. I was then going to take the syntax from the log to write my own DATA step to apply LENGTH, INFORMAT, etc.&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>Tue, 20 Sep 2016 03:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299432#M63150</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T03:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299435#M63151</link>
      <description>Try Adding  guessingrows=32767 option .</description>
      <pubDate>Tue, 20 Sep 2016 03:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299435#M63151</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-09-20T03:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299437#M63153</link>
      <description>Try adding datarow=5 option .</description>
      <pubDate>Tue, 20 Sep 2016 04:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299437#M63153</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-09-20T04:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299441#M63155</link>
      <description>&lt;P&gt;SAS UE is a UNIX install. This seems to come up when the end of line character is different than expected. Try setting the TERMSTR OPTION. The values are CRLF/LF/CR.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/14/178.html" target="_blank"&gt;http://support.sas.com/kb/14/178.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299441#M63155</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-20T04:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299445#M63159</link>
      <description>&lt;P&gt;Ask SAS to show you want is in the file. For example this simple data step will write the first 5 rows to the log. And if any line has non-printable charactrers you will see the hex codes for the characters printed under them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "/folders/myshortcuts/NEISS_Cell_Phone_Project/NEISS_2002_2015.csv" obs=5;
  input;
  list;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299445#M63159</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-20T04:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299447#M63161</link>
      <description>&lt;P&gt;I've used this option in a DATA step, but not a PROC IMPORT. Where exactly does it go?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasSource"&gt;PROC IMPORT DATAFILE="/folders/myshortcuts/NEISS_Cell_Phone_Project/NEISS_2002_2015.csv" TERMSTR=CR&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;_______&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;76&lt;/DIV&gt;
&lt;DIV id="sasLogError1_1474347026725" class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;_DEBUG_.&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299447#M63161</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T04:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299448#M63162</link>
      <description>&lt;P&gt;I saw your prior post (2014?) on this and tried that approach. No luck. Same error message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Unable to sample external file, no data in first 5 records."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299448#M63162</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T04:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299449#M63163</link>
      <description>&lt;P&gt;Same error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299449#M63163</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T04:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299450#M63164</link>
      <description>&lt;P&gt;This seems to read in the entire dataset as 1 row...Hmm...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="sasLogNote2_1474347304319" class="sasNote"&gt;NOTE: 1 record was read from the infile "/folders/myshortcuts/NEISS_Cell_Phone_Project/NEISS_2002_2015.csv".&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;The minimum record length was 32767.&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;The maximum record length was 32767.&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;One or more lines were truncated.&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12995i1CC2C8A104D1B8FA/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="SAS_Studio.jpg" title="SAS_Studio.jpg" /&gt;</description>
      <pubDate>Tue, 20 Sep 2016 04:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299450#M63164</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T04:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299458#M63165</link>
      <description>&lt;P&gt;99% sure TERMSTR is the solution.&lt;/P&gt;
&lt;P&gt;Declare a fileref for your file with with the option and then use that with Proc import.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I answered this within the last week...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Filename myfile 'path to csv.csv' TERMSTR=CR;

Proc import out =want datafile=myfile DBMS=CSV replace; *rest of options;
Run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 06:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299458#M63165</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-20T06:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299459#M63166</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;This seems to read in the entire dataset as 1 row...Hmm...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="sasLogNote2_1474347304319" class="sasNote"&gt;NOTE: 1 record was read from the infile "/folders/myshortcuts/NEISS_Cell_Phone_Project/NEISS_2002_2015.csv".&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;The minimum record length was 32767.&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;The maximum record length was 32767.&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;One or more lines were truncated.&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That was the point - import whole line to help debug the issue and determine what SAS is 'seeing'.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 06:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299459#M63166</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-20T06:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299469#M63173</link>
      <description>&lt;P&gt;Use one of the better text tools (eg notepad++) to inspect the csv file. It allows you to see how lines are ended ("DOS/Windows" or "UNIX" in the status line), display special characters, and you can even view your file in HEX mode.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 07:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299469#M63173</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-09-20T07:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299493#M63180</link>
      <description>&lt;PRE&gt;
That is really weird . Maybe your file is stream file(don't have line break character).
Can you post some sample file here? we can check what is going on .

&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Sep 2016 09:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299493#M63180</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-09-20T09:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299589#M63207</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CPSC_Case_no,trmt_date,psu,weight,stratum,age,sex,race,race_other,diag,diag_other,body_part,disposition,location,fmv,prod1,prod2,narr1,narr2,new_var_1,new_var_2 151260474,42363,8,4.9655,C,12,1,1,,59,,76,1,4,0,550,,"12YOM RESTRAINED BACK PASSENGER, HIS CAR T-BONED ANOTHER CAR, HIT FACE",ON CELL PHONE; EYELID LAC.,cell phone, 160211064,42361,90,4.9655,C,10,1,3,HISPANIC,71,SUBCONJ. HEMORRHAGE,77,1,0,0,550,4057,"10 YOM WAS LAYING DOWN WHEN A ""BIG"" CELL PHONE FELL OFF A TABLE &amp;amp; HIT",HIM IN THE LT. EYE -HEMORRHAGE IN EYEBALL.DX; SUBCONJUNCTIVAL HEMORRHAG,cell phone, 151254433,42360,32,4.9655,C,209,1,0,,59,,88,1,0,0,550,,"9 MOM PLAYING WITH DADS CELL PHONE, HIT HIMSELF IN THE MOUTH WITH IT DX",LACERATION TO GUM,cell phone, 151251194,42359,50,74.8813,L,20,2,0,,53,,75,1,1,0,550,4056,"20 YOF HEAD CONTUSION, LOOKING DOWN AT HER PHONE WHEN SHE TURNED HER HE","AD HITTING COAT RACK, NO LOC",0, 151246366,42358,78,97.9239,M,18,1,2,,71,GSW,92,1,1,0,550,,"18 YOM INJURED FINGER,SHOT FINGER WHILE TALKING ON PHONE,2 DAYS AGO.","DX-FRACTURE MIDDLE FINGER,HEALING GSW",0, 151248259,42357,32,4.9655,C,8,1,2,,57,,76,1,4,0,550,,"8 YOM RESTRAINED BACKSEAT OF CAR, MOM DRIVING TALKING ON PHONE LOST CO","NTROL HIT TELEPHONE POLE, PT HIT FACE OF SIBS CARSEAT DX NASAL FRACTURE",0,likely cell 151244167,42356,67,16.565,V,20,1,0,,59,,76,1,1,0,550,,20YOM LAC TO FOREHEAD AFTER FRIEND THREW CELL PHONE AT HIM. BLDG ATTENU,ATED AT HOME: DX LAC FOREHEAD,cell phone, 160119975,42355,8,4.9655,C,15,1,1,,71,NASAL INJURY,76,1,2,0,1893,550,"15YOM WAS LOOKING DOWN WHILE TEXTING, THE BARN DOOR SWUNG OPEN HITTING","HIM IN FACE YESTERDAY, INCREASED PAIN TODAY; NASAL INJURY",texting, 151245016,42351,8,4.9655,C,204,2,1,,62,,75,1,0,0,550,,4MOF HIT ON HEAD WHEN 2YO SIBLING THREW A CELL PHONE WHILE HAVING A TRA,NTRUM; HEAD INJURY,cell phone, 151232122,42351,61,16.565,V,202,2,3,UNKNOWN,53,,76,1,1,0,550,,2 MOF HIT ON THE FOREHEAD BY A CELL PHONE THAT HAD BEEN THROWN BY HER,"BROTHER, DX: CONTUSION OF FOREHEAD",cell phone,&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 15:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299589#M63207</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T15:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299590#M63208</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;Thanks for the assistance. I'm not sure what this means:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;"DOS/Windows" or "UNIX" in the status line&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some sample data from the .csv file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CPSC_Case_no,trmt_date,psu,weight,stratum,age,sex,race,race_other,diag,diag_other,body_part,disposition,location,fmv,prod1,prod2,narr1,narr2,new_var_1,new_var_2 151260474,42363,8,4.9655,C,12,1,1,,59,,76,1,4,0,550,,"12YOM RESTRAINED BACK PASSENGER, HIS CAR T-BONED ANOTHER CAR, HIT FACE",ON CELL PHONE; EYELID LAC.,cell phone, 160211064,42361,90,4.9655,C,10,1,3,HISPANIC,71,SUBCONJ. HEMORRHAGE,77,1,0,0,550,4057,"10 YOM WAS LAYING DOWN WHEN A ""BIG"" CELL PHONE FELL OFF A TABLE &amp;amp; HIT",HIM IN THE LT. EYE -HEMORRHAGE IN EYEBALL.DX; SUBCONJUNCTIVAL HEMORRHAG,cell phone, 151254433,42360,32,4.9655,C,209,1,0,,59,,88,1,0,0,550,,"9 MOM PLAYING WITH DADS CELL PHONE, HIT HIMSELF IN THE MOUTH WITH IT DX",LACERATION TO GUM,cell phone, 151251194,42359,50,74.8813,L,20,2,0,,53,,75,1,1,0,550,4056,"20 YOF HEAD CONTUSION, LOOKING DOWN AT HER PHONE WHEN SHE TURNED HER HE","AD HITTING COAT RACK, NO LOC",0, 151246366,42358,78,97.9239,M,18,1,2,,71,GSW,92,1,1,0,550,,"18 YOM INJURED FINGER,SHOT FINGER WHILE TALKING ON PHONE,2 DAYS AGO.","DX-FRACTURE MIDDLE FINGER,HEALING GSW",0, 151248259,42357,32,4.9655,C,8,1,2,,57,,76,1,4,0,550,,"8 YOM RESTRAINED BACKSEAT OF CAR, MOM DRIVING TALKING ON PHONE LOST CO","NTROL HIT TELEPHONE POLE, PT HIT FACE OF SIBS CARSEAT DX NASAL FRACTURE",0,likely cell 151244167,42356,67,16.565,V,20,1,0,,59,,76,1,1,0,550,,20YOM LAC TO FOREHEAD AFTER FRIEND THREW CELL PHONE AT HIM. BLDG ATTENU,ATED AT HOME: DX LAC FOREHEAD,cell phone, 160119975,42355,8,4.9655,C,15,1,1,,71,NASAL INJURY,76,1,2,0,1893,550,"15YOM WAS LOOKING DOWN WHILE TEXTING, THE BARN DOOR SWUNG OPEN HITTING","HIM IN FACE YESTERDAY, INCREASED PAIN TODAY; NASAL INJURY",texting, 151245016,42351,8,4.9655,C,204,2,1,,62,,75,1,0,0,550,,4MOF HIT ON HEAD WHEN 2YO SIBLING THREW A CELL PHONE WHILE HAVING A TRA,NTRUM; HEAD INJURY,cell phone, 151232122,42351,61,16.565,V,202,2,3,UNKNOWN,53,,76,1,1,0,550,,2 MOF HIT ON THE FOREHEAD BY A CELL PHONE THAT HAD BEEN THROWN BY HER,"BROTHER, DX: CONTUSION OF FOREHEAD",cell phone,&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 16:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299590#M63208</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-09-20T16:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299598#M63212</link>
      <description>&lt;P&gt;It may be better to post an attachment made from the source file as txt. Pasting things into the forum changes the content by inserting html tags and such an is likely to lose certain types of characters.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 16:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299598#M63212</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-20T16:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299602#M63215</link>
      <description>&lt;P&gt;No end of line characters appear in the posting, but this website might have removed them in the posting.&lt;/P&gt;
&lt;P&gt;Did you try using the LIST statement to see what is in your data?&lt;/P&gt;
&lt;P&gt;Here is a simple program to demonstrate what you should see in normal text files with either CR+LF, LF or CR as the end of line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename test1 temp;
filename test2 temp;
filename test3 temp;
data _null_;
  file test1 recfm=n ;
  put 'Uses CR+LF' '0D0A'x 'Between lines.' '0D0A'x ;
  file test2 recfm=n ;
  put 'Uses LF' '0A'x 'Between lines.' '0A'x ;
  file test3 recfm=n ;
  put 'Uses CR' '0D'x 'Between lines.' '0D'x ;    
run;
data _null_;
  infile test1 recfm=f ;
  input; list;
  infile test2 recfm=f ;
  input; list;
  infile test3 recfm=f ;
  input; list;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is the result of this test program.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; RULE:     ----+----1----+----2----+----3----+----4----+----5
 
 1   CHAR  Uses CR+LF..Between lines... 28
     ZONE  5767245244004677666266667200
     NUMR  5353032BC6DA254755E0C9E53EDA
 
 1   CHAR  Uses LF.Between lines.. 23
     ZONE  57672440467766626666720
     NUMR  53530C6A254755E0C9E53EA
 
 1   CHAR  Uses CR.Between lines.. 23
     ZONE  57672450467766626666720
     NUMR  5353032D254755E0C9E53ED&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For your file what do you see as the ZONE and NUMR values for the character bwteen&amp;nbsp;"new_var_2" and "151260474" ?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 16:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299602#M63215</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-20T16:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC IMPORT to generate DATA step syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299637#M63225</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/36911"&gt;@_maldini_﻿&lt;/a&gt;&amp;nbsp;The code I provided didn't work? If not, can you post the log? Also, try with LF/CRLF instead of CR &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Filename myfile 'path to csv.csv' TERMSTR=CR;

Proc import out =want datafile=myfile DBMS=CSV replace; *rest of options;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Sep 2016 19:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-IMPORT-to-generate-DATA-step-syntax/m-p/299637#M63225</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-20T19:12:27Z</dc:date>
    </item>
  </channel>
</rss>

