<?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 array idea help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483542#M71733</link>
    <description>&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; tbl;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; ord subord label _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; shell_final combo;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; in (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_1) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col1=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_1, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_1/&amp;amp;tot1)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_1) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col1=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_2) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col2=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_2, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_2/&amp;amp;tot2)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_2) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col2=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_3) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col3=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_3, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_3/&amp;amp;tot3)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_3) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col3=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_9) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col9=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_9, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_9/&amp;amp;tot9)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_9) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col9=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;　&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; tbl2;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; ord subord label _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; shell_final combo;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;　&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;array&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;} $ _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;to&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{i} ^=&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' '&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; label=&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'No'&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{i}=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(vars{i}, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((vars{i}/&amp;amp;tot9)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to see if there is a way that I can replicate the first code into an array. tbl works for what I am doing but was wondering if I could use an array to accomplish the same thing. In the second code cluster is my attempt to trying an array, but it doesn't work.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 19:18:30 GMT</pubDate>
    <dc:creator>chrissowden</dc:creator>
    <dc:date>2018-08-02T19:18:30Z</dc:date>
    <item>
      <title>array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483542#M71733</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; tbl;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; ord subord label _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; shell_final combo;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; in (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_1) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col1=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_1, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_1/&amp;amp;tot1)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_1) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col1=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_2) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col2=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_2, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_2/&amp;amp;tot2)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_2) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col2=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_3) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col3=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_3, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_3/&amp;amp;tot3)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_3) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col3=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_9) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col9=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(_9, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((_9/&amp;amp;tot9)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;else&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; missing(_9) &lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; col9=put(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;　&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;drop&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; tbl2;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;retain&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; ord subord label _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;merge&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; shell_final combo;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; subord;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;　&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;array&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;} $ _1 _2 _3 _9;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;to&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{i} ^=&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' '&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; label=&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'No'&lt;/FONT&gt; &lt;FONT color="#ff8040" face="Courier New"&gt;then&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; vars{i}=&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(vars{i}, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;' ('&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;||&lt;/FONT&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;put&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;((vars{i}/&amp;amp;tot9)*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;3.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;)||&lt;/FONT&gt;&lt;FONT color="#ff00ff" face="Courier New"&gt;'%)'&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#ff8040" face="Courier New"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to see if there is a way that I can replicate the first code into an array. tbl works for what I am doing but was wondering if I could use an array to accomplish the same thing. In the second code cluster is my attempt to trying an array, but it doesn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 19:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483542#M71733</guid>
      <dc:creator>chrissowden</dc:creator>
      <dc:date>2018-08-02T19:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483545#M71734</link>
      <description>&lt;P&gt;This kind of problem is much easier to help you with if you provide some example data for testing your code. That means you will get your answer far quicker also.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 19:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483545#M71734</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-08-02T19:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483551#M71735</link>
      <description>&lt;P&gt;It's a big practice&amp;nbsp;dataset from work. it was just an idea that I was thinking about.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 19:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483551#M71735</guid>
      <dc:creator>chrissowden</dc:creator>
      <dc:date>2018-08-02T19:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483574#M71737</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130109"&gt;@chrissowden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It's a big practice&amp;nbsp;dataset from work. it was just an idea that I was thinking about.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So provide a small subset of data, 5 to 10 records, and maybe a smaller number of variables. If an array will work with 4 variables it is very likely that it will scale to 40 or 400 variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And don't hide details with undefined macro variables such as your &amp;amp;tot1 &amp;amp;tot2 &amp;amp;tot3 &amp;amp;tot9&lt;/P&gt;
&lt;P&gt;And then what the desired output should look like in some form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 20:15:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483574#M71737</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-02T20:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483593#M71740</link>
      <description>&lt;P&gt;First issue to clear up ... does the top program work properly?&amp;nbsp; If so, that establishes that _1 _2 _3 and _9 are numeric variables.&amp;nbsp; They don't belong in an array of character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The character elements you are creating require 10 characters.&amp;nbsp; If you specify $ only, and not a length, you will assign a length of 8 which is not long enough.&amp;nbsp; Here's an array approach.&amp;nbsp; Note that it takes 3 arrays:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;data want;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;retain ord subord label;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;merge shell_final combo;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;array orig {4} _1 _2 _3 _9;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;array denoms {4} _temporary_ (&amp;amp;tot1 &amp;amp;tot2 &amp;amp;tot3 &amp;amp;tot9);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;array newvars {4} $ 10 col1 col2 col3 col9;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;do k=1 to 4;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;if not missing orig{k} then newvars{k} = &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;put(orig{k}, 3.) || ' (' || put((orig{k} / denoms{k}) * 100, 3.) || '%)';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp;else newvars{k} = '&amp;nbsp; 0';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;drop k _1 _2 _3 _9;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code is untested (that part is up to you), but looks about right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 20:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/483593#M71740</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-02T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: array idea help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/484342#M71817</link>
      <description>Thanks so much. I had to make some changes to your code, but I got it to work. Thanks a bunch!</description>
      <pubDate>Mon, 06 Aug 2018 12:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/array-idea-help/m-p/484342#M71817</guid>
      <dc:creator>chrissowden</dc:creator>
      <dc:date>2018-08-06T12:59:48Z</dc:date>
    </item>
  </channel>
</rss>

