<?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: Labelling Using Another Dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724342#M224883</link>
    <description>&lt;P&gt;1. Try using &lt;FONT face="courier new,courier"&gt;%superq(j)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2. use &lt;FONT face="courier new,courier"&gt;proc datasets&lt;/FONT&gt; add add labels, do not copy the whole table.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 02:51:04 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-03-08T02:51:04Z</dc:date>
    <item>
      <title>Labelling Using Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724338#M224880</link>
      <description>&lt;P&gt;Datasets i and j have the labels and the data as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename i temp;

proc http url="http://faculty.tuck.dartmouth.edu/images/uploads/faculty/
rafael-laporta/Law_Fin.xls" out=i;
run;

proc import file=i dbms=xls replace out=i;
	sheet="definitions";
	getnames=no;
run;

proc import file=i dbms=xls replace out=j;
	sheet="data";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The labels contain commas, percent signs, and unclosed parentheses as follows. How can I label the data correctly? The following macro incorrectly scans the macro strings due to empty spaces.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="210307.png" style="width: 775px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55603i2BBF100CE8A6D776/image-size/large?v=v2&amp;amp;px=999" role="button" title="210307.png" alt="210307.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro i;

proc sql noprint;
	select a,d into :i separated by "\",:j separated by "\" from i;
quit;

data j;
	set j;
	%do k=4 %to %sysfunc(countw(&amp;amp;i,\));
		label %scan(&amp;amp;i,&amp;amp;k,\)="%scan(%nrbquote(&amp;amp;j),&amp;amp;k,\)";
	%end;
run;

%mend;

%i&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 01:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724338#M224880</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2021-03-08T01:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Labelling Using Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724342#M224883</link>
      <description>&lt;P&gt;1. Try using &lt;FONT face="courier new,courier"&gt;%superq(j)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;2. use &lt;FONT face="courier new,courier"&gt;proc datasets&lt;/FONT&gt; add add labels, do not copy the whole table.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 02:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724342#M224883</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-08T02:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Labelling Using Another Dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724343#M224884</link>
      <description>&lt;P&gt;Also, it'd be a lot simpler to use &lt;FONT face="courier new,courier"&gt;call execute&lt;/FONT&gt; for this kind of endeavour.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 03:02:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Labelling-Using-Another-Dataset/m-p/724343#M224884</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-08T03:02:27Z</dc:date>
    </item>
  </channel>
</rss>

