<?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 how to get STDOUT in sasgsub in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698215#M213507</link>
    <description>&lt;PRE&gt;%macro driver;

      data _null_;
         file STDOUT;
         put '--&amp;gt;';
         put '&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;';
         put '&amp;lt;body&amp;gt;';
         put 'THE QUERY RETURNED NO ROWS!';
         put;
         put '&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';

         endsas;

%mend;

%driver;&lt;BR /&gt;&lt;BR /&gt;When I run it:&lt;BR /&gt;sas file.sas&lt;BR /&gt;&lt;BR /&gt;Nothing comes out.&lt;BR /&gt;&lt;BR /&gt;----------log-------------&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;4 %macro driver;&lt;BR /&gt;5 &lt;BR /&gt;6 &lt;BR /&gt;7 data _null_;&lt;BR /&gt;^L2 The SAS System 19:51 Wednesday, November 11, 2020&lt;/P&gt;
&lt;P&gt;8 file STDOUT;&lt;BR /&gt;9 put '--&amp;gt;';&lt;BR /&gt;10 put '&amp;lt;head&amp;gt;';&lt;BR /&gt;11 put '&amp;lt;title&amp;gt;ADHOC QUERY RESULTS&amp;lt;/title&amp;gt;';&lt;BR /&gt;12 put '&amp;lt;/head&amp;gt;';&lt;BR /&gt;13 put '&amp;lt;body align=center bgcolor=white&amp;gt;';&lt;BR /&gt;14 put '&amp;lt;font color=red&amp;gt;THE QUERY RETURNED NO ROWS!&amp;lt;/font&amp;gt;';&lt;BR /&gt;15 put '&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';&lt;BR /&gt;16 &lt;BR /&gt;17 endsas;&lt;BR /&gt;18 &lt;BR /&gt;19 %mend;&lt;BR /&gt;20 ******************************************************************************************;&lt;BR /&gt;21 &lt;BR /&gt;22 %driver;&lt;/P&gt;
&lt;P&gt;NOTE: The file STDOUT is:&lt;BR /&gt;Filename=&amp;lt;standard output&amp;gt;&lt;/P&gt;
&lt;P&gt;NOTE: 7 records were written to the file STDOUT.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;I don't see anything on the command line like I used to in sas9.&lt;/P&gt;
&lt;P&gt;Q: Is there an option like interactive-mode or something to make it act like sas9 output??&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2020 19:54:31 GMT</pubDate>
    <dc:creator>cellurl</dc:creator>
    <dc:date>2020-11-11T19:54:31Z</dc:date>
    <item>
      <title>how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698215#M213507</link>
      <description>&lt;PRE&gt;%macro driver;

      data _null_;
         file STDOUT;
         put '--&amp;gt;';
         put '&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;';
         put '&amp;lt;body&amp;gt;';
         put 'THE QUERY RETURNED NO ROWS!';
         put;
         put '&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';

         endsas;

%mend;

%driver;&lt;BR /&gt;&lt;BR /&gt;When I run it:&lt;BR /&gt;sas file.sas&lt;BR /&gt;&lt;BR /&gt;Nothing comes out.&lt;BR /&gt;&lt;BR /&gt;----------log-------------&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;4 %macro driver;&lt;BR /&gt;5 &lt;BR /&gt;6 &lt;BR /&gt;7 data _null_;&lt;BR /&gt;^L2 The SAS System 19:51 Wednesday, November 11, 2020&lt;/P&gt;
&lt;P&gt;8 file STDOUT;&lt;BR /&gt;9 put '--&amp;gt;';&lt;BR /&gt;10 put '&amp;lt;head&amp;gt;';&lt;BR /&gt;11 put '&amp;lt;title&amp;gt;ADHOC QUERY RESULTS&amp;lt;/title&amp;gt;';&lt;BR /&gt;12 put '&amp;lt;/head&amp;gt;';&lt;BR /&gt;13 put '&amp;lt;body align=center bgcolor=white&amp;gt;';&lt;BR /&gt;14 put '&amp;lt;font color=red&amp;gt;THE QUERY RETURNED NO ROWS!&amp;lt;/font&amp;gt;';&lt;BR /&gt;15 put '&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';&lt;BR /&gt;16 &lt;BR /&gt;17 endsas;&lt;BR /&gt;18 &lt;BR /&gt;19 %mend;&lt;BR /&gt;20 ******************************************************************************************;&lt;BR /&gt;21 &lt;BR /&gt;22 %driver;&lt;/P&gt;
&lt;P&gt;NOTE: The file STDOUT is:&lt;BR /&gt;Filename=&amp;lt;standard output&amp;gt;&lt;/P&gt;
&lt;P&gt;NOTE: 7 records were written to the file STDOUT.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;I don't see anything on the command line like I used to in sas9.&lt;/P&gt;
&lt;P&gt;Q: Is there an option like interactive-mode or something to make it act like sas9 output??&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 19:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698215#M213507</guid>
      <dc:creator>cellurl</dc:creator>
      <dc:date>2020-11-11T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698301#M213541</link>
      <description>&lt;P&gt;Where exactly do you expect the output to appear? What's in your log?&lt;/P&gt;
