<?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 stdin stdout in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208480#M51673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to submit this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file stdout;&lt;/P&gt;&lt;P&gt;infile stdin;&lt;/P&gt;&lt;P&gt;put @5 "input x?:";&lt;/P&gt;&lt;P&gt;input x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is what I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********/********/********/******&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input x?:&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;ksh: 3:&amp;nbsp; not found&lt;/P&gt;&lt;P&gt;[11] + Stopped (SIGTTIN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sas test1.sas &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't figure out where I'm going wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 09:35:55 GMT</pubDate>
    <dc:creator>siri2020</dc:creator>
    <dc:date>2015-07-22T09:35:55Z</dc:date>
    <item>
      <title>stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208480#M51673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to submit this code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file stdout;&lt;/P&gt;&lt;P&gt;infile stdin;&lt;/P&gt;&lt;P&gt;put @5 "input x?:";&lt;/P&gt;&lt;P&gt;input x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is what I get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********/********/********/******&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input x?:&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;ksh: 3:&amp;nbsp; not found&lt;/P&gt;&lt;P&gt;[11] + Stopped (SIGTTIN)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sas test1.sas &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't figure out where I'm going wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 09:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208480#M51673</guid>
      <dc:creator>siri2020</dc:creator>
      <dc:date>2015-07-22T09:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208481#M51674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is stdout and stdin defined as?&amp;nbsp; There should be filerefs:&lt;/P&gt;&lt;P&gt;fileref stdin "c:\abcd.txt";&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, why are you tring to put a string ""?&amp;nbsp; Do you want to read from stdin and write to stdout?&amp;nbsp; If so:&lt;/P&gt;&lt;P&gt;fileref stdin "c:\abc.txt";&lt;/P&gt;&lt;P&gt;fileref stdout "c:\def.txt";&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data _null_;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; file stdout;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; infile stdin;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; input x $;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp; put @5 x;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 12:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208481#M51674</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-22T12:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208482#M51675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want this to be an interactive SAS program. That is, ask the user a question, take in the answer and output accordingly. Hence the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 06:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208482#M51675</guid>
      <dc:creator>siri2020</dc:creator>
      <dc:date>2015-07-24T06:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208483#M51676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Base SAS doesn't have any particularly good wasy of getting user input, you could look at prco window, or there is this (haven't used it myself):&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0fy35488gnc66n1sezjgcs77pcp.htm" title="http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0fy35488gnc66n1sezjgcs77pcp.htm"&gt;http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#p0fy35488gnc66n1sezjgcs77pcp.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 11:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208483#M51676</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-24T11:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208484#M51677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Run SAS interactively and use the WINDOW or %WINDOW command to prompt users.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 12:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208484#M51677</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-24T12:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208485#M51678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you are not a UNIX user. &lt;/P&gt;&lt;H1 class="xis-title" style="font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #353535; font-size: 1.424rem; margin-bottom: 8px; margin-top: 1em; background-color: #ffffff;"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/67929/HTML/default/viewer.htm#n0n65dff9h3mmzn1m66m94dnguv3.htm"&gt;Filerefs Assigned by SAS in UNIX Environments&lt;/A&gt;&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 13:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208485#M51678</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-07-24T13:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208486#M51679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm very new to UNIX &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think %window or window will work with SAS in UNIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file stdout;&lt;/P&gt;&lt;P&gt;infile stdin;&lt;/P&gt;&lt;P&gt;put @5 "Do you want to print and email the tracker(Y/N)?:";&lt;/P&gt;&lt;P&gt;input ans;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/11242_Capture.PNG" style="font-size: 10pt; line-height: 1.5em;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture1.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/11244_Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;I need help with this. Will this work in UNIX?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 07:56:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208486#M51679</guid>
      <dc:creator>siri2020</dc:creator>
      <dc:date>2015-07-28T07:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208487#M51680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works for me. I would separate the writing and the reading as two steps to eliminate any timing issues. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file stdout;&lt;/P&gt;&lt;P&gt;put "Do you want to print and email the tracker(Y/N)?:";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;infile stdin;&lt;/P&gt;&lt;P&gt;input ans $ ;&lt;/P&gt;&lt;P&gt;put ans= ;&lt;/P&gt;&lt;P&gt;stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to print and email the tracker(Y/N)?:&lt;/P&gt;&lt;P&gt;y&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 10:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208487#M51680</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-28T10:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208488#M51681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;How is the SAS program going to read from STDIN when you have pushed the program into the background &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;by adding &amp;amp; to command line? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 10:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208488#M51681</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-07-28T10:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: stdin stdout</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208489#M51682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you already run this from the commandline (batch mode), I'd suggest to handle the input in a shell script (with the read command) and supply the values to the SAS program via environment variables or the -sysparm commandline option (&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000543608.htm" title="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000543608.htm"&gt;SAS(R) 9.2 Macro Language: Reference&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Base SAS is not really good at being interactive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 11:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/stdin-stdout/m-p/208489#M51682</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-07-28T11:06:38Z</dc:date>
    </item>
  </channel>
</rss>

