<?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 Data Integration Studio: problematic code generation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-Integration-Studio-problematic-code-generation/m-p/860122#M339807</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;let me briefly give you some background infos, before explaining my issue:&lt;/P&gt;
&lt;P&gt;SAS offers the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n039l39682ccgen1xswd1fsfaqk9.htm" target="_self"&gt;"VARINITCHK"&lt;/A&gt; option, which "s&lt;SPAN&gt;pecifies whether a DATA step stops or continues executing when a variable is not initialized and the type of message to write to the SAS log".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now, I am using this option in its strictest version, id est:&amp;nbsp;a&lt;SPAN&gt;&amp;nbsp;DATA step stops executing and writes an error message to the SAS log when a variable is not initialized.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now my issue:&lt;/P&gt;
&lt;P&gt;My chosen strictness level of the aforementiond option causes the cancelation of batch scheduled,&amp;nbsp;(automcatically) written Data Integration Studio Jobs, since it turns out, that in some occasions the autogenerated code is not "clean".&amp;nbsp; Sidenote: at least I can uphold my quality standard, since the "quality guarantee" I wanted by having only "clean" code to be run is fulfilled &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT: how can I correct the "pollution process" of DIS? Meaning: is there a possibility to modify the etls-macros, which are being used during the code generation process of DIS?&lt;/P&gt;
&lt;P&gt;Where exactly are the etls-Macros located in the filesystem? (I guess the name of the macros is derived from the good old days, when DIS was called "ETL Studio"). As far as I know they are "hidden" in some ominous Java classes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, using the SCD2 Table loader transformation, is problematic, since it uses the "ETLS_SCDLOADER" macro to autogenerate the job code which is "polluted" since sometimes the line&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call missing(of _all_);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is missing when declaring variable attributes within a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the ERROR excerpt of the log attached to this post:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MPRINT(ETLS_SCDLOADER):   data etlstmp.W9HE3C1G;
MPRINT(ETLS_SCDLOADER):   attrib Make length = $13;
MPRINT(ETLS_SCDLOADER):   attrib Model length = $40;
MPRINT(ETLS_SCDLOADER):   attrib Type length = $8;
MPRINT(ETLS_SCDLOADER):   attrib Origin length = $6;
MPRINT(ETLS_SCDLOADER):   attrib DriveTrain length = $5;
MPRINT(ETLS_SCDLOADER):   attrib MSRP length = 8 format = DOLLAR8.;
MPRINT(ETLS_SCDLOADER):   attrib Invoice length = 8 format = DOLLAR8.;
MPRINT(ETLS_SCDLOADER):   attrib EngineSize length = 8 label = 'Engine Size (L)';
MPRINT(ETLS_SCDLOADER):   attrib Cylinders length = 8;
MPRINT(ETLS_SCDLOADER):   attrib Horsepower length = 8;
MPRINT(ETLS_SCDLOADER):   attrib MPG_City length = 8 label = 'MPG (City)';
MPRINT(ETLS_SCDLOADER):   attrib MPG_Highway length = 8 label = 'MPG (Highway)';
MPRINT(ETLS_SCDLOADER):   attrib Weight length = 8 label = 'Weight (LBS)';
MPRINT(ETLS_SCDLOADER):   attrib Wheelbase length = 8 label = 'Wheelbase (IN)';
MPRINT(ETLS_SCDLOADER):   attrib Length length = 8 label = 'Length (IN)';
MPRINT(ETLS_SCDLOADER):   attrib SCD2_CURRENT_FLAG length = 8;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_VALID_FROM length = 8 format = Datetime20.;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_VALID_TO length = 8 format = Datetime20.;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_SURROGATE_KEY length = 8;
MPRINT(ETLS_SCDLOADER):   stop;
MPRINT(ETLS_SCDLOADER):   run;

ERROR: Variable Make is uninitialized.
ERROR: Variable Model is uninitialized.
ERROR: Variable Type is uninitialized.
ERROR: Variable Origin is uninitialized.
ERROR: Variable DriveTrain is uninitialized.
ERROR: Variable MSRP is uninitialized.
ERROR: Variable Invoice is uninitialized.
ERROR: Variable EngineSize is uninitialized.
ERROR: Variable Cylinders is uninitialized.
ERROR: Variable Horsepower is uninitialized.
ERROR: Variable MPG_City is uninitialized.
ERROR: Variable MPG_Highway is uninitialized.
ERROR: Variable Weight is uninitialized.
ERROR: Variable Wheelbase is uninitialized.
ERROR: Variable Length is uninitialized.
ERROR: Variable SCD2_CURRENT_FLAG is uninitialized.
ERROR: Variable SCD2_VALID_FROM is uninitialized.
ERROR: Variable SCD2_VALID_TO is uninitialized.
ERROR: Variable SCD2_SURROGATE_KEY is uninitialized.
NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set ETLSTMP.W9HE3C1G may be incomplete.  When this step was stopped there were 0 observations and 19 variables.
ERROR: ROLLBACK issued due to errors for data set ETLSTMP.W9HE3C1G.DATA.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2023 11:11:09 GMT</pubDate>
    <dc:creator>FK1</dc:creator>
    <dc:date>2023-02-22T11:11:09Z</dc:date>
    <item>
      <title>Data Integration Studio: problematic code generation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Integration-Studio-problematic-code-generation/m-p/860122#M339807</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;let me briefly give you some background infos, before explaining my issue:&lt;/P&gt;
