<?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: creating a variable using information from two arrays in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591017#M15137</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, I tried that and got the following error. I pasted my code too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; set have;
array defendant [*] $ DEFENDANT_TYPE1-DEFENDANT_TYPE69;
array payment [*] DEF_INDEMNITY_PAID1-DEF_INDEMNITY_PAID69;
where_student=whichc('student', of DEFENDANT_TYPE[*]);
pay_student=DEF_INDEMNITY_PAID(where_student);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Error message: "ERROR: Array subscript out of range at line 1304 column 8". This refers to the line starting with pay_student. Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't have an array named DEF_INDEMNITY_PAID. You do have an array named PAYMENT. Your PAY_STUDENT= has to reference array PAYMENT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't have an array named DEFENDANT_TYPE, you have an array named DEFENDANT. WHICHC has to reference array DEFENDANT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please note I Modified my original code as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#FF0000"&gt;if where_student&amp;gt;0 then&lt;/FONT&gt; payment_to_student=payment(where_student);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Also, details are important, your code says&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;whichc('student', ... )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;but it should say&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;whichc('&lt;FONT color="#FF0000"&gt;S&lt;/FONT&gt;tudent', ...)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2019 19:06:16 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-09-23T19:06:16Z</dc:date>
    <item>
      <title>creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/590939#M15130</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 9.4 and need to create a variable (mean payment) using information from two different arrays. The example data below will hopefully highlight what I mean. There are 2 arrays: Defendant and Payment. Payment 1 refers to payment on behalf of Defendant 1; Payment 2 refers to payment on behalf of Defendant 2, etc. I'm interested in the mean payment when one was specifically made on behalf of a Student. The correct answer in this example data would be ($100+$200)/2=$150. How do I write SAS code extracting this information?&amp;nbsp;&amp;nbsp;Thanks for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example data&lt;/P&gt;&lt;P&gt;Case&amp;nbsp; Defendant1 Defendant2 Defendant3&amp;nbsp; Payment1&amp;nbsp;Payment2 Payment3&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Physician&amp;nbsp; &amp;nbsp; &amp;nbsp;Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Physician&amp;nbsp; &amp;nbsp; &amp;nbsp;Nurse&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&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>Mon, 23 Sep 2019 14:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/590939#M15130</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2019-09-23T14:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/590946#M15131</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using SAS 9.4 and need to create a variable (mean payment) using information from two different arrays. The example data below will hopefully highlight what I mean. There are 2 arrays: Defendant and Payment. Payment 1 refers to payment on behalf of Defendant 1; Payment 2 refers to payment on behalf of Defendant 2, etc. I'm interested in the mean payment when one was specifically made on behalf of a Student. The correct answer in this example data would be ($100+$200)/2=$150. How do I write SAS code extracting this information?&amp;nbsp;&amp;nbsp;Thanks for the help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example data&lt;/P&gt;
&lt;P&gt;Case&amp;nbsp; Defendant1 Defendant2 Defendant3&amp;nbsp; Payment1&amp;nbsp;Payment2 Payment3&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Physician&amp;nbsp; &amp;nbsp; &amp;nbsp;Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Physician&amp;nbsp; &amp;nbsp; &amp;nbsp;Nurse&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Student&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the answer you want is ($100+$200+$0)/3=$100, then this code should work. Otherwise you will have to modify the code so that payments of zero are not included in the average.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* UNTESTED CODE */

data want;
    set have;
    array defendant defendant1-defendant3;
    array payment payment1-payment3;
    where_student=whichc('Student',of defendant[*]);
    if where_student&amp;gt;0 then payment_to_student=payment(where_student);
run;
proc summary data=want;
    var payment_to_student;
    output out=mean mean=;
run;
    &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Sep 2019 19:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/590946#M15131</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-23T19:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591012#M15135</link>
      <description>&lt;P&gt;Thanks, I tried that and got the following error. I pasted my code too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; set have;
array defendant [*] $ DEFENDANT_TYPE1-DEFENDANT_TYPE69;
array payment [*] DEF_INDEMNITY_PAID1-DEF_INDEMNITY_PAID69;
where_student=whichc('student', of DEFENDANT_TYPE[*]);
pay_student=DEF_INDEMNITY_PAID(where_student);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error message: "ERROR: Array subscript out of range at line 1304 column 8". This refers to the line starting with pay_student. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 17:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591012#M15135</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2019-09-23T17:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591015#M15136</link>
      <description>&lt;P&gt;You have 69 pairs of variables?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error is probably saying that 'student' was not found.&amp;nbsp; If the value always in lowercase like you are searching for?&amp;nbsp; Or is it in uppercase? Mixed case?&amp;nbsp; Is it consistent or can it vary?&lt;/P&gt;
