<?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 Multiplying Every Observation by Column in Another Dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532788#M146016</link>
    <description>&lt;P&gt;Windows 10, Version 9.4, no access to SAS/STATS thus cannot use "proc iml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code successfully multiplies each observation in work.beta2 by the corresponding&amp;nbsp;column variable "fix" in work.alpha2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.alpha2;
                infile datalines;
                input fix @@;
                datalines;
            0 1 23 58 72 89 91 76
               ;
               run;

data work.beta2;
                infile datalines;
                input al s zn zr;
                datalines;
             5 7 8 4
			 6 4 8 9
			 7 3 2 6
			 9 8 7 6
			 5 3 1 4
			 7 6 2 8
			 5 7 2 1
			 4 3 7 6
               ;
run;

data work.H_product;
	merge work.alpha2 work.beta2;
	H_al=al*fix;
	H_s=s*fix;
	H_zn=zn*fix;
	H_zr=zr*fix;
	drop al s zn zr fix;
run;

proc print data=work.alpha2; title 'alpha2'; run;
proc print data=work.beta2; title 'beta2'; run;
proc print data=work.H_product; title 'H_Product- Each value is product '; run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output is correct and&amp;nbsp;looks like this - but cleaner:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H_Al&amp;nbsp; H_S H_Zn H_zr&lt;/P&gt;&lt;P&gt;&amp;nbsp;0&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; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;&lt;P&gt;161&amp;nbsp;&amp;nbsp;&amp;nbsp; 69&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp; 138&lt;/P&gt;&lt;P&gt;522&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 464&amp;nbsp;&amp;nbsp;&amp;nbsp; 406&amp;nbsp;&amp;nbsp;&amp;nbsp; 348&lt;/P&gt;&lt;P&gt;360&amp;nbsp;&amp;nbsp;&amp;nbsp; 216&amp;nbsp;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp; 288&lt;/P&gt;&lt;P&gt;623&amp;nbsp;&amp;nbsp;&amp;nbsp; 534&amp;nbsp;&amp;nbsp;&amp;nbsp; 178&amp;nbsp;&amp;nbsp;&amp;nbsp; 712&lt;/P&gt;&lt;P&gt;455&amp;nbsp;&amp;nbsp;&amp;nbsp; 637&amp;nbsp;&amp;nbsp;&amp;nbsp; 182&amp;nbsp;&amp;nbsp;&amp;nbsp; 91&lt;/P&gt;&lt;P&gt;304&amp;nbsp;&amp;nbsp; 228&amp;nbsp;&amp;nbsp;&amp;nbsp; 532&amp;nbsp;&amp;nbsp; 456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is the real file work.beta2 has over 100 variables with 50,000 observations.&amp;nbsp; Similarly, there are 50,000 values for "fix".&amp;nbsp; I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to put the values of fix in a macro variable&amp;nbsp;but received out of range type errors. I recall using index variables with SQL, but do not know if these are permitted within SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice, hints, suggestions, or general feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jane&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Feb 2019 22:16:29 GMT</pubDate>
    <dc:creator>jawhitmire</dc:creator>
    <dc:date>2019-02-04T22:16:29Z</dc:date>
    <item>
      <title>Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532788#M146016</link>
      <description>&lt;P&gt;Windows 10, Version 9.4, no access to SAS/STATS thus cannot use "proc iml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code successfully multiplies each observation in work.beta2 by the corresponding&amp;nbsp;column variable "fix" in work.alpha2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.alpha2;
                infile datalines;
                input fix @@;
                datalines;
            0 1 23 58 72 89 91 76
               ;
               run;

data work.beta2;
                infile datalines;
                input al s zn zr;
                datalines;
             5 7 8 4
			 6 4 8 9
			 7 3 2 6
			 9 8 7 6
			 5 3 1 4
			 7 6 2 8
			 5 7 2 1
			 4 3 7 6
               ;
run;

data work.H_product;
	merge work.alpha2 work.beta2;
	H_al=al*fix;
	H_s=s*fix;
	H_zn=zn*fix;
	H_zr=zr*fix;
	drop al s zn zr fix;
run;

