<?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 Create 99 columns automatically in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814896#M321657</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to create a table with 99 rows and 99 columns automatically.&lt;/P&gt;
&lt;P&gt;With this macros I'm able to create 99 row automatically.:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;%MACRO CALCULATE(COLUMN=);	
	data &amp;amp;column;
		do i=1 to 99;
			output;
		end;
		rename i=freq_range;
	run;
%MEND;

%CALCULATE(COLUMN=_1);&lt;/PRE&gt;
&lt;P&gt;but I haven't any idea how to create 99 columns automatically.&lt;/P&gt;
&lt;P&gt;Is there a way?&lt;/P&gt;</description>
    <pubDate>Tue, 24 May 2022 15:51:00 GMT</pubDate>
    <dc:creator>Rakeon</dc:creator>
    <dc:date>2022-05-24T15:51:00Z</dc:date>
    <item>
      <title>Create 99 columns automatically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814896#M321657</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to create a table with 99 rows and 99 columns automatically.&lt;/P&gt;
&lt;P&gt;With this macros I'm able to create 99 row automatically.:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;%MACRO CALCULATE(COLUMN=);	
	data &amp;amp;column;
		do i=1 to 99;
			output;
		end;
		rename i=freq_range;
	run;
%MEND;

%CALCULATE(COLUMN=_1);&lt;/PRE&gt;
&lt;P&gt;but I haven't any idea how to create 99 columns automatically.&lt;/P&gt;
&lt;P&gt;Is there a way?&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 15:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814896#M321657</guid>
      <dc:creator>Rakeon</dc:creator>
      <dc:date>2022-05-24T15:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create 99 columns automatically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814897#M321658</link>
      <description>&lt;P&gt;Details about the "columns" would be helpful.&lt;/P&gt;
&lt;P&gt;The easiest way to create a multiple variables of the same type is an array statement. This would create 99 variables named var1 through var99 that are numeric. If you need different types of variables, such as a mix of character and numeric then you need to specify more information.&lt;/P&gt;
&lt;PRE&gt;%MACRO CALCULATE(COLUMN=);	
	data &amp;amp;column;
                array var(99);
		do i=1 to 99;
			output;
		end;
		rename i=freq_range;
	run;
%MEND;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 May 2022 15:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814897#M321658</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-05-24T15:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create 99 columns automatically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814902#M321665</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO CALCULATE(COLUMN=);	
	data want;
               array var(&amp;amp;column) _1-_&amp;amp;column.;
		do i=1 to &amp;amp;column;
			output;
		end;
	run;
%MEND;

%CALCULATE(COLUMN=99);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That macro also renames and does some other things.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect this is an &lt;A href="https://xyproblem.info/" target="_self"&gt;XY problem&lt;/A&gt;, what are you actually trying to accomplish?&lt;/P&gt;
&lt;P&gt;Otherwise, I've included an example above where you can create a set of variables, _1- _99 with 99 number of rows as well. To modify the size, change the parameter to the macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24745"&gt;@Rakeon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to create a table with 99 rows and 99 columns automatically.&lt;/P&gt;
&lt;P&gt;With this macros I'm able to create 99 row automatically.:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;%MACRO CALCULATE(COLUMN=);	
	data &amp;amp;column;
		do i=1 to 99;
			output;
		end;
		rename i=freq_range;
	run;
%MEND;

%CALCULATE(COLUMN=_1);&lt;/PRE&gt;
&lt;P&gt;but I haven't any idea how to create 99 columns automatically.&lt;/P&gt;
&lt;P&gt;Is there a way?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 16:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814902#M321665</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-24T16:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create 99 columns automatically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814922#M321674</link>
      <description>&lt;P&gt;No macro is needed.&lt;/P&gt;
&lt;P&gt;Here is code to create a dataset with 99 VARIABLES and 99 OBSERVATIONS.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   length var1-var99 8;
   do _n_=1 to 99;
      output;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course all 99*99 values are missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What variables do you want to create?&amp;nbsp; What names should the variable have?&amp;nbsp; What type of variables should they be? Should they all be numeric?&amp;nbsp; Character? If character should they all be the same length?&lt;/P&gt;
&lt;P&gt;What values do you want in the 99 different observations?&amp;nbsp; Or do you want 99 observations that are all exactly the same?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814922#M321674</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-24T17:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create 99 columns automatically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814936#M321682</link>
      <description>Hi,&lt;BR /&gt;thanks also what have you done is working!!!</description>
      <pubDate>Tue, 24 May 2022 18:52:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-99-columns-automatically/m-p/814936#M321682</guid>
      <dc:creator>Rakeon</dc:creator>
      <dc:date>2022-05-24T18:52:26Z</dc:date>
    </item>
  </channel>
</rss>