&lt;P&gt;Also could there be more than one pair where the name is STUDENT and the value is non-zero?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be better to transpose the data instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  array A_defendant DEFENDANT_TYPE1-DEFENDANT_TYPE69;
  array A_payment DEF_INDEMNITY_PAID1-DEF_INDEMNITY_PAID69;
  do i=1 to dim(A_defendant) ;
    defendant=upcase(A_defendant[i]);
    payment=A_payment[i];
    if not missing(payment) then output;
  end;
  drop i DEFENDANT_TYPE1-DEFENDANT_TYPE69
    DEF_INDEMNITY_PAID1-DEF_INDEMNITY_PAID69
   ;
run;

proc means N SUM MEAN MIN MAX;
  class defendant;
  var payment;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Sep 2019 18:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591015#M15136</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-23T18:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591017#M15137</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, I tried that and got the following error. I pasted my code too.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; set have;
array defendant [*] $ DEFENDANT_TYPE1-DEFENDANT_TYPE69;
array payment [*] DEF_INDEMNITY_PAID1-DEF_INDEMNITY_PAID69;
where_student=whichc('student', of DEFENDANT_TYPE[*]);
pay_student=DEF_INDEMNITY_PAID(where_student);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Error message: "ERROR: Array subscript out of range at line 1304 column 8". This refers to the line starting with pay_student. Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't have an array named DEF_INDEMNITY_PAID. You do have an array named PAYMENT. Your PAY_STUDENT= has to reference array PAYMENT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't have an array named DEFENDANT_TYPE, you have an array named DEFENDANT. WHICHC has to reference array DEFENDANT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please note I Modified my original code as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#FF0000"&gt;if where_student&amp;gt;0 then&lt;/FONT&gt; payment_to_student=payment(where_student);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Also, details are important, your code says&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;whichc('student', ... )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;but it should say&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;whichc('&lt;FONT color="#FF0000"&gt;S&lt;/FONT&gt;tudent', ...)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 19:06:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591017#M15137</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-23T19:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591041#M15142</link>
      <description>&lt;P&gt;Thanks, I think this will work but there is one caveat I didn't anticipate. That is, in each row of data, there could be two data points with a "Student" and they'd need to be summed by row before counting in the average. Would this be easier to do by proc sql?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 20:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591041#M15142</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2019-09-23T20:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591050#M15144</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, I think this will work but there is one caveat I didn't anticipate. That is, in each row of data, there could be two data points with a "Student" and they'd need to be summed by row before counting in the average. Would this be easier to do by proc sql?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That makes me think that the transpose approach to get a single record for each pair of values with the identification values might be a better bet. Then use proc means/summary twice, once to get the case sums by defendant type and the second to get a mean.&lt;/P&gt;
&lt;PRE&gt;data work.have;
informat case $5.  Defendant1 Defendant2 Defendant3 $10.   Payment1 Payment2 Payment3 comma12.;
input Case  Defendant1 Defendant2 Defendant3  Payment1 Payment2 Payment3 ;
datalines;
1  Student     .         .       $100      .            .
2  Physician  Student    .          0      $200        .
3  Physician  Nurse      Student $100      $300        0
4  Student    Nurse      Student $200      $200      $500
;


data work.trans;
   set work.have;
   array d defendant1-defendant3;
   array p payment1-payment3;
   do i= 1 to dim(d);
      defendant= d[i];
      payment  = p[i];
      output;
   end;
   keep case defendant payment;
run;

proc summary data=work.trans nway;
   where defendant='Student';
   class case ;
   var payment;
   output out=work.sum (drop=_:) sum=;
run;

proc summary data=work.sum;
   var payment;
   output out=work.mean mean=paymentmean;
run;

/* or this will summarize all the types of defendants */
proc summary data=work.trans nway;
   class defendant case;
   var payment;
   output out=work.sum2 (drop=_:) sum=;
run;

proc summary data=work.sum2 nway;
   class defendant;
   var payment;
   output out=work.mean2 mean=paymentmean;
run;


&lt;/PRE&gt;
&lt;P&gt;The key bit is the work.trans data set. Change the 3 to 69 (if that's how many sets of values you have).&lt;/P&gt;
&lt;P&gt;An exercise for the interested reader: don't include the missing payments in the transposition output set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 21:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591050#M15144</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-23T21:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable using information from two arrays</title>
      <link>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591058#M15145</link>
      <description>&lt;P&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; , you probably want to re-arrange the data to be one very long data set, and then the analysis is pretty easy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see how SQL will help here, in fact it seems harder than re-arranging the data.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 22:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/creating-a-variable-using-information-from-two-arrays/m-p/591058#M15145</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-23T22:52:40Z</dc:date>
    </item>
  </channel>
</rss>

