<?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: PROC IMPORT, txt file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64678#M18382</link>
    <description>Honestly, I would consider this to be a limit/defect for PROC IMPORT -- one that you may want to pursue with SAS Tech Support by opening a track. At least get it logged with them that you are dissatisfied with the PROC IMPORT handling of column data greater than 500 characters.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Fri, 05 Dec 2008 16:23:35 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-12-05T16:23:35Z</dc:date>
    <item>
      <title>PROC IMPORT, txt file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64674#M18378</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to import a text file where some of the records for a variable are more than 700 characters long.&lt;BR /&gt;
Proc import procedure is setting a length of 500 for that variable and my output dataset has those records being cut-off at 500th character.&lt;BR /&gt;
&lt;BR /&gt;
Is there any way to solve this without adding a data step to the proc import??&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance</description>
      <pubDate>Fri, 05 Dec 2008 12:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64674#M18378</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-05T12:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT, txt file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64675#M18379</link>
      <description>Depending on your SAS version, there is a GUESSINGROWS= option, if you want SAS to interrogate more than the default number of rows.  The SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;   has product DOC and technical paper resources, and a SEARCH facility to find topic related info.  I have provided a few links below to related items from the support site.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/1/075.html" target="_blank"&gt;http://support.sas.com/kb/1/075.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi30/038-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/038-30.pdf&lt;/A&gt;</description>
      <pubDate>Fri, 05 Dec 2008 13:44:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64675#M18379</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-12-05T13:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT, txt file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64676#M18380</link>
      <description>Dear Scott,&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot for the reply..&lt;BR /&gt;
&lt;BR /&gt;
I used the option GUESSINGROWS=50 (my dataset has only 25 observations),&lt;BR /&gt;
but it didn't work out. &lt;BR /&gt;
&lt;BR /&gt;
I used the following code that was generated by PROC IMPORT:&lt;BR /&gt;
&lt;BR /&gt;
 data TS                                         ;&lt;BR /&gt;
2269      %let _EFIERR_ = 0; /* set the ERROR detection macro variable */&lt;BR /&gt;
2270      infile 'P:\DVL_0865\Mapping\1160_0025\Trial_design_1160-0025.txt' delimiter='09'x MISSOVER DSD lrecl=32767 firstobs=2 ;&lt;BR /&gt;
2271         informat STUDYID $9. ;&lt;BR /&gt;
2272         informat DOMAIN $2. ;&lt;BR /&gt;
2273         informat TSSEQ best32. ;&lt;BR /&gt;
2274         informat TSPARMCD $10. ;&lt;BR /&gt;
2275         informat TSPARM $46. ;&lt;BR /&gt;
2276         informat TSVAL $500. ;&lt;BR /&gt;
2277         format STUDYID $9. ;&lt;BR /&gt;
2278         format DOMAIN $2. ;&lt;BR /&gt;
2279         format TSSEQ best12. ;&lt;BR /&gt;
2280         format TSPARMCD $10. ;&lt;BR /&gt;
2281         format TSPARM $46. ;&lt;BR /&gt;
2282         format TSVAL $500. ;&lt;BR /&gt;
2283      input&lt;BR /&gt;
2284                  STUDYID $&lt;BR /&gt;
2285                  DOMAIN $&lt;BR /&gt;
2286                  TSSEQ&lt;BR /&gt;
2287                  TSPARMCD $&lt;BR /&gt;
2288                  TSPARM $&lt;BR /&gt;
2289                  TSVAL $&lt;BR /&gt;
2290      ;&lt;BR /&gt;
2291      if _ERROR_ then call symputx('_EFIERR_',1);  /* set ERROR detection macro variable */&lt;BR /&gt;
2292      run;&lt;BR /&gt;
&lt;BR /&gt;
For the variable TSVAL , I need the length to be 700. &lt;BR /&gt;
I've copied the above program and changed the format and informat for TSVAL and it worked..&lt;BR /&gt;
&lt;BR /&gt;
Is there any way that I can do this in PROC IMPORT STEP without adding the datastep. This is beacause, we are using the proc import step in a macro and we didn't want to have the set of variables that are in the data step.&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot</description>
      <pubDate>Fri, 05 Dec 2008 14:14:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64676#M18380</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-05T14:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT, txt file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64677#M18381</link>
      <description>sorry,&lt;BR /&gt;
I think the short answer is&lt;BR /&gt;
No&lt;BR /&gt;
&lt;BR /&gt;
It's not a feature of proc import from a text file.&lt;BR /&gt;
&lt;BR /&gt;
If you have predictable problems like that 500/700, then you probably have enough information to define the max column lengths and any special informats to be used like dates. With that information your macro needs only define which layout type is relevant and apply that.&lt;BR /&gt;
&lt;BR /&gt;
good Luck&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 05 Dec 2008 16:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64677#M18381</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2008-12-05T16:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT, txt file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64678#M18382</link>
      <description>Honestly, I would consider this to be a limit/defect for PROC IMPORT -- one that you may want to pursue with SAS Tech Support by opening a track. At least get it logged with them that you are dissatisfied with the PROC IMPORT handling of column data greater than 500 characters.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 05 Dec 2008 16:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-txt-file/m-p/64678#M18382</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-12-05T16:23:35Z</dc:date>
    </item>
  </channel>
</rss>

