<?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 Issue with using a formatted Put statement in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9296#M2936</link>
    <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I'm having an issue with a formatted put statement I'm using to write a csv file.&lt;BR /&gt;
Basically I'm writing out a csv from a dataset. &lt;BR /&gt;
&lt;BR /&gt;
I have a macro variable such as:&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;%let c = +(-1) ',';&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
and in my put statement I'm calling the following:&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;put 	myDateVar 	: yymmddS10.     &amp;amp;c&lt;BR /&gt;
                someTxt1 	                                          &amp;amp;c&lt;BR /&gt;
	someTxt2		                          &amp;amp;c&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
etc etc..&lt;BR /&gt;
&lt;BR /&gt;
It writes out the file fine but on one random row each time I run this it will cause an issue. In the middle of some variable it will restart the line..so row becomes mis-alligned and doesn't have the proper data and actually ends up with more data than it should. the log shows no error or warning message. This seems to happen on UNIX only. I run the exact same thing under windows and it works perfectly.&lt;BR /&gt;
&lt;BR /&gt;
the output might look something like this for example:&lt;BR /&gt;
&lt;BR /&gt;
2009/01/01,some text1,some text1&lt;BR /&gt;
2009/01/02,some text2,some text2&lt;BR /&gt;
&lt;B&gt;2009/01/03,some text2009/01/03,some text3,some text3&lt;/B&gt;&lt;BR /&gt;
2009/01/04,some text4,some text4&lt;BR /&gt;
&lt;BR /&gt;
Has anyone ever seen anything like this before?&lt;BR /&gt;
Thank you in advance!&lt;BR /&gt;
Faisal</description>
    <pubDate>Mon, 23 Mar 2009 14:43:38 GMT</pubDate>
    <dc:creator>FaisalD</dc:creator>
    <dc:date>2009-03-23T14:43:38Z</dc:date>
    <item>
      <title>Issue with using a formatted Put statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9296#M2936</link>
      <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I'm having an issue with a formatted put statement I'm using to write a csv file.&lt;BR /&gt;
Basically I'm writing out a csv from a dataset. &lt;BR /&gt;
&lt;BR /&gt;
I have a macro variable such as:&lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;%let c = +(-1) ',';&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
and in my put statement I'm calling the following:&lt;BR /&gt;
&lt;I&gt;&lt;B&gt;put 	myDateVar 	: yymmddS10.     &amp;amp;c&lt;BR /&gt;
                someTxt1 	                                          &amp;amp;c&lt;BR /&gt;
	someTxt2		                          &amp;amp;c&lt;/B&gt;&lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
etc etc..&lt;BR /&gt;
&lt;BR /&gt;
It writes out the file fine but on one random row each time I run this it will cause an issue. In the middle of some variable it will restart the line..so row becomes mis-alligned and doesn't have the proper data and actually ends up with more data than it should. the log shows no error or warning message. This seems to happen on UNIX only. I run the exact same thing under windows and it works perfectly.&lt;BR /&gt;
&lt;BR /&gt;
the output might look something like this for example:&lt;BR /&gt;
&lt;BR /&gt;
2009/01/01,some text1,some text1&lt;BR /&gt;
2009/01/02,some text2,some text2&lt;BR /&gt;
&lt;B&gt;2009/01/03,some text2009/01/03,some text3,some text3&lt;/B&gt;&lt;BR /&gt;
2009/01/04,some text4,some text4&lt;BR /&gt;
&lt;BR /&gt;
Has anyone ever seen anything like this before?&lt;BR /&gt;
Thank you in advance!&lt;BR /&gt;
Faisal</description>
      <pubDate>Mon, 23 Mar 2009 14:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9296#M2936</guid>
      <dc:creator>FaisalD</dc:creator>
      <dc:date>2009-03-23T14:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with using a formatted Put statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9297#M2937</link>
      <description>I don't know the answer to the specific problem you are having.  If you post example data and more code perhaps that someone could test it.&lt;BR /&gt;
&lt;BR /&gt;
However, have you considered using the FILE statement option DSD.  It will hande the delimiter for you, you just need a PUT statement that uses list or formated list put.</description>
      <pubDate>Mon, 23 Mar 2009 16:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9297#M2937</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-23T16:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with using a formatted Put statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9298#M2938</link>
      <description>I actually solved it just now. It seems to have been an issue with the FTP client I am using. Not a SAS issue after all. Sorry for the false alarm.</description>
      <pubDate>Mon, 23 Mar 2009 16:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Issue-with-using-a-formatted-Put-statement/m-p/9298#M2938</guid>
      <dc:creator>FaisalD</dc:creator>
      <dc:date>2009-03-23T16:13:02Z</dc:date>
    </item>
  </channel>
</rss>

