<?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: Need Help with Multidimensional Array with a Third Dimension ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636356#M189053</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you all for your inputs.It would have been difficult to figure this out on my own.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Turns out that this is a fancy way of driving two sets of metrics&amp;nbsp;"Line Changes and Counts" at one go (or going by the analogy perhaps I should call this as :Block)&lt;/P&gt;
&lt;P&gt;3 types of Requests: " Automatic , Manual , Other"&amp;nbsp; : Building&lt;/P&gt;
&lt;P&gt;0 or 1 Sub-Types : Line Increase / Decrease : Room&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 20:40:03 GMT</pubDate>
    <dc:creator>r_behata</dc:creator>
    <dc:date>2020-03-31T20:40:03Z</dc:date>
    <item>
      <title>Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636258#M189000</link>
      <description>&lt;P&gt;I have come across an array statement which looks like this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;array credlimchg [1:3,0:1,&lt;FONT color="#FF0000"&gt;1:2&lt;/FONT&gt;]  &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;The first dimension corresponds to the rows and the second one to columns, but I am an unable to wrap my head around how to visualize the third one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
set test;&lt;BR /&gt;Set test;
array credlimchg [1:3,0:1,1:2]  
		acs_dec_amt
		acs_dec_cnt
		acs_inc_amt
		acs_inc_cnt
		man_dec_amt
		man_dec_cnt
		man_inc_amt
		man_inc_cnt
		oth_dec_amt
		oth_dec_cnt
		oth_inc_amt
		oth_inc_cnt;

	do x=lbound(credlimchg,1) to hbound(credlimchg,1);
		do y=lbound(credlimchg,2) to hbound(credlimchg,2);
			do z=lbound(credlimchg,3) to hbound(credlimchg,3);
				credlimchg[x,y,z]=0;
			end;
		end;
	end;

..............
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636258#M189000</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-03-31T15:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636260#M189002</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;but I am an unable to wrap my head around how to visualize the third one.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what you mean by "visualize" here.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636260#M189002</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-31T15:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636263#M189003</link>
      <description>&lt;P&gt;Picture yourself viewing a city block from straight above. The first dimension would be the East-West road, the second the North-South, and the third the floors in the building.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636263#M189003</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-31T15:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636266#M189004</link>
      <description>&lt;P&gt;Had the array been defined like :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;array credlimchg [1:3,0:1] COL1 COL2 COL3;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I would have imagined an array like :&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;COL1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;COL2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;COL3&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am unable to place the Third parameter in this picture ( Not sure if it can be Technically classified as a Dimension).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:39:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636266#M189004</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-03-31T15:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636269#M189006</link>
      <description>&lt;P&gt;Think of it as groups of tables, like what you get from PROC FREQ when you use a tables statement with three variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;BLOCK =1 

      COL    1  2  3
  row   1    a  b  c
  row   2    d  e  f

BLOCK =2

      COL    1  2  3
  row   1    g  h  i
  row   2    j  k  l 
  &lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636269#M189006</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-31T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636270#M189007</link>
      <description>&lt;P&gt;As long as you only have 3 dimensions, you should still be able to visualize it: Imagine a box with two layers: the topmost layer is matrix of values, and the layer below as well. Like you have it in an Excel workbook, where you refer to a cell by row, column and sheet name (or "number", if your sheets are just name "sheet1", "sheet2" etc.).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With more dimensions, it becomes difficult. A fourth dimension could be time, so you would then have a series of boxes, one for each day (or year, or hour, or whatever).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then it gets even harder. Not only in terms of visualization, but also in practical application: If you have a 3 by 4 by 4 by 12 by 12 manifold ("manifold", I think, is the mathematician's name for multidimensional matrices), and you know that one of the dimensions is "month", how do you find out exactly which dimension it is (there are two dimensions of size 12!). I had a lot of problems in my younger days, trying to figure out exactly such a problem. Not in SAS, but in APL, which is an all-matrix language. I later spoke to someone working a SimCorp, which make a lot of their calculations using that very powerful language. His comment: "we generally consider it bad programming practice to use more than two dimensions in a matrix".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, generally: avoid making arrays with too many dimensions. Instead use a standard table outlay, with one value (fact) for each combination of dimensions - this is both the normalized database outlay, and the dimensional modelling (Kimball) way of doing it. And SAS has a lot of wonderful procedures (e.g. SUMMARY, SQL, FREQ, you name it) for dealing with that kind of data.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:51:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636270#M189007</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-03-31T15:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636284#M189011</link>
      <description>&lt;P&gt;My "go to" for multi-dimensional processing is sort of an "aisle", "cabinet", "drawer" if I need 3. 4 dimenstions adds something like "Room" , then "building, then "block" ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this gives you a hint to one approach of&amp;nbsp; the normalizing that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt; mentions. Have variables Aisle, Cabinet, Drawer, each with the values of the dimension range used in the array. Then the array processing of some types move to Proc Summary or such easily.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Real rusty with Proc IML but that would be the main place to keep using such arrays, maybe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I remember a comment from the Linear Algebra class I took where the instructor told us an anecdote of attending a presentation that had some portion addressing a 9 dimension space. One of the audience had asked "Can you show this something I can visualize like in 5-space?"&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 16:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636284#M189011</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-31T16:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with Multidimensional Array with a Third Dimension ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636356#M189053</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you all for your inputs.It would have been difficult to figure this out on my own.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Turns out that this is a fancy way of driving two sets of metrics&amp;nbsp;"Line Changes and Counts" at one go (or going by the analogy perhaps I should call this as :Block)&lt;/P&gt;
&lt;P&gt;3 types of Requests: " Automatic , Manual , Other"&amp;nbsp; : Building&lt;/P&gt;
&lt;P&gt;0 or 1 Sub-Types : Line Increase / Decrease : Room&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-Help-with-Multidimensional-Array-with-a-Third-Dimension/m-p/636356#M189053</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-03-31T20:40:03Z</dc:date>
    </item>
  </channel>
</rss>

