<?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: Run program automatically without making manual changes every time? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789992#M252891</link>
    <description>&lt;P&gt;So are you saying that you receive a file, here is a possible name of the file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Listing of files in directory 16.xlsx&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And then in your program you want to use 16?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this Excel file in a specific&amp;nbsp;folder, where its name can be read by your program and parsed? Are there ever other Excel files in that folder?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please explain the process by which this file is found in detail, rather than have us ask lots of questions. Don't be brief with your explanations, don't be stingy with information. We're trying to help you but you have to help us.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 14:15:03 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-01-13T14:15:03Z</dc:date>
    <item>
      <title>Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789810#M252782</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a program which uses the macro variable &amp;amp;num to do a bunch of stuff (the purport of the program is not really relevant to my question). &amp;amp;num is set by hand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to set up some automated runs of my program. I know how to do this, but my question is this: I'll be doing lots of runs of the program and changing &amp;amp;num each time (but not making any other changes). Is there a more efficient way to set this up than:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Make manual change to &amp;amp;num&lt;/P&gt;
&lt;P&gt;2. Let automatic run happen as scheduled&lt;/P&gt;
&lt;P&gt;And repeat this process for each new instances of &amp;amp;num?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help is much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 20:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789810#M252782</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2022-01-12T20:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789819#M252787</link>
      <description>&lt;P&gt;Just one macro variable, that's all that changes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What determines in your mind (not in SAS) what the value of &amp;amp;num will change to?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 21:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789819#M252787</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-12T21:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789829#M252793</link>
      <description>&lt;P&gt;The program processes files and &amp;amp;num is in the file name.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 21:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789829#M252793</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2022-01-12T21:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789833#M252796</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37814"&gt;@Walternate&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The program processes files and &amp;amp;num is in the file name.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think this answers my questions.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 21:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789833#M252796</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-12T21:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789846#M252804</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37814"&gt;@Walternate&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The program processes files and &amp;amp;num is in the file name.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The generated file name? Or the input file name? Does it follow an increment schedule? Randomly assigned? Or magically assigned?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 22:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789846#M252804</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-12T22:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789847#M252805</link>
      <description>&lt;P&gt;Where to do the "new instances of &amp;amp;num" come from? Are these values in a data set? Based on a calendar date? The phase of the moon? Armenian Fiscal Years?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without knowing where values for &amp;amp;num come from there is no way this can be automated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 22:30:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789847#M252805</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-12T22:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789989#M252889</link>
      <description>&lt;P&gt;I receive input files to be processed by the program and &amp;amp;num is in the name of the input file, eg: Listing of files in directory &amp;amp;num.xlsx .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 13:56:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789989#M252889</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2022-01-13T13:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789992#M252891</link>
      <description>&lt;P&gt;So are you saying that you receive a file, here is a possible name of the file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Listing of files in directory 16.xlsx&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And then in your program you want to use 16?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this Excel file in a specific&amp;nbsp;folder, where its name can be read by your program and parsed? Are there ever other Excel files in that folder?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please explain the process by which this file is found in detail, rather than have us ask lots of questions. Don't be brief with your explanations, don't be stingy with information. We're trying to help you but you have to help us.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 14:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/789992#M252891</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-13T14:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Run program automatically without making manual changes every time?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/790035#M252917</link>
      <description>&lt;P&gt;SAS provides several ways to pick up data from the "outside".&lt;/P&gt;
&lt;P&gt;You can add&lt;/P&gt;
&lt;PRE&gt;-sysparm="string"&lt;/PRE&gt;
&lt;P&gt;to the commandline and then use the SYSPARM function or the &amp;amp;SYSPARM automatic macro variable.&lt;/P&gt;
&lt;P&gt;Or (and this is what schedulers do) set environment variables and retrieve those with the SYSGET data step function or %SYSGET macro function.&lt;/P&gt;
&lt;P&gt;Script file (if on UNIX)&lt;/P&gt;
&lt;PRE&gt;export NUMBER=16
sas program.sas&lt;/PRE&gt;
&lt;P&gt;In the program,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let number = %sysget(NUMBER);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will set the macro variable number to 16.&lt;/P&gt;
&lt;P&gt;On Windows, use the &lt;A href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1" target="_blank" rel="noopener"&gt;&lt;FONT face="courier new,courier"&gt;set&lt;/FONT&gt;&lt;/A&gt; command in the batch file.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 17:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-program-automatically-without-making-manual-changes-every/m-p/790035#M252917</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-01-13T17:11:39Z</dc:date>
    </item>
  </channel>
</rss>

