<?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: SAS proc stream : problem with linebreaks in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-proc-stream-problem-with-linebreaks/m-p/408199#M67114</link>
    <description>&lt;P&gt;This question appears to have been asked and answered today on Stackoverflow - apparently removing ASIS resolves the issue....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/46976868/sas-proc-stream-weird-linebreaks" target="_blank"&gt;https://stackoverflow.com/questions/46976868/sas-proc-stream-weird-linebreaks&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2017 23:32:06 GMT</pubDate>
    <dc:creator>ChrisBrooks</dc:creator>
    <dc:date>2017-10-27T23:32:06Z</dc:date>
    <item>
      <title>SAS proc stream : problem with linebreaks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-proc-stream-problem-with-linebreaks/m-p/408054#M67103</link>
      <description>&lt;P&gt;hi to all,&lt;/P&gt;&lt;P&gt;Server: Unix, SAS94M3&lt;/P&gt;&lt;P&gt;Client: Windows, Internet Explorer Edge&lt;/P&gt;&lt;P&gt;Part of my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    %let P_debug_log = %str(&amp;lt;INPUT TYPE='hidden' NAME='_DEBUG' VALUE='LOG'&amp;gt;);
    proc stream outfile=_webout quoting=both resetdelim='_do' ASIS;
    BEGIN
      %if "&amp;amp;_whattodo" ne "print" %then %do;
        &amp;lt;script language='JavaScript' type='text/javascript'&amp;gt;										
      	    function subForm(f,v) {
      	    	if (v !== '') {
      	    	  $('#'+ f).append('&amp;lt;INPUT TYPE="hidden" NAME="'+ v +'" VALUE="1"&amp;gt;');
      	    	}
    	        $('#'+f).submit();   	 
    	      } 
          $(document).ready(function() {															
            $('#footButtons').append($('.footButton'));   /* move all elements with class=footButton to pageFooter */
            $('#footMessage').append($('.footMsg'));   
            $('form.log').append("&amp;amp;P_debug_log.");
          });																				
        &amp;lt;/script&amp;gt;
      %end;
    ;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With Option ASIS I expected the output to have at least the same linebreaks as my code (e.g. the JavaScript part).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    &amp;lt;/script&amp;gt;
         &amp;lt;script language='JavaScript' type='text/javascript'&amp;gt;                  function subForm(f,v) {         if (v !== '') {           $('#'+ f).append('&amp;lt;INPUT TYPE="hidden" NAME="'+ v +'" VALUE="1"&amp;gt;');         }          $('#'+f).submit();             }
            $(document).ready(function() {                        $('#footButtons').append($('.footButton'));            $('#footMessage').append($('.footMsg'));            $('form.log').append("
    &amp;lt;INPUT TYPE=
    'hidden
    ' NAME=
    '_DEBUG
    ' VALUE=
    'LOG
    '
    &amp;gt;");       });                         &amp;lt;/script&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Why are there in some cases&amp;nbsp;linebreaks, in others not?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And why is the macrovariable split in the way it is?&lt;/P&gt;&lt;P&gt;I expected this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp;$('form.log').append("&lt;BR /&gt;&amp;nbsp;&amp;lt;INPUT TYPE='hidden' NAME='_DEBUG' VALUE='LOG'&amp;gt;&lt;BR /&gt;&amp;nbsp;");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This leads to unpredictable JavaScript Errors, e.g. when a linebreak is within a JavaScript string. It seems as if there is an implicit LRECL 1024. This would be OK if linebreaks would be set as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm doing wrong?&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TALIA,&lt;/P&gt;&lt;P&gt;frank&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 14:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-proc-stream-problem-with-linebreaks/m-p/408054#M67103</guid>
      <dc:creator>defaz</dc:creator>
      <dc:date>2017-10-27T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc stream : problem with linebreaks</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-proc-stream-problem-with-linebreaks/m-p/408199#M67114</link>
      <description>&lt;P&gt;This question appears to have been asked and answered today on Stackoverflow - apparently removing ASIS resolves the issue....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/46976868/sas-proc-stream-weird-linebreaks" target="_blank"&gt;https://stackoverflow.com/questions/46976868/sas-proc-stream-weird-linebreaks&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 23:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-proc-stream-problem-with-linebreaks/m-p/408199#M67114</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-10-27T23:32:06Z</dc:date>
    </item>
  </channel>
</rss>

