<?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: SAS MA popup window in SAS Customer Intelligence</title>
    <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/SAS-MA-popup-window/m-p/620348#M1411</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;There is no way to provide interactive pop-up dialogues. The closest for that is to use prompts inside the stored process/custom node.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For error messages below are some examples of the method I use. I haven't used it in the examples below, but if you want to include a custom error number you can also declare and set a macro variable for MAError (e.g. %let MAError=10001;) which will then get displayed in the error dialogue shown to the user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;James&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example 1: This error was for a custom node that was only intended to have a single upstream input, so we check how many inputs are present and conditionally raise an error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  %if %SYMEXIST(INTABLE0) %then %do ;
    %if %NRQUOTE(&amp;amp;INTABLE0) ne %NRQUOTE(1) %then %do ;
      %** Multiple input nodes - invalid! ;
      %let MAMsg=Error. The Deduplication node must have 1 input. ;&lt;BR /&gt;      %let SYSCC=12 ;
      %mastatus(&amp;amp;_stpwork.status.txt) ;
      %return ;
    %end ;
  %end ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example 2:&amp;nbsp; This code is used to handle a situation where a sas dataset with reference data was not found, and the custom node cannot proceed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	%** open the dataset to check the number of records **;
	%let dsid = %sysfunc(open(WORK.CTRL));

        %** If the data set exists, get the number of observations and then close the data set **;
	%if &amp;amp;dsid %then
   		%do;
      	        	%let nobs =%sysfunc(attrn(&amp;amp;dsid,nobs));
      		        %let rc = %sysfunc(close(&amp;amp;dsid));
   		%end;
	%else %do;
	        %** if the dataset doesnt exist then exit, we cant continue without it **;
		%put 'WARN: The Employee CTRL file was not created. Exiting';

		%let MAMsg=ERROR: The Employee CTRL file was not created. Exiting. ;
        	%let SYSCC=12 ;
         	%mastatus(&amp;amp;_stpwork.status.txt) ;
        	%return ;
	%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 21:29:05 GMT</pubDate>
    <dc:creator>JamesAnderson</dc:creator>
    <dc:date>2020-01-27T21:29:05Z</dc:date>
    <item>
      <title>SAS MA popup window</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/SAS-MA-popup-window/m-p/620116#M1410</link>
      <description>&lt;P&gt;Hello everyone,,&lt;/P&gt;&lt;P&gt;I need 2 things from&amp;nbsp;SASMA (user defined node for CI linked to stored process).&lt;/P&gt;&lt;P&gt;1) Handle and raise errors with user messaging regarding SAS and Oracle errors. I read documentation but will be thankfull for good approach (native and stable way to raise error with messaging)&lt;/P&gt;&lt;P&gt;2) Popup interactive example to show custom popup in CI (2 types yes/no and OK buttons) and read user action in sas code (stored process)&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 07:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/SAS-MA-popup-window/m-p/620116#M1410</guid>
      <dc:creator>Shaunkingston</dc:creator>
      <dc:date>2020-01-27T07:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS MA popup window</title>
      <link>https://communities.sas.com/t5/SAS-Customer-Intelligence/SAS-MA-popup-window/m-p/620348#M1411</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;There is no way to provide interactive pop-up dialogues. The closest for that is to use prompts inside the stored process/custom node.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For error messages below are some examples of the method I use. I haven't used it in the examples below, but if you want to include a custom error number you can also declare and set a macro variable for MAError (e.g. %let MAError=10001;) which will then get displayed in the error dialogue shown to the user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;James&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example 1: This error was for a custom node that was only intended to have a single upstream input, so we check how many inputs are present and conditionally raise an error.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  %if %SYMEXIST(INTABLE0) %then %do ;
    %if %NRQUOTE(&amp;amp;INTABLE0) ne %NRQUOTE(1) %then %do ;
      %** Multiple input nodes - invalid! ;
      %let MAMsg=Error. The Deduplication node must have 1 input. ;&lt;BR /&gt;      %let SYSCC=12 ;
      %mastatus(&amp;amp;_stpwork.status.txt) ;
      %return ;
    %end ;
  %end ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example 2:&amp;nbsp; This code is used to handle a situation where a sas dataset with reference data was not found, and the custom node cannot proceed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	%** open the dataset to check the number of records **;
	%let dsid = %sysfunc(open(WORK.CTRL));

        %** If the data set exists, get the number of observations and then close the data set **;
	%if &amp;amp;dsid %then
   		%do;
      	        	%let nobs =%sysfunc(attrn(&amp;amp;dsid,nobs));
      		        %let rc = %sysfunc(close(&amp;amp;dsid));
   		%end;
	%else %do;
	        %** if the dataset doesnt exist then exit, we cant continue without it **;
		%put 'WARN: The Employee CTRL file was not created. Exiting';

		%let MAMsg=ERROR: The Employee CTRL file was not created. Exiting. ;
        	%let SYSCC=12 ;
         	%mastatus(&amp;amp;_stpwork.status.txt) ;
        	%return ;
	%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 21:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Customer-Intelligence/SAS-MA-popup-window/m-p/620348#M1411</guid>
      <dc:creator>JamesAnderson</dc:creator>
      <dc:date>2020-01-27T21:29:05Z</dc:date>
    </item>
  </channel>
</rss>