proc print data=work.alpha2; title 'alpha2'; run;
proc print data=work.beta2; title 'beta2'; run;
proc print data=work.H_product; title 'H_Product- Each value is product '; run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output is correct and&amp;nbsp;looks like this - but cleaner:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H_Al&amp;nbsp; H_S H_Zn H_zr&lt;/P&gt;&lt;P&gt;&amp;nbsp;0&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; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;&lt;P&gt;161&amp;nbsp;&amp;nbsp;&amp;nbsp; 69&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp; 138&lt;/P&gt;&lt;P&gt;522&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 464&amp;nbsp;&amp;nbsp;&amp;nbsp; 406&amp;nbsp;&amp;nbsp;&amp;nbsp; 348&lt;/P&gt;&lt;P&gt;360&amp;nbsp;&amp;nbsp;&amp;nbsp; 216&amp;nbsp;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp; 288&lt;/P&gt;&lt;P&gt;623&amp;nbsp;&amp;nbsp;&amp;nbsp; 534&amp;nbsp;&amp;nbsp;&amp;nbsp; 178&amp;nbsp;&amp;nbsp;&amp;nbsp; 712&lt;/P&gt;&lt;P&gt;455&amp;nbsp;&amp;nbsp;&amp;nbsp; 637&amp;nbsp;&amp;nbsp;&amp;nbsp; 182&amp;nbsp;&amp;nbsp;&amp;nbsp; 91&lt;/P&gt;&lt;P&gt;304&amp;nbsp;&amp;nbsp; 228&amp;nbsp;&amp;nbsp;&amp;nbsp; 532&amp;nbsp;&amp;nbsp; 456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is the real file work.beta2 has over 100 variables with 50,000 observations.&amp;nbsp; Similarly, there are 50,000 values for "fix".&amp;nbsp; I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to put the values of fix in a macro variable&amp;nbsp;but received out of range type errors. I recall using index variables with SQL, but do not know if these are permitted within SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice, hints, suggestions, or general feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jane&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 22:16:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532788#M146016</guid>
      <dc:creator>jawhitmire</dc:creator>
      <dc:date>2019-02-04T22:16:29Z</dc:date>
    </item>
    <item>
      <title>Multiplying Observations by Single Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532784#M146026</link>
      <description>&lt;P&gt;Windows 10, Version 9.4, no access to SAS/STATS thus cannot use "proc iml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code successfully multiplies each observation in work.beta2 by the corresponding&amp;nbsp;column variable "fix" in work.alpha2.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.alpha2;
                infile datalines;
                input fix @@;
                datalines;
            0 1 23 58 72 89 91 76
               ;
               run;

data work.beta2;
                infile datalines;
                input al s zn zr;
                datalines;
             5 7 8 4
			 6 4 8 9
			 7 3 2 6
			 9 8 7 6
			 5 3 1 4
			 7 6 2 8
			 5 7 2 1
			 4 3 7 6
               ;
run;

data work.H_product;
	merge work.alpha2 work.beta2;
	H_al=al*fix;
	H_s=s*fix;
	H_zn=zn*fix;
	H_zr=zr*fix;
	drop al s zn zr fix;
run;

proc print data=work.alpha2; title 'alpha2'; run;
proc print data=work.beta2; title 'beta2'; run;
proc print data=work.H_product; title 'H_Product- Each value is product '; run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output is correct and&amp;nbsp;looks like this - but cleaner:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;H_Al&amp;nbsp; H_S H_Zn H_zr&lt;/P&gt;&lt;P&gt;&amp;nbsp;0&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; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;&lt;P&gt;161&amp;nbsp;&amp;nbsp;&amp;nbsp; 69&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp; 138&lt;/P&gt;&lt;P&gt;522&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 464&amp;nbsp;&amp;nbsp;&amp;nbsp; 406&amp;nbsp;&amp;nbsp;&amp;nbsp; 348&lt;/P&gt;&lt;P&gt;360&amp;nbsp;&amp;nbsp;&amp;nbsp; 216&amp;nbsp;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp; 288&lt;/P&gt;&lt;P&gt;623&amp;nbsp;&amp;nbsp;&amp;nbsp; 534&amp;nbsp;&amp;nbsp;&amp;nbsp; 178&amp;nbsp;&amp;nbsp;&amp;nbsp; 712&lt;/P&gt;&lt;P&gt;455&amp;nbsp;&amp;nbsp;&amp;nbsp; 637&amp;nbsp;&amp;nbsp;&amp;nbsp; 182&amp;nbsp;&amp;nbsp;&amp;nbsp; 91&lt;/P&gt;&lt;P&gt;304&amp;nbsp;&amp;nbsp; 228&amp;nbsp;&amp;nbsp;&amp;nbsp; 532&amp;nbsp;&amp;nbsp; 456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is the real file work.beta2 has over 100 variables with 50,000 observations.&amp;nbsp; Similarly, there are 50,000 values for "fix".&amp;nbsp; I&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to put the values of fix in a macro variable&amp;nbsp;but received out of range type errors. I recall using index variables with SQL, but do not know if these are permitted within SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice, hints, suggestions, or general feedback is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jane&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 22:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532784#M146026</guid>
      <dc:creator>jawhitmire</dc:creator>
      <dc:date>2019-02-04T22:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532794#M146022</link>
      <description>SAS/IML and SAS/STATS are independent products. You can check your license with the following:&lt;BR /&gt;&lt;BR /&gt;proc product_status;run;</description>
      <pubDate>Mon, 04 Feb 2019 22:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532794#M146022</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-04T22:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532796#M146023</link>
      <description>&lt;P&gt;1.would require pass on the dicitionary columns, concatenate with h_ as prefix on the needed columns and group that into a macro var that will essentially your array elements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. And then a linear boring loop&amp;nbsp; 1 to dim(array);multiply; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you really need to give us the best representative of your real so,we can avoid going back and forth. My 2 cents&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 22:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532796#M146023</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-02-04T22:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532798#M146025</link>
      <description>&lt;P&gt;You can use arrays. In this case, I would suggest dynamically creating the names using a macro or macro variable. Assuming your inputs are all the same, this should dynamically handle your data. I have not dropped the variables so that you can verify the calculations first. You can uncomment the DROP statement to drop them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sas"&gt;proc sql noprint;
