<?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 can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871037#M344053</link>
    <description>Especially in the face of large-scale projects, it is necessary to use proc DS2, macro, and FCMP cross-use&lt;BR /&gt;</description>
    <pubDate>Fri, 21 Apr 2023 07:41:58 GMT</pubDate>
    <dc:creator>_Sas_Beginner_</dc:creator>
    <dc:date>2023-04-21T07:41:58Z</dc:date>
    <item>
      <title>How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870894#M344024</link>
      <description>How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro， as if it were a call execute statement in Data step</description>
      <pubDate>Thu, 20 Apr 2023 20:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870894#M344024</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-20T20:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870925#M344034</link>
      <description>&lt;P&gt;You are describing what you want as a solution to a problem without explaining what the problem is. It would help if you explained this as well as there may be a better way to solve it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 22:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870925#M344034</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-04-20T22:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870980#M344036</link>
      <description>Thank you for your reply，I mean, how to call "%Macro~%Mend" in proc DS2</description>
      <pubDate>Fri, 21 Apr 2023 02:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870980#M344036</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T02:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870987#M344039</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434736"&gt;@_Sas_Beginner_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you for your reply，I mean, how to call "%Macro~%Mend" in proc DS2&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The macro processor is a PRE processor.&amp;nbsp; Embedding a macro definition into the middle of a data step (whether a real one or the DS2 one) makes no sense.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 02:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/870987#M344039</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-21T02:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871036#M344052</link>
      <description>&lt;P&gt;I found that the data step can use "call execute" to directly call "macro-mend", or you can directly wrap "macro-mend" with the "run_macro" of the fcmp function to complete the analysis of another thread and directly substitute into the data step, but the above can only be fully implemented in the data step, and the ds2 step cannot call the macro, which greatly improves the length of the code and reduces work efficiency&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*The following code can only be implemented in the data step, but not in ds2
*/
%macro distinct_values;

%let input_table = %sysfunc(dequote(&amp;amp;input_table));

%let column = %sysfunc(dequote(&amp;amp;column));

%let output_table = %sysfunc(dequote(&amp;amp;output_table));

proc sql;

create table &amp;amp;output_table as

select distinct &amp;amp;column

from &amp;amp;input_table;

%mend;
proc fcmp outlib=work.funcs.sql;

function get_distinct_values(input_table $, column $, output_table $);

rc = run_macro('distinct_values', input_table, column, output_table);

return (rc);

endsub;

run;
options cmplib = work.funcs;

data _null_;

rc = get_distinct_values('sashelp.shoes', 'region', 'work.regions');

id=open('work.regions');

if id then nobs=attrn(id,'NOBS');

put nobs;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Apr 2023 07:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871036#M344052</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871037#M344053</link>
      <description>Especially in the face of large-scale projects, it is necessary to use proc DS2, macro, and FCMP cross-use&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Apr 2023 07:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871037#M344053</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T07:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871043#M344059</link>
      <description>&lt;P&gt;I'm not sure I understand the use case is for your example, why not call the macro directly from open code?&lt;/P&gt;
&lt;P&gt;You could add put NOBS to the macro.&lt;/P&gt;
&lt;P&gt;Generally speaking, if you wish to call sub-routines from PROC DS2, use methods.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 08:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871043#M344059</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-04-21T08:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871048#M344064</link>
      <description>&lt;P&gt;"Especially in the face of large-scale projects, it is necessary to use proc DS2, macro, and FCMP cross-use". I'm with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt; here as I don't understand why you think you need to use all three of these together. It would help if you could explain your use case in more detail why these are required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I too work on large-scale projects and have never found a need to go beyond "normal"&amp;nbsp; macros.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 09:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871048#M344064</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-04-21T09:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871051#M344065</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434736"&gt;@_Sas_Beginner_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very quickly,&amp;nbsp; for this example "Getting the number of unique values of a specific column" You don't need to over complicate it, here is a simpler approach&lt;/P&gt;
&lt;P&gt;This may not answer your Proc DS2 question/issue, but I wanted to show you simpler way for your example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* For confirmation */
proc sql;
	select distinct region from sashelp.shoes;