&lt;P&gt;SAS offers the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/n039l39682ccgen1xswd1fsfaqk9.htm" target="_self"&gt;"VARINITCHK"&lt;/A&gt; option, which "s&lt;SPAN&gt;pecifies whether a DATA step stops or continues executing when a variable is not initialized and the type of message to write to the SAS log".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Now, I am using this option in its strictest version, id est:&amp;nbsp;a&lt;SPAN&gt;&amp;nbsp;DATA step stops executing and writes an error message to the SAS log when a variable is not initialized.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now my issue:&lt;/P&gt;
&lt;P&gt;My chosen strictness level of the aforementiond option causes the cancelation of batch scheduled,&amp;nbsp;(automcatically) written Data Integration Studio Jobs, since it turns out, that in some occasions the autogenerated code is not "clean".&amp;nbsp; Sidenote: at least I can uphold my quality standard, since the "quality guarantee" I wanted by having only "clean" code to be run is fulfilled &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BUT: how can I correct the "pollution process" of DIS? Meaning: is there a possibility to modify the etls-macros, which are being used during the code generation process of DIS?&lt;/P&gt;
&lt;P&gt;Where exactly are the etls-Macros located in the filesystem? (I guess the name of the macros is derived from the good old days, when DIS was called "ETL Studio"). As far as I know they are "hidden" in some ominous Java classes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, using the SCD2 Table loader transformation, is problematic, since it uses the "ETLS_SCDLOADER" macro to autogenerate the job code which is "polluted" since sometimes the line&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call missing(of _all_);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is missing when declaring variable attributes within a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the ERROR excerpt of the log attached to this post:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MPRINT(ETLS_SCDLOADER):   data etlstmp.W9HE3C1G;
MPRINT(ETLS_SCDLOADER):   attrib Make length = $13;
MPRINT(ETLS_SCDLOADER):   attrib Model length = $40;
MPRINT(ETLS_SCDLOADER):   attrib Type length = $8;
MPRINT(ETLS_SCDLOADER):   attrib Origin length = $6;
MPRINT(ETLS_SCDLOADER):   attrib DriveTrain length = $5;
MPRINT(ETLS_SCDLOADER):   attrib MSRP length = 8 format = DOLLAR8.;
MPRINT(ETLS_SCDLOADER):   attrib Invoice length = 8 format = DOLLAR8.;
MPRINT(ETLS_SCDLOADER):   attrib EngineSize length = 8 label = 'Engine Size (L)';
MPRINT(ETLS_SCDLOADER):   attrib Cylinders length = 8;
MPRINT(ETLS_SCDLOADER):   attrib Horsepower length = 8;
MPRINT(ETLS_SCDLOADER):   attrib MPG_City length = 8 label = 'MPG (City)';
MPRINT(ETLS_SCDLOADER):   attrib MPG_Highway length = 8 label = 'MPG (Highway)';
MPRINT(ETLS_SCDLOADER):   attrib Weight length = 8 label = 'Weight (LBS)';
MPRINT(ETLS_SCDLOADER):   attrib Wheelbase length = 8 label = 'Wheelbase (IN)';
MPRINT(ETLS_SCDLOADER):   attrib Length length = 8 label = 'Length (IN)';
MPRINT(ETLS_SCDLOADER):   attrib SCD2_CURRENT_FLAG length = 8;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_VALID_FROM length = 8 format = Datetime20.;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_VALID_TO length = 8 format = Datetime20.;
MPRINT(ETLS_SCDLOADER):   attrib SCD2_SURROGATE_KEY length = 8;
MPRINT(ETLS_SCDLOADER):   stop;
MPRINT(ETLS_SCDLOADER):   run;

ERROR: Variable Make is uninitialized.
ERROR: Variable Model is uninitialized.
ERROR: Variable Type is uninitialized.
ERROR: Variable Origin is uninitialized.
ERROR: Variable DriveTrain is uninitialized.
ERROR: Variable MSRP is uninitialized.
ERROR: Variable Invoice is uninitialized.
ERROR: Variable EngineSize is uninitialized.
ERROR: Variable Cylinders is uninitialized.
ERROR: Variable Horsepower is uninitialized.
ERROR: Variable MPG_City is uninitialized.
ERROR: Variable MPG_Highway is uninitialized.
ERROR: Variable Weight is uninitialized.
ERROR: Variable Wheelbase is uninitialized.
ERROR: Variable Length is uninitialized.
ERROR: Variable SCD2_CURRENT_FLAG is uninitialized.
ERROR: Variable SCD2_VALID_FROM is uninitialized.
ERROR: Variable SCD2_VALID_TO is uninitialized.
ERROR: Variable SCD2_SURROGATE_KEY is uninitialized.
NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set ETLSTMP.W9HE3C1G may be incomplete.  When this step was stopped there were 0 observations and 19 variables.
ERROR: ROLLBACK issued due to errors for data set ETLSTMP.W9HE3C1G.DATA.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 11:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Integration-Studio-problematic-code-generation/m-p/860122#M339807</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2023-02-22T11:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data Integration Studio: problematic code generation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Integration-Studio-problematic-code-generation/m-p/860127#M339811</link>
      <description>&lt;P&gt;Short answer: You can't change it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS DI Studio is written in Java. It generates SAS code metadata driven. The code snippets used to generate the code are part of the product.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 11:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Integration-Studio-problematic-code-generation/m-p/860127#M339811</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-22T11:38:15Z</dc:date>
    </item>
  </channel>
</rss>

