<?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: Automatically documentation of SAS programs with proc scaproc - code missing using %include?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938083#M368523</link>
    <description>&lt;P&gt;I think you can kind of get it to work by using macro call instead.&amp;nbsp; At least it appears to put in a "jobstep" when the macro generates the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So make a macro that includes the file.&lt;/P&gt;
&lt;P&gt;Replace the %INCLUDE statement with a call to the macro.&lt;/P&gt;
&lt;P&gt;Add the EXPANDMACROS option to the record statement.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2024 15:21:31 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-08-02T15:21:31Z</dc:date>
    <item>
      <title>Automatically documentation of SAS programs with proc scaproc - code missing using %include?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938067#M368517</link>
      <description>&lt;P&gt;We have build a tool that automatically creates Data catalog, Program documentations, Data lineage, runtime statistics and more utilizing the output from the procedure proc scaproc&lt;BR /&gt;2 questions:&lt;BR /&gt;1) if we have a program like:&lt;/P&gt;&lt;PRE&gt;proc scaproc; 
   record 'record.txt'; 
run;
%include("Some_SAS_program.sas");
proc scaproc; 
   write; 
run;&lt;/PRE&gt;&lt;P&gt;Then the file record.txt will hold all the right JOBSPLITS for the included code, BUT the source code included does not follow after the line:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* JOBSPLIT: STEP SOURCE FOLLOWS */&lt;/PRE&gt;&lt;P&gt;Is there some way to achieve that the code is included in the output from proc scaproc?&lt;BR /&gt;&lt;BR /&gt;2) Proc export does not seem to generate any ATTR-information on what is being exported. Is there a way to capture that information using proc scaproc?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A description on what we are trying to achieve is here:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=hxJw1ZFj1r4" target="_blank"&gt;https://www.youtube.com/watch?v=hxJw1ZFj1r4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 10:42:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938067#M368517</guid>
      <dc:creator>henrik_dahl</dc:creator>
      <dc:date>2024-08-02T10:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically documentation of SAS programs with proc scaproc - code missing using %include?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938070#M368518</link>
      <description>&lt;P&gt;Interesting.&amp;nbsp; I've never really played much with SCAPROC, but agree when I use %INCLUDE, I don't see the included code in the record, even when source2 is turned on.&amp;nbsp; I ran code like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options source2 ;

proc scaproc; 
   record 'Q:\junk\record.txt'; 
run;

proc print data=sashelp.class(obs=3) ;
run ;

%include "Q:\junk\freq.sas";
proc scaproc; 
   write; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I could see the PROC PRINT step, but couldn't see the PROC FREQ step that was in the %included code.&amp;nbsp; Report snippet:&lt;/P&gt;
&lt;PRE&gt;/* JOBSPLIT: SYSSCP WIN */
/* JOBSPLIT: PROCNAME PRINT */
/* JOBSPLIT: STEP SOURCE FOLLOWS */

proc print data=sashelp.class(obs=3) ;
run ;

%include "Q:\junk\freq.sas";

/* JOBSPLIT: JOBENDTIME 02AUG2024:08:28:07.15 */
/* JOBSPLIT: END */
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 12:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938070#M368518</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-08-02T12:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically documentation of SAS programs with proc scaproc - code missing using %include?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938083#M368523</link>
      <description>&lt;P&gt;I think you can kind of get it to work by using macro call instead.&amp;nbsp; At least it appears to put in a "jobstep" when the macro generates the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So make a macro that includes the file.&lt;/P&gt;
&lt;P&gt;Replace the %INCLUDE statement with a call to the macro.&lt;/P&gt;
&lt;P&gt;Add the EXPANDMACROS option to the record statement.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 15:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938083#M368523</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-08-02T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically documentation of SAS programs with proc scaproc - code missing using %include?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938084#M368524</link>
      <description>&lt;P&gt;Not a new issue.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/include-thwarts-data-flow-diagram-from-SCAPROC/td-p/54810" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/include-thwarts-data-flow-diagram-from-SCAPROC/td-p/54810&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;shows a work around that may not be the nicest approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this note: &lt;A href="https://support.sas.com/kb/48/812.html" target="_blank"&gt;https://support.sas.com/kb/48/812.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;acknowledges the behavior and "to be fixed in later release" from Dec 2012&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone tried reading the source file into a data step and using Call Execute with the lines of code?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 15:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Automatically-documentation-of-SAS-programs-with-proc-scaproc/m-p/938084#M368524</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-08-02T15:28:30Z</dc:date>
    </item>
  </channel>
</rss>