&lt;P&gt;Your code generates this log entry on my (misconfigured) server:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The file STDOUT is:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Filename=D:\SAS\Config\Lev1\SASApp\stdout.dat,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's where the output goes.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 04:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698301#M213541</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-12T04:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698304#M213543</link>
      <description>&lt;P&gt;Oh you provided the log, sorry.&lt;/P&gt;
&lt;P&gt;I missed it as you did not format it properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where exactly do you expect this html page to appear? Browsers are typically used for rendering HTML, but I have no idea how you expect that your output will somehow be displayed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 07:20:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698304#M213543</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-12T07:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698321#M213553</link>
      <description>&lt;P&gt;Disclaimer: I have no grid experience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The way I see it, sasgsub starts a SAS job on one of the grid nodes and then disconnects. This means that there is no connection to the stdout of the SAS process, and all data sent there ends up in the great bit bucket. You need to find another means (file on a shared filesystem) to get the results back to you.&lt;/P&gt;
&lt;P&gt;But, as I said, I know next to nothing about SAS on a grid.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 06:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/698321#M213553</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-12T06:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699284#M213922</link>
      <description>in sas9, the above code would print to STDOUT. Try it. We make hundreds of webpages that way....&lt;BR /&gt;&lt;BR /&gt;In sasgsub it prints to the log. It doesnt fail. I just want STDOUT to not go in the log, but to STDOUT.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Nov 2020 19:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699284#M213922</guid>
      <dc:creator>cellurl</dc:creator>
      <dc:date>2020-11-16T19:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699300#M213926</link>
      <description>&lt;P&gt;I am not sure what sasgsub is.&amp;nbsp; I believe it might be some type of rudimentary shell script provided by SAS to submit SAS jobs to the grid.&amp;nbsp; Out local system admins have made a shell script that is properly named &lt;STRONG&gt;sas&lt;/STRONG&gt; that does that and I believe that whatever they did should work for what you want. At least it definitely let's us use SAS Display Manager when we call SAS without specifying a program.&amp;nbsp; I believe the trick is to make sure you use the right options in the LSF commands you use to launch the SAS procedure on the grid.&amp;nbsp; I have seen this referred to as interactive mode.&lt;/P&gt;
&lt;P&gt;Let's test it.&amp;nbsp; Program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  file STDOUT;
  put '--&amp;gt;'
    / '&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;'
    / '&amp;lt;body&amp;gt;'
    / 'THE QUERY RETURNED NO ROWS!'
    // '&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;'
  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Terminal session:&lt;/P&gt;
&lt;PRE&gt;&amp;gt;sas stdout
Job &amp;lt;501095&amp;gt; is submitted to queue &amp;lt;sas-prod&amp;gt;.
&amp;lt;&amp;lt;ssh X11 forwarding job&amp;gt;&amp;gt;
&amp;lt;&amp;lt;Waiting for dispatch ...&amp;gt;&amp;gt;
&amp;lt;&amp;lt;Starting on xxx.yyy.com&amp;gt;&amp;gt;
--&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
THE QUERY RETURNED NO ROWS!

&amp;lt;post&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;

&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Nov 2020 20:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699300#M213926</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-11-16T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get STDOUT in sasgsub</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699534#M213998</link>
      <description>&lt;A href="https://documentation.sas.com/?docsetId=gridref&amp;amp;docsetTarget=p05eo0im8mix5qn1bz77trdvzd2s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=gridref&amp;amp;docsetTarget=p05eo0im8mix5qn1bz77trdvzd2s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Tue, 17 Nov 2020 15:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-get-STDOUT-in-sasgsub/m-p/699534#M213998</guid>
      <dc:creator>cellurl</dc:creator>
      <dc:date>2020-11-17T15:10:20Z</dc:date>
    </item>
  </channel>
</rss>