quit;
&lt;BR /&gt;/* Does everything in a single step !*/
data _null_;
	rc=dosubl('%let g_unique=; proc sql noprint; select count (distinct region) into :g_unique from sashelp.shoes; quit;');
	nobs=symget('g_unique');
	put nobs=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 10:08:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871051#M344065</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-21T10:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871054#M344068</link>
      <description>&lt;P&gt;"&lt;EM&gt;Embedding a macro definition into the middle of a data step [...] makes no sense.&lt;/EM&gt;" - I dare to dissagre &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to create a macro with a "dynamic" name &lt;EM&gt;that&lt;/EM&gt; may be the case:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  do i = "A", "B", "C";
    rc = resolve('%macro ' !! i !! '(); %put NOTE:[&amp;amp;sysmacroname.]; 
                  title "&amp;amp;sysmacroname."; 
                  data &amp;amp;sysmacroname.; 
                  set sashelp.class(obs=3);  
                  run; 
                  proc print;
                  run;
                  %mend;');
  end;
run;

%A()

%B()

%C()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 10:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871054#M344068</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T10:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871055#M344069</link>
      <description>THANKS FOR YOUR ANSWER!</description>
      <pubDate>Fri, 21 Apr 2023 10:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871055#M344069</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T10:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871056#M344070</link>
      <description>&lt;P&gt;DoSubL() is not supported in DS2 &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It also not support Resolve()...&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    %let x = 17;
2
3    proc ds2;
4
5    data _null_;
6
7    method init();
8    rc = resolve('&amp;amp;x.');
9    end;
10
11   enddata;
12   run;
ERROR: Compilation error.
ERROR: Unknown function resolve.
13
14   quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 10:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871056#M344070</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T10:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871057#M344071</link>
      <description>perferly！may be your answer is top！I love this answer！</description>
      <pubDate>Fri, 21 Apr 2023 10:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871057#M344071</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T10:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871059#M344072</link>
      <description>&lt;P&gt;I'm using this trick in the MacroArray package (&lt;A href="https://github.com/SASPAC/macroarray)" target="_blank"&gt;https://github.com/SASPAC/macroarray)&lt;/A&gt;&amp;nbsp;to create dynamically named macros which are calling macro array lists.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, the `&lt;CODE class=" language-sas"&gt;%ABC&lt;/CODE&gt;` macro is generated automatically inside of &lt;CODE class=" language-sas"&gt; %array()&lt;/CODE&gt;macro:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  %array(ABC[17] (111:127), macarray=Y); 
  
  %macro test();
    %do i = 1 %to 17; 
      %put &amp;amp;i.) %ABC(&amp;amp;i.); 
    %end;
  %mend;
  %test() 
  
  %let %ABC(13,i) = 99999;

  %do_over(ABC, phrase=%nrstr( 
      %put &amp;amp;_i_.%) %ABC(&amp;amp;_i_.); 
      ),
      which = 1:H:2
  );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 11:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871059#M344072</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T11:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871061#M344074</link>
      <description>I FOLLOW YOU AND YOU OFFERED WEBSITE!</description>
      <pubDate>Fri, 21 Apr 2023 11:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871061#M344074</guid>
      <dc:creator>_Sas_Beginner_</dc:creator>
      <dc:date>2023-04-21T11:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871078#M344087</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did mention the dosubl was not for the Proc DS2 question/issue. For DS2 it would best to use either SQLSTMT package or the HASH Package&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871078#M344087</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-21T12:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871079#M344088</link>
      <description>&lt;P&gt;My fault, didn't noticed that. Sorry.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:05:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871079#M344088</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T12:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871082#M344091</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/434736"&gt;@_Sas_Beginner_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you accepting my answer, but here is a Proc DS2 approach if you still needed. This will highly depend on the ability to fit the data into memory&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* DS2 cannot work with concatenated libraries, such as SASHELP! */&lt;BR /&gt;proc copy in=sashelp out=work;
select shoes;
run;

proc ds2 ;
	data _null_;
		dcl package hash h();
		dcl char(55) region;
		dcl int cnt;
		method init();
			h.dataset('work.shoes');
			h.keys([region]);
			h.hashexp(8);
			h.ordered('a');
			h.multidata('no');
			h.defineDone();
			
			/* Get number of unique values */
			cnt=h.num_items;
			put cnt=;
		end;
	enddata;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871082#M344091</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-21T12:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871083#M344092</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35763"&gt;@yabwon&lt;/a&gt;&lt;BR /&gt;This is the Proc DS2 approach &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;it takes around 0.07 seconds for the region column from the sashelp.shoes data set</description>
      <pubDate>Fri, 21 Apr 2023 12:28:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871083#M344092</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-21T12:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use a proc procedure step in proc DS2 to call a proc procedure step in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871094#M344094</link>
      <description>&lt;P&gt;On my machine even faster:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: PROCEDURE DS2 used (Total process time):
      real time           0.02 seconds
      user cpu time       0.01 seconds
      system cpu time     0.01 seconds
      memory              8071.31k
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but&amp;nbsp; a good old data step is still faster (and memory cheaper) &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    data _null_;
2        dcl hash h(dataset:'work.shoes2');
3          h.defineKey("region");
4          h.defineDone();
5
6          /* Get number of unique values */
7          cnt=h.num_items;
8          put cnt=;
9        stop;
10       set work.shoes;
11   run;

NOTE: There were 395 observations read from the data set WORK.SHOES2.
cnt=10
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      user cpu time       0.00 seconds
      system cpu time     0.00 seconds
      memory              1099.40k&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-use-a-proc-procedure-step-in-proc-DS2-to-call-a-proc/m-p/871094#M344094</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-04-21T12:49:11Z</dc:date>
    </item>
  </channel>
</rss>

