<?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: Put statement problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74674#M16080</link>
    <description>Likely your SAS log reveals warnings, possibly error msgs, related to what you are seeing (or not in this case).&lt;BR /&gt;
&lt;BR /&gt;
Suggest you simplify your SAS program - there is no need for two DATA steps, also you can use a PUT _INFILE_;   statement, coded after your INPUT statement in your first DATA step -- eliminating the need for any additional code.  And your first DATA step can specify _NULL_ instead of a SAS dataset since you are reading and writing the external file without needing to create a SAS file.  Also, if you are not intending to re-format the file, then the INPUT statement can be simplified to   INPUT ;   (no SAS variables input).&lt;BR /&gt;
&lt;BR /&gt;
Confirm some information though, such as what OS platform where the external file resides?&lt;BR /&gt;
&lt;BR /&gt;
And if you must re-post a reply, provide your exact SAS log output (with COPY and PASTE) while revealing all SAS code and SAS-generated messages.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.

Message was edited by: sbb</description>
    <pubDate>Fri, 09 Apr 2010 19:15:14 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-04-09T19:15:14Z</dc:date>
    <item>
      <title>Put statement problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74673#M16079</link>
      <description>I try to do a quick and dirty extract of portions from a huge flat file and write out to &lt;BR /&gt;
another file with the same position using the following code.&lt;BR /&gt;
&lt;BR /&gt;
DATA ONE;&lt;BR /&gt;
 INFILE INF TRUNCOVER;&lt;BR /&gt;
   INPUT VAR1 $ 127-165&lt;BR /&gt;
         VAR2 $ 265-434&lt;BR /&gt;
         VAR3 $ 457-507&lt;BR /&gt;
         VAR4 $ 527-597&lt;BR /&gt;
         VAR5 $ 660-860&lt;BR /&gt;
         VAR6 $ 861-1060&lt;BR /&gt;
         VAR7 $ 1061-1207&lt;BR /&gt;
                ;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA _NULL_ ;&lt;BR /&gt;
 SET ONE;&lt;BR /&gt;
  FILE OUTC ;&lt;BR /&gt;
     PUT VAR1 127-165&lt;BR /&gt;
         VAR2 265-434&lt;BR /&gt;
         VAR3 457-507&lt;BR /&gt;
         VAR4 527-597&lt;BR /&gt;
         VAR5 660-860&lt;BR /&gt;
         VAR6 861-1060&lt;BR /&gt;
         VAR7 1061-1207&lt;BR /&gt;
          ;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
However, there is nothing in the output file. Can anyone offer some tips why this is not writing out and how to resolve this porblem, ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 09 Apr 2010 18:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74673#M16079</guid>
      <dc:creator>Kwok</dc:creator>
      <dc:date>2010-04-09T18:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Put statement problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74674#M16080</link>
      <description>Likely your SAS log reveals warnings, possibly error msgs, related to what you are seeing (or not in this case).&lt;BR /&gt;
&lt;BR /&gt;
Suggest you simplify your SAS program - there is no need for two DATA steps, also you can use a PUT _INFILE_;   statement, coded after your INPUT statement in your first DATA step -- eliminating the need for any additional code.  And your first DATA step can specify _NULL_ instead of a SAS dataset since you are reading and writing the external file without needing to create a SAS file.  Also, if you are not intending to re-format the file, then the INPUT statement can be simplified to   INPUT ;   (no SAS variables input).&lt;BR /&gt;
&lt;BR /&gt;
Confirm some information though, such as what OS platform where the external file resides?&lt;BR /&gt;
&lt;BR /&gt;
And if you must re-post a reply, provide your exact SAS log output (with COPY and PASTE) while revealing all SAS code and SAS-generated messages.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.

Message was edited by: sbb</description>
      <pubDate>Fri, 09 Apr 2010 19:15:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74674#M16080</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-04-09T19:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Put statement problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74675#M16081</link>
      <description>Thanks Scott, you idea works.</description>
      <pubDate>Mon, 12 Apr 2010 12:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Put-statement-problem/m-p/74675#M16081</guid>
      <dc:creator>Kwok</dc:creator>
      <dc:date>2010-04-12T12:51:33Z</dc:date>
    </item>
  </channel>
</rss>

