<?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: Looking for ways to retrieve some data values from one dataset to another dataset in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208497#M4607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; You got answers, so this is just a comment.&amp;nbsp; The two data steps could also be written ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data table1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;infile datalines dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input state :$2. (Chevy GMC Honda) (:comma.) miles :$20.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;GA,$1200,$4300,$3000,"High Mileage Cars"&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data Table2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;infile datalines dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input weeks :$7. prices :$7. desc :$32.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;' ',' ',"Insurance Track"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;First,Chevy,"Old Cars without Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;second,GMC,"Old Cars with Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Third,Honda,"Old Cars with Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1&amp;nbsp; Rather than repeat the variable names in both a LENGTH and INPUT statements, you can assign variable attributes with INFORMATS in the INPUT statement.&amp;nbsp; Since you are using LIST input, use a COLON modifier prior to the INFORMAT.&amp;nbsp; The COMMA informat for the three prices will ignore that $-sign and read the data as numeric.&amp;nbsp; If you need that $-sign later, assign a DOLLAR format to the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2&amp;nbsp; The DSD in the INFILE statement implies a comma delimiter so youi don't need the DLM option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#3&amp;nbsp; You don't need a RETURN statement to cycle through the data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#4&amp;nbsp; You don't need a RUN statement following a data step that ends with a DATALINES file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Aug 2015 13:57:29 GMT</pubDate>
    <dc:creator>MikeZdeb</dc:creator>
    <dc:date>2015-08-27T13:57:29Z</dc:date>
    <item>
      <title>Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208494#M4604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;I have to 2 different SAS programs that generate 2&lt;BR /&gt;different SAS tables named table1 and table2. Table1 and table2 codes below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;length&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; state $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Chevy $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; GMC $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Honda $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; miles $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; datalines &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;','&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; state Chevy GMC Honda miles;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;return&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;GA,$1200,$4300,$3000,"High Mileage Cars"&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;print&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;=table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Table2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;length&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Weeks $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Prices $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;7&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; desc $&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;32&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; datalines &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;dlm&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;','&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Weeks Prices desc ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;return&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;' ',' ',"Insurance Track"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;First,Chevy,"Old Cars without Insurance"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;second,GMC,"Old Cars with Insurance"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Third,Honda,"Old Cars with Insurance"&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;print&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;=table2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;I want to write a program that would enable me to retrieve the values of the&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;columns Chevy, GMC, Honda, and miles, from table1 and place them at their respective&lt;BR /&gt;positions in table2. Here is the design below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;Data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; table: &lt;SPAN style="background: yellow;"&gt;Miles&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; _______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Weeks&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prices&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; _______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&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; Insurance Track&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;First&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;Chevy&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OldCars without Insurance &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;second&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;GMC&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Old Cars with Insurance &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Third&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: yellow;"&gt;Honda&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OldCars with Insurance &lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; _______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;But the final output should contain the below data for respectively Chevy, GMC, Honda, miles:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;STRONG style="line-height: 115%; color: navy; font-size: 10pt; background: white; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; table: &lt;/SPAN&gt;&lt;SPAN style="background: #ffffc0; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;High Mileage Cars&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;_______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Weeks&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prices&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;_______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&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; Insurance Track&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; First&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;$1200&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Old Cars without Insurance &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; second&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;$4300&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Old Cars with Insurance &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; Third&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;$3000&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Old Cars with Insurance &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;______________________________________________&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Variable &lt;/SPAN&gt;&lt;SPAN style="background: white; color: red; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;PRICES&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt; would be going on the user interface and treated as a global variable.&lt;/SPAN&gt; &lt;/P&gt;&lt;P style="margin-bottom: 10pt;"&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Thanks for help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 12:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208494#M4604</guid>
      <dc:creator>Amen</dc:creator>
      <dc:date>2015-08-27T12:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208495#M4605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your "Table" needs to be transposed so that each row has the combined key of State and Prices (?).&lt;/P&gt;&lt;P&gt;Then you just join the two tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 13:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208495#M4605</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-08-27T13:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208496#M4606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively you can use update in SQL with a subquery:&lt;/P&gt;&lt;P&gt;data table1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length state $3 Chevy $7 GMC $7 Honda $7 miles $20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile datalines dlm=',' dsd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input state Chevy GMC Honda miles;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;GA,$1200,$4300,$3000,"High Mileage Cars"&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data Table2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Weeks $7 Prices $7 desc $32;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile datalines dlm=',' dsd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Weeks Prices desc ;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;' ',' ',"Insurance Track"&lt;/P&gt;&lt;P&gt;First,Chevy,"Old Cars without Insurance"&lt;/P&gt;&lt;P&gt;second,GMC,"Old Cars with Insurance"&lt;/P&gt;&lt;P&gt;Third,Honda,"Old Cars with Insurance"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; update TABLE2 A&lt;/P&gt;&lt;P&gt;&amp;nbsp; set PRICES=case when PRICES="Chevy" then (select CHEVY from TABLE1)&lt;/P&gt;&lt;P&gt;&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; when PRICES="GMC" then (select GMC from TABLE1)&lt;/P&gt;&lt;P&gt;&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; when PRICES="Honda" then (select HONDA from TABLE1) &lt;/P&gt;&lt;P&gt;&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; else "" end;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 13:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208496#M4606</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-27T13:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208497#M4607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; You got answers, so this is just a comment.&amp;nbsp; The two data steps could also be written ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data table1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;infile datalines dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input state :$2. (Chevy GMC Honda) (:comma.) miles :$20.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;GA,$1200,$4300,$3000,"High Mileage Cars"&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data Table2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;infile datalines dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;input weeks :$7. prices :$7. desc :$32.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;' ',' ',"Insurance Track"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;First,Chevy,"Old Cars without Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;second,GMC,"Old Cars with Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Third,Honda,"Old Cars with Insurance"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1&amp;nbsp; Rather than repeat the variable names in both a LENGTH and INPUT statements, you can assign variable attributes with INFORMATS in the INPUT statement.&amp;nbsp; Since you are using LIST input, use a COLON modifier prior to the INFORMAT.&amp;nbsp; The COMMA informat for the three prices will ignore that $-sign and read the data as numeric.&amp;nbsp; If you need that $-sign later, assign a DOLLAR format to the variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2&amp;nbsp; The DSD in the INFILE statement implies a comma delimiter so youi don't need the DLM option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#3&amp;nbsp; You don't need a RETURN statement to cycle through the data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#4&amp;nbsp; You don't need a RUN statement following a data step that ends with a DATALINES file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 13:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208497#M4607</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-08-27T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208498#M4608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given your data as it, the simplest way I see would be leveraging VVALUEX().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Weeks Prices desc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; _n_=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; table1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; table2(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;rename&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=prices=_p);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;prices=vvaluex(_p);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; Weeks Prices desc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 19:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208498#M4608</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-08-27T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208499#M4609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Hai, questions for you.&lt;/P&gt;&lt;P&gt;Why do I get this note message? :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Argument to function vvaluex is not a valid variable name.&lt;/P&gt;&lt;P&gt;&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;&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;&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; Invalid argument to function vvaluex at line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2015 15:42:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208499#M4609</guid>
      <dc:creator>Amen</dc:creator>
      <dc:date>2015-08-28T15:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to retrieve some data values from one dataset to another dataset</title>
      <link>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208500#M4610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; This message ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;NOTE: Argument to function VVALUEX is not a valid variable name:&amp;nbsp; .&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;NOTE: Invalid argument to function VVALUEX at line 23 column 8.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;Weeks=&amp;nbsp; Prices=&amp;nbsp; desc=Insurance Track state=GA Chevy=1200 GMC=4300 Honda=3000 miles=High Mileage Cars _p=&amp;nbsp; _ERROR_=1 _N_=1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;occurs since for one of the observations in TABLE2, the value of the variable variable PRICES (renamed _P and used as the argument in the VVALUEX function) is MISSING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could modify the code (not sure what the RETAIN was for) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;data want;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if _n_=1 then set table1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;set table2(rename=prices=_p);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;if ^missing(_p) then prices=vvaluex(_p);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;keep Weeks Prices desc;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2015 15:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Looking-for-ways-to-retrieve-some-data-values-from-one-dataset/m-p/208500#M4610</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2015-08-29T15:13:36Z</dc:date>
    </item>
  </channel>
</rss>

