<?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 Parametrisation challenge in SAS DI in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215419#M39755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS DI is there a way we could pass the environment details in form of parameters to pre and post code sections of JOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we open the pre and post code sections of the job and we are manually changing the library names and source paths using find and replace command. We have about few 100 jobs and this manual process is highly effort intensive and error prone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be great if we can get any suggestion on whether we can pass the environment variables &amp;amp; database paths in form of parameters which could be passed to the jobs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have already gone through SAS DI user guide and we could not get much help from it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The version of product what we use is SAS DI 4.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Jun 2015 11:58:08 GMT</pubDate>
    <dc:creator>Sivasandeep</dc:creator>
    <dc:date>2015-06-27T11:58:08Z</dc:date>
    <item>
      <title>Parametrisation challenge in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215419#M39755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS DI is there a way we could pass the environment details in form of parameters to pre and post code sections of JOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we open the pre and post code sections of the job and we are manually changing the library names and source paths using find and replace command. We have about few 100 jobs and this manual process is highly effort intensive and error prone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be great if we can get any suggestion on whether we can pass the environment variables &amp;amp; database paths in form of parameters which could be passed to the jobs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have already gone through SAS DI user guide and we could not get much help from it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The version of product what we use is SAS DI 4.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2015 11:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215419#M39755</guid>
      <dc:creator>Sivasandeep</dc:creator>
      <dc:date>2015-06-27T11:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parametrisation challenge in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215420#M39756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can import environment variables through the sysget() function. Another option could be to pass parameters on the SAS command line using -sysparm. If you have identical data structures in different data stores you could store the parameters in a lookup table and use it in the loop transform. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2015 16:51:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215420#M39756</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-06-27T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Parametrisation challenge in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215421#M39757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When moving jobs from one environment to the next you shouldn't have to change anything in the jobs. The only place where environment specific settings like paths should be done is in the autoexec, the config and in SAS Metadata (where you define these things once and then it gets used by all jobs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order for above to work you shouldn't use any fully hard coded paths in your jobs. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let's say this is your staging area: C:\SAS\Config\Lev1\SASApp\Data\Staging&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;What I would do is to define the following in the autoexec:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%let lev=Lev1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;%let data=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;C:\SAS\Config\&amp;amp;lev\SASApp\Data;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;And then in the External File Metadata you would define the file as: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;amp;data\Staging\myfile.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;....and select "double quotes" as well.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;All libnames should be defined in SAS Metadata so that you have to set-up and change the paths only once and in Metadata (using SMC). No need to change anythings in the jobs after that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Above concept worked for me in many projects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jun 2015 23:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215421#M39757</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-27T23:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parametrisation challenge in SAS DI</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215422#M39758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are you defining different library names between SAS environments when presumably they refer to the same data, just stored in a different location? For example Production versus Development version of the same data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you had the same library names across your environments then you wouldn't have this problem. This is what we do where I work and it means no code changes. Also we assign all libraries in metadata, not in code - this is best practice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jun 2015 01:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parametrisation-challenge-in-SAS-DI/m-p/215422#M39758</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-06-28T01:41:26Z</dc:date>
    </item>
  </channel>
</rss>