select name into :var_list separated by " " from sashelp.vcolumn where libname='WORK' and memname='BETA2';
select catx("_", "H", name) into :rename_list separated by " " from sashelp.vcolumn where libname='WORK' and memname='BETA2';
quit;
*just in case;
%let N_OBS = &amp;amp;sqlobs;


data work.H_product;
	merge work.alpha2 work.beta2;
	array in(*) &amp;amp;var_list;
	array out(*) &amp;amp;rename_list;
    do i=1 to dim(in);
	out(i) = in(i) * fix;
	end;

*drop &amp;amp;var_list;
	
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/248885"&gt;@jawhitmire&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Windows 10, Version 9.4, no access to SAS/STATS thus cannot use "proc iml"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code successfully multiplies each observation in work.beta2 by the corresponding&amp;nbsp;column variable "fix" in work.alpha2.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.alpha2;
                infile datalines;
                input fix @@;
                datalines;
            0 1 23 58 72 89 91 76
               ;
               run;

data work.beta2;
                infile datalines;
                input al s zn zr;
                datalines;
             5 7 8 4
			 6 4 8 9
			 7 3 2 6
			 9 8 7 6
			 5 3 1 4
			 7 6 2 8
			 5 7 2 1
			 4 3 7 6
               ;
run;

data work.H_product;
	merge work.alpha2 work.beta2;
	H_al=al*fix;
	H_s=s*fix;
	H_zn=zn*fix;
	H_zr=zr*fix;
	drop al s zn zr fix;
run;

proc print data=work.alpha2; title 'alpha2'; run;
proc print data=work.beta2; title 'beta2'; run;
proc print data=work.H_product; title 'H_Product- Each value is product '; run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output is correct and&amp;nbsp;looks like this - but cleaner:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;H_Al&amp;nbsp; H_S H_Zn H_zr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;0&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; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;161&amp;nbsp;&amp;nbsp;&amp;nbsp; 69&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp; 138&lt;/P&gt;
&lt;P&gt;522&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 464&amp;nbsp;&amp;nbsp;&amp;nbsp; 406&amp;nbsp;&amp;nbsp;&amp;nbsp; 348&lt;/P&gt;
&lt;P&gt;360&amp;nbsp;&amp;nbsp;&amp;nbsp; 216&amp;nbsp;&amp;nbsp;&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp; 288&lt;/P&gt;
&lt;P&gt;623&amp;nbsp;&amp;nbsp;&amp;nbsp; 534&amp;nbsp;&amp;nbsp;&amp;nbsp; 178&amp;nbsp;&amp;nbsp;&amp;nbsp; 712&lt;/P&gt;
&lt;P&gt;455&amp;nbsp;&amp;nbsp;&amp;nbsp; 637&amp;nbsp;&amp;nbsp;&amp;nbsp; 182&amp;nbsp;&amp;nbsp;&amp;nbsp; 91&lt;/P&gt;
&lt;P&gt;304&amp;nbsp;&amp;nbsp; 228&amp;nbsp;&amp;nbsp;&amp;nbsp; 532&amp;nbsp;&amp;nbsp; 456&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is the real file work.beta2 has over 100 variables with 50,000 observations.&amp;nbsp; Similarly, there are 50,000 values for "fix".&amp;nbsp; I&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to put the values of fix in a macro variable&amp;nbsp;but received out of range type errors. I recall using index variables with SQL, but do not know if these are permitted within SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice, hints, suggestions, or general feedback is greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jane&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 04 Feb 2019 22:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532798#M146025</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-02-04T22:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532799#M146027</link>
      <description>&lt;P&gt;As long as you are dropping the original variables, why bother to create new names?&amp;nbsp; Just replace the original variables with new values instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data H_product;
