<?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 DI Studio: New transformation not keeping code when added to job in Developers</title>
    <link>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/823119#M6101</link>
    <description>&lt;P&gt;I have some macro variables which need to be incorporated across multiple jobs.&lt;/P&gt;&lt;P&gt;Basically, a macro in DI Studio.&lt;/P&gt;&lt;P&gt;My initial solution: Creating a new transformation containing the code, e.g.&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;set &lt;EM&gt;DSET&lt;/EM&gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;call symput('DATEVAR1 ', put(DATEVAR1 , 8.));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;However, when I add the transformation to a job, it does not retain the code.&lt;/P&gt;&lt;P&gt;The Code tab is empty.&lt;/P&gt;&lt;P&gt;Is there a different way of doing ? Would prefer a transformation, which will be available to other users as well.&lt;/P&gt;&lt;P&gt;DI Studio 4.904&lt;/P&gt;&lt;P&gt;OS: Win Server 2016&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2022 14:30:24 GMT</pubDate>
    <dc:creator>theRabbitHole</dc:creator>
    <dc:date>2022-07-13T14:30:24Z</dc:date>
    <item>
      <title>DI Studio: New transformation not keeping code when added to job</title>
      <link>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/823119#M6101</link>
      <description>&lt;P&gt;I have some macro variables which need to be incorporated across multiple jobs.&lt;/P&gt;&lt;P&gt;Basically, a macro in DI Studio.&lt;/P&gt;&lt;P&gt;My initial solution: Creating a new transformation containing the code, e.g.&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;set &lt;EM&gt;DSET&lt;/EM&gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;call symput('DATEVAR1 ', put(DATEVAR1 , 8.));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;However, when I add the transformation to a job, it does not retain the code.&lt;/P&gt;&lt;P&gt;The Code tab is empty.&lt;/P&gt;&lt;P&gt;Is there a different way of doing ? Would prefer a transformation, which will be available to other users as well.&lt;/P&gt;&lt;P&gt;DI Studio 4.904&lt;/P&gt;&lt;P&gt;OS: Win Server 2016&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 14:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/823119#M6101</guid>
      <dc:creator>theRabbitHole</dc:creator>
      <dc:date>2022-07-13T14:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: New transformation not keeping code when added to job</title>
      <link>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836266#M6166</link>
      <description>&lt;P&gt;Make sure you are creating the macro variable in that node. Also try using symputx instead of symput.&lt;/P&gt;&lt;P&gt;Check the value in that node:&lt;/P&gt;&lt;P&gt;%put &amp;amp;=DATEVAR1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if it helps for you case, but there is a parameter tab with many, many options:&lt;/P&gt;&lt;P&gt;1.1. For a particular job:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a20121248_0-1664607654781.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75779i6C055557EDB93DA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a20121248_0-1664607654781.png" alt="a20121248_0-1664607654781.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1.2. In any transformation of that job:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a20121248_1-1664607762746.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75780iF2025283B69ED2BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="a20121248_1-1664607762746.png" alt="a20121248_1-1664607762746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 07:15:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836266#M6166</guid>
      <dc:creator>a20121248</dc:creator>
      <dc:date>2022-10-01T07:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: New transformation not keeping code when added to job</title>
      <link>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836332#M6167</link>
      <description>&lt;P&gt;I can't remember ever having had such an issue with a custom transformation. What I would do in such a case using DIS:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Close all jobs&lt;/LI&gt;
&lt;LI&gt;Export your custom transformation (.spk)&lt;/LI&gt;
&lt;LI&gt;Delete the custom transformation&lt;/LI&gt;
&lt;LI&gt;Open a DIS job that used the custom transformation&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;To ensure you're not using a "duplicate". The custom transformation shouldn't be in the job anymore.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Import the .spk
&lt;OL&gt;
&lt;LI&gt;In my experience such an export/delete/import approach can fix some metadata hiccups&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Add the custom transformation back to the job&lt;/LI&gt;
&lt;LI&gt;Check in the code tab of the job if you can see the custom transformation code as desired&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;If you can see it save the DIS job, close it, open it again, check again in the code. If still there then you should be fine.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If above still doesn't resolve your issue then I'd check if it's an issue with your DIS job or with the custom transformation by:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a new DIS job, add the custom transformation, check if that generates the desired code (after save/close/reopen the DIS job).&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;If it doesn't create the desired code then I'd delete the custom transformation and create a new one from scratch&lt;/LI&gt;
&lt;LI&gt;If it does create the desired job then I'd export/delete/reimport the DIS job with the custom transformation as this might fix things (just the job without the dependent objects).&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;...and if all of the above doesn't help then I'd contact SAS Tech Support&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 23:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836332#M6167</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-10-01T23:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: New transformation not keeping code when added to job</title>
      <link>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836471#M6168</link>
      <description>&lt;P&gt;Of course you can try out the trouble shooting suggestions in this thread.&lt;/P&gt;
&lt;P&gt;But since this data doesn't seem to have any direct impact of you data flow (lineage), you could either create an actual macro, and call that in your jobs pre-code.&lt;/P&gt;
&lt;P&gt;Or, if you bu multiple jobs mean almost all jobs, execute the code in the autoexec.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 06:38:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/DI-Studio-New-transformation-not-keeping-code-when-added-to-job/m-p/836471#M6168</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-10-03T06:38:44Z</dc:date>
    </item>
  </channel>
</rss>

