<?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: config parameters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69818#M15125</link>
    <description>thank you Scott looks like windows scripting will solve my requirement. Would windows scripting allow me to generate the short config file?&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
    <pubDate>Sun, 05 Sep 2010 16:21:06 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-09-05T16:21:06Z</dc:date>
    <item>
      <title>config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69814#M15121</link>
      <description>in a sasv9.cfg file in "my documents\" I can provide sas system options that are my personal preference. Automatically this config file will be used when I invoke sas.exe without specifying any -config  parameter.&lt;BR /&gt;
I a config file SAS uses !prefix to indicate an environment variable, so &lt;BR /&gt;
-WORK "!TEMP\SAS Temporary Files"&lt;BR /&gt;
says assign system option WORK the path where-ever system environment variable TEMP points and under that in folder "SAS Temporary Files".&lt;BR /&gt;
There are many of these environment variables used.&lt;BR /&gt;
 &lt;BR /&gt;
I would like to use an environment variable to name a file but behaviour is odd.&lt;BR /&gt;
-altlog !PROG &lt;BR /&gt;
uses the value in environment var PROG as the value for that system option, but&lt;BR /&gt;
-altlog !PROG.log&lt;BR /&gt;
create an altlog file named !PROG.log and does not substitute the value of the environment variable.&lt;BR /&gt;
 &lt;BR /&gt;
Is there a special symbol (like . following macro variable names) which does the job for environment variable reference in configuration files?&lt;BR /&gt;
A "\" works and treats the environment variable as the name of a folder, but that is not what i want for the filename for the altlog.&lt;BR /&gt;
 &lt;BR /&gt;
hth&lt;BR /&gt;
peterC</description>
      <pubDate>Fri, 03 Sep 2010 15:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69814#M15121</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-09-03T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69815#M15122</link>
      <description>Peter,&lt;BR /&gt;
&lt;BR /&gt;
You are much more of an expert in this area than I am, thus I doubt if I can offer anything substantial.&lt;BR /&gt;
&lt;BR /&gt;
I'm confused about what you are trying to do as, in your example, you show whatever.log, but isn't .log automatically assigned by -altlog?&lt;BR /&gt;
&lt;BR /&gt;
Regardless, would %sysget() accomplish what you want to do?&lt;BR /&gt;
&lt;BR /&gt;
Art</description>
      <pubDate>Fri, 03 Sep 2010 22:45:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69815#M15122</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2010-09-03T22:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69816#M15123</link>
      <description>Would it be unreasonable to assign the entire path-filename (file-extension included) as the environment variable?  &lt;BR /&gt;
&lt;BR /&gt;
Possibly, consider using Windows Script Host to launch SAS with specific command-line parameters, such as -SYSIN and -ALTLOG, or -SYSPARM or using INITSTMT=  System Option.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sat, 04 Sep 2010 17:02:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69816#M15123</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-09-04T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69817#M15124</link>
      <description>Art297&lt;BR /&gt;
thank you for the complement (appreciate it very much from you!)&lt;BR /&gt;
Tried %sysget, but the resulting value is only the request for the env-var, not the value itself. Here are some notes pushed to SASlog to check on the situation [pre]&lt;BR /&gt;
NOTE: local config file&lt;BR /&gt;
C:\Users\Peter Crawford\Documents\my sas files\sasv9.cfg&lt;BR /&gt;
      contains&lt;BR /&gt;
      1 -set PROG demo.e-Vars&lt;BR /&gt;
      2 -awstitle %sysget(PROG)&lt;BR /&gt;
      3 -altlog %sysget(prog).log&lt;BR /&gt;
&lt;BR /&gt;
      environment variable PROG is demo.e-Vars&lt;BR /&gt;
      AWStitle has value   %sysget(PROG)&lt;BR /&gt;
      altlog value is&lt;BR /&gt;
C:\Users\Peter Crawford\Documents\my sas files\%sysget(prog).log[/pre]these messages were generated by this data step in autexec.sas &lt;BR /&gt;
data _null_ ;&lt;BR /&gt;
   * collect and report testing of start-up parameters ;&lt;BR /&gt;
   length altlogv Var1-Var5 $1000 ;&lt;BR /&gt;
   altlogv = getoption( 'altlog' ) ;&lt;BR /&gt;
   Var1 = "%sysget( PROG )" ;&lt;BR /&gt;
   var2 =  getoption( 'config' ) ;&lt;BR /&gt;
   var5 = getoption( 'awstitle' ) ;&lt;BR /&gt;
   put 'NOTE: ' ;&lt;BR /&gt;
   put 'NOTE: local config file ' @ ;&lt;BR /&gt;
   infile 'sasv9.cfg' filename= var3  end=eof ;&lt;BR /&gt;
   input @ ;&lt;BR /&gt;
   put var3 / @7 'contains';&lt;BR /&gt;
   do ROW=1 by 1  while( not eof );&lt;BR /&gt;
        input ;&lt;BR /&gt;
        var4 = _infile_ ;&lt;BR /&gt;
        PUT 'NOTE- ' row var4 ;&lt;BR /&gt;
   end ;&lt;BR /&gt;
        put 'NOTE- ';&lt;BR /&gt;
option ls=70 ;&lt;BR /&gt;
putLog  'NOTE- environment variable PROG is ' Var1 ;&lt;BR /&gt;
putLog  'NOTE- AWStitle has value   '         Var5 ;&lt;BR /&gt;
putLog  'NOTE- altlog value is '              altLogV ;&lt;BR /&gt;
putlog  'NOTE- config files used '            var2  ;&lt;BR /&gt;
   put 'NOTE- '; &lt;BR /&gt;
   put 'NOTE: ---------------------------------------------------' ;&lt;BR /&gt;
   stop ;&lt;BR /&gt;
run ;                      &lt;BR /&gt;
&lt;BR /&gt;
looks like I can only let an environment var be followed by a \&lt;BR /&gt;
I hoped/wanted the env-var to work like a macro var, but it isn't achieving that.&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Sun, 05 Sep 2010 16:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69817#M15124</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-09-05T16:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69818#M15125</link>
      <description>thank you Scott looks like windows scripting will solve my requirement. Would windows scripting allow me to generate the short config file?&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Sun, 05 Sep 2010 16:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69818#M15125</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-09-05T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69819#M15126</link>
      <description>Suggested Google search argument for your follow-up question:&lt;BR /&gt;
&lt;BR /&gt;
windows script host create file&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 05 Sep 2010 16:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69819#M15126</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-09-05T16:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: config parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69820#M15127</link>
      <description>thank you Scott,&lt;BR /&gt;
appreciate your calm brevity&lt;BR /&gt;
I should not have needed to ask&lt;BR /&gt;
 &lt;BR /&gt;
Peter</description>
      <pubDate>Sun, 05 Sep 2010 16:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/config-parameters/m-p/69820#M15127</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-09-05T16:49:43Z</dc:date>
    </item>
  </channel>
</rss>