merge alpha2 beta2;
array nums {*} _numeric_;
do _n_ = 2 to dim(nums);
   nums{_n_} = nums{_n_} * fix;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The DO loop starts with 2, because FIX will be the first numeric variable (as long as ALPHA2 is the first data set mentioned in the MERGE statement).&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 22:33:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/532799#M146027</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-04T22:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533229#M146177</link>
      <description>&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;Not sure which SAS package&amp;nbsp;supports&amp;nbsp;the&amp;nbsp;&amp;lt;proc IML&amp;gt; procedure.&lt;/P&gt;&lt;P&gt;This is what I have with the Image version information removed for the benefit of privacy for my employer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;For Base SAS Software ...
   Custom version information: 9.4_M5
For SAS/GRAPH ...
   Custom version information: 9.4_M5
For SAS/FSP ...
   Custom version information: 9.4_M5
For SAS/ASSIST ...
   Custom version information: 9.4
For SAS/CONNECT ...
   Custom version information: 9.4_M5
For SAS/ACCESS Interface to PC Files ...
   Custom version information: 9.4_M5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jane&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533229#M146177</guid>
      <dc:creator>jawhitmire</dc:creator>
      <dc:date>2019-02-06T14:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533233#M146181</link>
      <description>&lt;P&gt;Novinosrin&lt;/P&gt;&lt;P&gt;Thank you for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does makes sense to me - although I will need to review the use of the dictionary.&lt;/P&gt;&lt;P&gt;Background stems from mathematics where one solves problems by first simplifying the question to something a bit more manageable.&lt;/P&gt;&lt;P&gt;Next time, I will work harder to make the material as close to the actual as possible - without offending my employer with security issues.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jane&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533233#M146181</guid>
      <dc:creator>jawhitmire</dc:creator>
      <dc:date>2019-02-06T14:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533239#M146184</link>
      <description>&lt;P&gt;Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked really well.&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;However, when I attempted to apply it to the actual program, there were error messages within the &amp;lt;proc sql&amp;gt; procedure.&amp;nbsp; The libname was the same, but the memname was changed to match the actual dataset name (without the work-dot part).&amp;nbsp; Does "name" have to be uniquely the&amp;nbsp;word "name"? Would this&amp;nbsp;possible fail if within a macro?&lt;/P&gt;&lt;P&gt;It looks like a cool way to created macro variables along with a similar, but concatenated macro variable.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jane&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533239#M146184</guid>
      <dc:creator>jawhitmire</dc:creator>
      <dc:date>2019-02-06T14:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533244#M146186</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/248885"&gt;@jawhitmire&lt;/a&gt;&amp;nbsp; &amp;nbsp;Thank you for your message. It's all good. I like your piecemeal approach i.e breaking down to simpler problems. Keep the questions coming, i will look forward to solving them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS&lt;/P&gt;
&lt;P&gt;STEM Math Background is great to have. Sounds like another champ in the making akin to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt; . Oh well I wish my background was so conventional.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533244#M146186</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-02-06T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplying Every Observation by Column in Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533268#M146189</link>
      <description>&lt;P&gt;Since you are not really "merging" on anything why not just use two SET statements?&lt;/P&gt;
&lt;P&gt;Place the ARRAY between them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have;
  array all _numeric_;
  set fix (keep=fix);
  do over all;
     all=all*fix;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I know that SAS is trying to make DO OVER go away, but it is so much more logical than having to invent an index variable that has no intrinsic meaning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course the real question is why doe the Original user need to multiply the values?&lt;/P&gt;
&lt;P&gt;Perhaps they just need to use the variable FIX with a WEIGHT or FREQ statement in their analysis.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiplying-Every-Observation-by-Column-in-Another-Dataset/m-p/533268#M146189</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-02-06T14:55:11Z</dc:date>
    </item>
  </channel>
</rss>

