<?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: What does temporary dataset in SET statement mean? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739428#M230790</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt;.&amp;nbsp;whether&amp;nbsp;&lt;STRONG&gt;cc&lt;/STRONG&gt;&amp;nbsp;is the name of this array, please?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes it is&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 08:30:42 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-05-06T08:30:42Z</dc:date>
    <item>
      <title>What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739373#M230755</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Today, I found a discussion to generate &lt;A href="https://communities.sas.com/t5/SAS-Procedures/Making-a-publication-quality-table-from-regression-results-using/td-p/396779" target="_self"&gt;a publication-quality table by using SAS&lt;/A&gt;. From the highest voted answer in this discussion of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114"&gt;@ciro&lt;/a&gt;&amp;nbsp;, I notice something as below, I really appreciate if you can hint me what do they mean:&lt;/P&gt;
&lt;P&gt;This is the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT= WORK.PARM  DATAFILE= "G:\temp\parm.xls"  DBMS=EXCEL REPLACE;
  RANGE="parm";
  GETNAMES=YES;
  MIXED=NO;
  SCANTEXT=YES;
  USEDATE=YES;
  SCANTIME=YES;
RUN;
/*write a dataset with standard error on the same column of coefficient*/
data parm2;
set temp.parm;
if not missing(stderr) and variable not in ('R-square','Adj.R-sq','N. Obs.') then do; 
value=estimate; type='coefficient'; output; end;
if not missing(stderr) then do; value=stderr; type='stderr' ;output; end;
if variable in ('R-square','Adj.R-sq','N. Obs.') then do; value=estimate; type=variable ;output; end; 
run;


proc format;           
	picture stderrf (round)       
     	low-high=' 9.9999)' (prefix='(')                                
            .=' ';                                                  
run;



ods html close;
ods html;
title;
proc report data=parm2 nowd  out=temptbl;
*column model numord variable type dependent, value;
column numord variable type dependent, (value probt);
define numord /group order=data noprint;
define variable / group order=data ' ';
define type / group order=data noprint;
define dependent / across ' ';
define value /analysis sum;
define probt /analysis sum;

compute value;
  array cc _c5_ _c7_ _c9_ ;
      if type='stderr' then do;
         call define(_col_,'format','stderrf.');
      end;
	  else if type='coefficient' then do; 
		call define(_col_,'format','8.4');
        do i=1 to 3;
        if 0.05&amp;lt;cc(i) &amp;lt;= 0.1  then call define(_col_, "style", "style=[ posttext='*']" ); 
        else if 0.01 &amp;lt;cc(i) &amp;lt;=0.05 then call define(_col_, "style", "style=[ posttext='**']" ); 
        else if cc(i) &amp;lt;= 0.01   then call define(_col_, "style", "style=[ posttext='***']" );
		end;
		end;
   endcomp;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I know some of you do not want to open the excel file outside so I post the picture for the parm.xls here:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_0-1620257948025.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59080i42650B09996E9A91/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_0-1620257948025.png" alt="Phil_NZ_0-1620257948025.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&amp;gt; What is the purpose of using &lt;STRONG&gt;temp&lt;/STRONG&gt; in &lt;STRONG&gt;set&lt;/STRONG&gt; statement? (&lt;CODE class=" language-sas"&gt;set temp.parm;)&lt;/CODE&gt;&amp;nbsp;I do not understand the meaning of using temporary dataset input, why would we do that?&lt;/P&gt;
&lt;P&gt;2&amp;gt; I have the same questions with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/339085"&gt;@jtobin&lt;/a&gt;&amp;nbsp;about where they got the "cc" array. I read the answer of&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; about that but it is still ambiguous to me. What I want to ask here is: which column of the dataset&lt;STRONG&gt; parm&lt;/STRONG&gt; is associated with&lt;STRONG&gt; cc&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;3&amp;gt; To generate an excel file like&lt;STRONG&gt; parm&lt;/STRONG&gt;, what are two variables: &lt;STRONG&gt;Probt&lt;/STRONG&gt; and &lt;STRONG&gt;numord&lt;/STRONG&gt; in my statistical output as below? I guessed &lt;STRONG&gt;Probt&lt;/STRONG&gt; is the column Pr&amp;gt;|t| aka p-value and &lt;STRONG&gt;numord&lt;/STRONG&gt; seems to be associated with the order of variables in column variable; however, why &lt;STRONG&gt;numord&lt;/STRONG&gt; or R-square and else are up to 1000,1001,2000?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Phil_NZ_0-1620259922371.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59081i1707BD9DE0DA7B31/image-size/large?v=v2&amp;amp;px=999" role="button" title="Phil_NZ_0-1620259922371.png" alt="Phil_NZ_0-1620259922371.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you and warm regards.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit reason: Update the guess in &lt;STRONG&gt;numord&lt;/STRONG&gt; and &lt;STRONG&gt;Probt&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 04:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739373#M230755</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-05-06T04:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739378#M230758</link>
      <description>&lt;P&gt;Most likely a typo in the program.&lt;/P&gt;
&lt;P&gt;The previous step is converting an Excel sheet into a dataset named WORK.PARM.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 01:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739378#M230758</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-06T01:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739379#M230759</link>
      <description>&lt;P&gt;Regarding your question about this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;array cc _c5_ _c7_ _c9_ ;&lt;/PRE&gt;
&lt;P&gt;The array here references PROC REPORT columns NOT SAS dataset variables. In this procedure you can code logic using the columns being created in the report so _C1_ refers to first column reading from left to right in the report. _C5_ is the fifth column.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 01:30:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739379#M230759</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-06T01:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739382#M230761</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your comment, and I agree with you that it is a typo error because it announces an error when I let the temp over there, so I decided to delete the &lt;STRONG&gt;temp.&lt;/STRONG&gt; word.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;42         /*write a dataset with standard error on the same column of coefficient*/
43         data parm2;
44         set temp.parm;
ERROR: File TEMP.PARM.DATA does not exist.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 03:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739382#M230761</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-05-06T03:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739388#M230766</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a look on the element of an array &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/p08do6szetrxe2n136ush727sbuo.htm#:~:text=A%20SAS%20array%20is%20simply,element%20in%20a%20program%20statement." target="_self"&gt;here&lt;/A&gt;, can I ask a question whether &lt;STRONG&gt;cc&lt;/STRONG&gt; is the name of this array, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Phil.&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 04:13:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739388#M230766</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-05-06T04:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739391#M230769</link>
      <description>&lt;P&gt;temp is just a libref but given that there is no libname statement in the code and the proc import writes to work and not temp it's likely as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;states just a left over.&lt;/P&gt;
&lt;P&gt;You could make this bit of the code work as is by adding the following on top of the code which creates libref temp pointing to work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname temp "%sysfunc(pathname(work))";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 May 2021 05:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739391#M230769</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-05-06T05:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: What does temporary dataset in SET statement mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739428#M230790</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;.&amp;nbsp;whether&amp;nbsp;&lt;STRONG&gt;cc&lt;/STRONG&gt;&amp;nbsp;is the name of this array, please?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes it is&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 08:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-temporary-dataset-in-SET-statement-mean/m-p/739428#M230790</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-05-06T08:30:42Z</dc:date>
    </item>
  </channel>
</rss>

