<?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: why using using batch file to run winsteps in SAS doesn't work? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402764#M97843</link>
    <description>&lt;P&gt;KurtBremser, thank&amp;nbsp;you for the reply. I found the problem which because&amp;nbsp; my DOS system direction is wrong. I adjusted my code and it worked. I appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2017 14:14:19 GMT</pubDate>
    <dc:creator>daisy6</dc:creator>
    <dc:date>2017-10-10T14:14:19Z</dc:date>
    <item>
      <title>why using using batch file to run winsteps in SAS doesn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402481#M97745</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a batch file to run winsteps in sas and it doesn't work. I can run my control file directly in winsteps and create output. But when I use SAS command X to run winsteps. It did not provide output file. Here is my code. Could you please check whether my code has problem. Sorry I cannot provide the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro TOT( ankey=,maxitem=, run=);&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;set itemid end=eof;&lt;BR /&gt;FILE "&amp;amp;dir.\&amp;amp;run._control.txt";&lt;BR /&gt;IF _N_ = 1 THEN DO;&lt;BR /&gt;&lt;BR /&gt;PUT&lt;BR /&gt;'&amp;amp;INST'/&lt;BR /&gt;"TITLE=&amp;nbsp; run &amp;amp;run."/ /* Change title as needed */&lt;BR /&gt;"ITEM1= 11"/&lt;BR /&gt;"NI= &amp;amp;maxitem. "/&lt;BR /&gt;"NAME1= 1"/&lt;BR /&gt;"NAMLEN= 10"/&lt;BR /&gt;"XWIDE= 1"/&lt;BR /&gt;"CODES= ABCD "/&lt;BR /&gt;"TOTALSCORE= Yes"/&lt;BR /&gt;"KEY1= &amp;amp;ankey."/&lt;BR /&gt;"PVALUE= Y"/&lt;BR /&gt;"PTBIS= PTMA"/&lt;BR /&gt;/&lt;BR /&gt;"ITLEN= 13"/&lt;BR /&gt;"IWEIGHT= '&amp;amp;dir.\&amp;amp;run._weight.txt'"/&lt;BR /&gt;"DATA= '&amp;amp;dir.\data.txt' "/&lt;BR /&gt;"IDFILE= '&amp;amp;dir.\&amp;amp;run._delete.txt' "/&lt;BR /&gt;"IAFILE= '&amp;amp;dir.\&amp;amp;run._anchor.txt' "/&lt;BR /&gt;"PFILE= '&amp;amp;dir.\&amp;amp;run._persons.txt' "/&lt;BR /&gt;"DISFILE= '&amp;amp;dir.\&amp;amp;run._optons.txt' "/&lt;BR /&gt;"IFILE= '&amp;amp;dir.\&amp;amp;run._items.txt'"/&lt;BR /&gt;/&lt;BR /&gt;'*'/&lt;BR /&gt;/&lt;BR /&gt;"TFILE=* "/&lt;BR /&gt;"1.2 "/&lt;BR /&gt;"3.1"/&lt;BR /&gt;"3.2"/&lt;BR /&gt;"14.1"/&lt;BR /&gt;"14.3"/&lt;BR /&gt;'30'/&lt;BR /&gt;"*"/&lt;BR /&gt;'&amp;amp;END';&lt;BR /&gt;END;&lt;BR /&gt;put itemid ;&lt;BR /&gt;IF EOF THEN PUT "END NAMES";&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;data _null_;/*change directory and output file name */&lt;BR /&gt;file "&amp;amp;dir.\batch.txt";&lt;BR /&gt;put "&amp;amp;wspath. BATCH=YES &amp;amp;dir.\&amp;amp;run._CONTROL.TXT &amp;amp;dir.\&amp;amp;run._OUTPUT.TXT";&lt;BR /&gt;*put "exit";&lt;BR /&gt;run;&lt;BR /&gt;/*options xmin noxwait;*/&lt;BR /&gt;x "start &amp;amp;dir.\batch.txt";&lt;BR /&gt;%mend;&lt;BR /&gt;%tot(ankey=&amp;amp;akey.,maxitem=&amp;amp;nitem.,run=1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 19:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402481#M97745</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-10-09T19:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: why using using batch file to run winsteps in SAS doesn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402486#M97748</link>
      <description>&lt;P&gt;If you want to know what happens with an external command, run it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "your_command 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will reveal all system output in the SAS log.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 19:23:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402486#M97748</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-09T19:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: why using using batch file to run winsteps in SAS doesn't work?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402764#M97843</link>
      <description>&lt;P&gt;KurtBremser, thank&amp;nbsp;you for the reply. I found the problem which because&amp;nbsp; my DOS system direction is wrong. I adjusted my code and it worked. I appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-using-using-batch-file-to-run-winsteps-in-SAS-doesn-t-work/m-p/402764#M97843</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-10-10T14:14:19Z</dc:date>
    </item>
  </channel>
</rss>

