<?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: How to add carriage return at the end of a put statement ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65106#M14130</link>
    <description>Thanks very much for your recommendation. It works !</description>
    <pubDate>Tue, 18 Aug 2009 17:56:02 GMT</pubDate>
    <dc:creator>Kwok</dc:creator>
    <dc:date>2009-08-18T17:56:02Z</dc:date>
    <item>
      <title>How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65101#M14125</link>
      <description>We are trying to write a SAS dataset in MVS to a PC txt file through the filename ftp&lt;BR /&gt;
method as follows:&lt;BR /&gt;
&lt;BR /&gt;
 FILENAME OUTIT FTP "FILE.TXT"  HOST='xxx-xxx-xxx'    CD="\PATH"    USER='ANONYMOUS'    PASS=  "&amp;amp;PASS"   RECFM=FB LRECL=240 ENCODING=ASCII ;&lt;BR /&gt;
&lt;BR /&gt;
DATA _NULL_ ;&lt;BR /&gt;
&lt;BR /&gt;
  SET SASDATA ;&lt;BR /&gt;
    FILE OUTIT ENCODING=ASCII LINESIZE=240 ;&lt;BR /&gt;
&lt;BR /&gt;
    PUT&lt;BR /&gt;
 ...... ;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
The process works and the log shows the correct line output to the pc file. But when I browse the output with word pad, it concatenate the file into 1 long line.  Looks like the carriage return is missing from each line. Does anybody have any idea how to write out a carriage return at the each line ?&lt;BR /&gt;
&lt;BR /&gt;
I realized there are other ways to skin this cat but this is part of a macro that is writing out to different platforms and we are trying to avoid another JCL or data step.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all your help.&lt;BR /&gt;
&lt;BR /&gt;
Kwok</description>
      <pubDate>Tue, 18 Aug 2009 11:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65101#M14125</guid>
      <dc:creator>Kwok</dc:creator>
      <dc:date>2009-08-18T11:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65102#M14126</link>
      <description>As I understand it, this is a Windows NotePad problem.  The data structure is correct.  As a circumvention, open the file with WordPad, and if you save the file once, then you can open it with NotePad after.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 18 Aug 2009 13:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65102#M14126</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-18T13:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65103#M14127</link>
      <description>Hello Scott,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your info. But my problem is with word pad. The word pad put all the line without carriage return. Note pad looks aweful too. Any other idea ?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Kwok</description>
      <pubDate>Tue, 18 Aug 2009 15:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65103#M14127</guid>
      <dc:creator>Kwok</dc:creator>
      <dc:date>2009-08-18T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65104#M14128</link>
      <description>Review the SAS Companion for z/OS documentation -- refer to the TERMSTR and ENCODING discussions (there are multiple references).  Also, I recommend coding as few parameters as required, letting SAS defaults take unless absolutely required.  I have no problem doing FTPs (EBCDIC-to-ASCII) from SAS FILENAME with FTP engine to Windows/Unix, except for the Windows NotePad/WordPad behavior differences.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS support website:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS 9.1.3 for z/OS Companion Guide&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/base_zoscom_8406.pdf" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/base_zoscom_8406.pdf&lt;/A&gt;</description>
      <pubDate>Tue, 18 Aug 2009 17:10:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65104#M14128</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-18T17:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65105#M14129</link>
      <description>You are telling SAS to create the file without record terminators the F in the record format.&lt;BR /&gt;
&lt;BR /&gt;
RECFM=FB  F means fixed, no record termination strings.&lt;BR /&gt;
LRECL=240 is logical record length.&lt;BR /&gt;
&lt;BR /&gt;
So the records do not have termination strings as in "regular" windows files.  I can't test it but I think if you change RECFM=V then you will get the proper records.</description>
      <pubDate>Tue, 18 Aug 2009 17:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65105#M14129</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-08-18T17:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add carriage return at the end of a put statement ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65106#M14130</link>
      <description>Thanks very much for your recommendation. It works !</description>
      <pubDate>Tue, 18 Aug 2009 17:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-carriage-return-at-the-end-of-a-put-statement/m-p/65106#M14130</guid>
      <dc:creator>Kwok</dc:creator>
      <dc:date>2009-08-18T17:56:02Z</dc:date>
    </item>
  </channel>
</rss>

