<?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: How to reference the embedded program from the egp in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464680#M30047</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52673"&gt;@Ishaan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Kurt. Conditionally connecting the node didn't work for me.&lt;/P&gt;
&lt;P&gt;I have a condition if its true than I want to run program2 and program4. If its false I want program 3 to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Program 1:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
if weekday(today()) = 3
then call symput('continue','2');
else call symput('continue','3');
run;

%put &amp;amp;continue;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 2:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put this is program 2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 3:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put this is program 3;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 2 and program 3 are both connected to program1, and both have a condition set for macrovariable &amp;amp;continue equals 2 or 3.&lt;/P&gt;
&lt;P&gt;And this is the project log (don't mind the German messages):&lt;/P&gt;
&lt;PRE&gt;27         data _null_;
28         if weekday(today()) = 3
29         then call symput('continue','2');
30         else call symput('continue','3');
31         run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

32         
33         %put &amp;amp;continue;
3
34         
35         GOPTIONS NOACCESSIBLE;
36         %LET _CLIENTTASKLABEL=;
37         %LET _CLIENTPROCESSFLOWNAME=;
38         %LET _CLIENTPROJECTPATH=;
39         %LET _CLIENTPROJECTPATHHOST=;
40         %LET _CLIENTPROJECTNAME=;
41         %LET _SASPROGRAMFILE=;
42         %LET _SASPROGRAMFILEHOST=;
43         
44         ;*';*";*/;quit;run;
45         ODS _ALL_ CLOSE;
46         
47         
48         QUIT; RUN;
49         
Log für "Bedingungsbewertung für Program_2." wurde bei 24.05.2018 12:05:14 auf XXXX ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          data _NULL_; rc = 0;
4          if &amp;amp;continue = 2 then
5             rc = 1;
6          CALL SYMPUT('_egrc', PUT(rc,1.));
7          stop;
8          run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

9          
10         QUIT; RUN;
11         
Log für "Bedingungsbewertung für Program_3." wurde bei 24.05.2018 12:05:15 auf XXXX ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          data _NULL_; rc = 0;
4          if &amp;amp;continue = 3 then
5             rc = 1;
6          CALL SYMPUT('_egrc', PUT(rc,1.));
7          stop;
8          run;

NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds
      

9          
10         QUIT; RUN;
11         
Log für "Program_3" wurde bei 24.05.2018 12:05:18 auf Allianz ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program_3';
4          %LET _CLIENTPROCESSFLOWNAME='Prozessfluss';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=ACTIVEX;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         ODS LISTING GPATH=&amp;amp;sasworklocation;
15         FILENAME EGSR TEMP;
16         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
17             STYLE=Default
18             STYLESHEET=(URL="&lt;A class="linkification-ext" title="Linkification: file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/Default.css" target="_blank"&gt;file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/Default.css&lt;/A&gt;")
19             NOGTITLE
20             NOGFOOTNOTE
21             GPATH=&amp;amp;sasworklocation
22             ENCODING=UTF8
23             options(rolap="on")
24         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
25         
26         GOPTIONS ACCESSIBLE;
27         %put this is program 3;
this is program 3
&lt;/PRE&gt;
&lt;P&gt;You can see that nothing from program2 follows the condition evaluation for program 2, while program 3 has been executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: X-ed out the App server names&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 10:11:38 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-05-24T10:11:38Z</dc:date>
    <item>
      <title>How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464665#M30043</link>
      <description>&lt;P&gt;I have&amp;nbsp;SASEGP1.egp, which has a few programs embedded in it.&lt;/P&gt;&lt;P&gt;For eg: program1, program2, program3&amp;nbsp;and program4 are embedded in SASSEGP1.egp. SAS server is install&amp;nbsp;in UNIX.&lt;/P&gt;&lt;P&gt;How can I reference program2?&lt;/P&gt;&lt;P&gt;I tried %include 'program2.sas'; I got error that file doesn't exit in SASAPP location.&lt;/P&gt;&lt;P&gt;I don't want to save these embedded program into external location and&amp;nbsp;than reference it.&lt;/P&gt;&lt;P&gt;eg: %include 'sample/code/program2.sas';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I reference the embedded program2 in program1 in the same EGP?&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464665#M30043</guid>
      <dc:creator>Ishaan</dc:creator>
      <dc:date>2018-05-24T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464667#M30044</link>
      <description>&lt;P&gt;Since the code runs in the context of the workspace server, which may even be on a physically remote machine, it can not "read" from the project.&lt;/P&gt;
&lt;P&gt;But you can conditionally connect nodes in the project flow.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464667#M30044</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-24T09:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464670#M30045</link>
      <description>&lt;P&gt;Thanks Kurt. Conditionally connecting the node didn't work for me.&lt;/P&gt;&lt;P&gt;I have a condition if its true than I want to run program2 and program4. If its false I want program 3 to run.&lt;/P&gt;&lt;P&gt;I applied the condition but all programs are running. I have created 2 separate process flow for time being.&lt;/P&gt;&lt;P&gt;Want to know if we can reference the embedded program.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464670#M30045</guid>
      <dc:creator>Ishaan</dc:creator>
      <dc:date>2018-05-24T09:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464677#M30046</link>
      <description>&lt;P&gt;You can add condition to programs in process-flow. Referencing embedded programs is not possible.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464677#M30046</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-05-24T09:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464680#M30047</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52673"&gt;@Ishaan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Kurt. Conditionally connecting the node didn't work for me.&lt;/P&gt;
&lt;P&gt;I have a condition if its true than I want to run program2 and program4. If its false I want program 3 to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;Program 1:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
if weekday(today()) = 3
then call symput('continue','2');
else call symput('continue','3');
run;

%put &amp;amp;continue;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 2:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put this is program 2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 3:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put this is program 3;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Program 2 and program 3 are both connected to program1, and both have a condition set for macrovariable &amp;amp;continue equals 2 or 3.&lt;/P&gt;
&lt;P&gt;And this is the project log (don't mind the German messages):&lt;/P&gt;
&lt;PRE&gt;27         data _null_;
28         if weekday(today()) = 3
29         then call symput('continue','2');
30         else call symput('continue','3');
31         run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

32         
33         %put &amp;amp;continue;
3
34         
35         GOPTIONS NOACCESSIBLE;
36         %LET _CLIENTTASKLABEL=;
37         %LET _CLIENTPROCESSFLOWNAME=;
38         %LET _CLIENTPROJECTPATH=;
39         %LET _CLIENTPROJECTPATHHOST=;
40         %LET _CLIENTPROJECTNAME=;
41         %LET _SASPROGRAMFILE=;
42         %LET _SASPROGRAMFILEHOST=;
43         
44         ;*';*";*/;quit;run;
45         ODS _ALL_ CLOSE;
46         
47         
48         QUIT; RUN;
49         
Log für "Bedingungsbewertung für Program_2." wurde bei 24.05.2018 12:05:14 auf XXXX ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          data _NULL_; rc = 0;
4          if &amp;amp;continue = 2 then
5             rc = 1;
6          CALL SYMPUT('_egrc', PUT(rc,1.));
7          stop;
8          run;

NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

9          
10         QUIT; RUN;
11         
Log für "Bedingungsbewertung für Program_3." wurde bei 24.05.2018 12:05:15 auf XXXX ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          data _NULL_; rc = 0;
4          if &amp;amp;continue = 3 then
5             rc = 1;
6          CALL SYMPUT('_egrc', PUT(rc,1.));
7          stop;
8          run;

NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.00 seconds
      

9          
10         QUIT; RUN;
11         
Log für "Program_3" wurde bei 24.05.2018 12:05:18 auf Allianz ausgeführt
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Program_3';
4          %LET _CLIENTPROCESSFLOWNAME='Prozessfluss';
5          %LET _CLIENTPROJECTPATH='';
6          %LET _CLIENTPROJECTPATHHOST='';
7          %LET _CLIENTPROJECTNAME='';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=ACTIVEX;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         ODS LISTING GPATH=&amp;amp;sasworklocation;
15         FILENAME EGSR TEMP;
16         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
17             STYLE=Default
18             STYLESHEET=(URL="&lt;A class="linkification-ext" title="Linkification: file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/Default.css" target="_blank"&gt;file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/Default.css&lt;/A&gt;")
19             NOGTITLE
20             NOGFOOTNOTE
21             GPATH=&amp;amp;sasworklocation
22             ENCODING=UTF8
23             options(rolap="on")
24         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
25         
26         GOPTIONS ACCESSIBLE;
27         %put this is program 3;
this is program 3
&lt;/PRE&gt;
&lt;P&gt;You can see that nothing from program2 follows the condition evaluation for program 2, while program 3 has been executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: X-ed out the App server names&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 10:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464680#M30047</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-24T10:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464896#M30067</link>
      <description>&lt;P&gt;You need to export your programs out of your EG project and copy them to a server accessible folder for you to use %INCLUDE.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 20:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/464896#M30067</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-05-24T20:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to reference the embedded program from the egp</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/465081#M30098</link>
      <description>&lt;P&gt;Since you can't use %include (since embedded programs -- no file for server to reference), rather than referencing Program2 in Program1, you could draw an explicit link (right-click Program2 and select &lt;STRONG&gt;Link to...&lt;/STRONG&gt; or hover mouse on right side of Program2 node, click and drag link line to Program1)&amp;nbsp;from Program2 to Program1.&amp;nbsp; For example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="explicit link.png" style="width: 339px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20779i0550E6FCA96D62F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="explicit link.png" alt="explicit link.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then, whenever you run the project, process flow, or branch, Program2 will always run prior to Program1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 14:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-reference-the-embedded-program-from-the-egp/m-p/465081#M30098</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2018-05-25T14:32:09Z</dc:date>
    </item>
  </channel>
</rss>

