<?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: Using Modify in the Datastep in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21020#M4391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks to me like a pretty good excercise question which should make you reading about the modify statement and increase your understanding of the differences between transactional data and reference data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Patrick Matter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Jun 2011 00:43:01 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2011-06-25T00:43:01Z</dc:date>
    <item>
      <title>Using Modify in the Datastep</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21018#M4389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Modify&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two datasets as follows. The first dataset is an inventory and the second dataset contains the transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dataset1 Inventory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item_no&amp;nbsp; description&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp; Dunlop tyre&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp; tube&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp; windshield&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp; Boss speakers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dataset2 Transactions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purchase_id item_no desc&lt;/P&gt;&lt;P&gt;1 1 dunlop&lt;/P&gt;&lt;P&gt;2 1 Dunlop&lt;/P&gt;&lt;P&gt;3 1 Dun&lt;/P&gt;&lt;P&gt;4 3 windshi&lt;/P&gt;&lt;P&gt;5 2 tub&lt;/P&gt;&lt;P&gt;6 2 tub&lt;/P&gt;&lt;P&gt;7 4 Boss&lt;/P&gt;&lt;P&gt;8 4 Boss Sp&lt;/P&gt;&lt;P&gt;9 3 wind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason the description is truncated in the transaction table and I would like to replace it with the description from the inventory. My transaction table should look like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purchase_id item_no desc&lt;/P&gt;&lt;P&gt;1 1 Dunlop tyre&lt;/P&gt;&lt;P&gt;2 1 Dunlop tyre&lt;/P&gt;&lt;P&gt;3 1 Dunlop tyre&lt;/P&gt;&lt;P&gt;4 3 windshield&lt;/P&gt;&lt;P&gt;5 2 tube&lt;/P&gt;&lt;P&gt;6 2 tube&lt;/P&gt;&lt;P&gt;7 4 Boss speakers&lt;/P&gt;&lt;P&gt;7 4 Boss speakers&lt;/P&gt;&lt;P&gt;9 3 windshield&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the modify statement in the data step. this was my code&lt;/P&gt;&lt;P&gt;data transaction;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modify transaction inventory;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by item_no;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc=description;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not work it. My transaction table ends up like this. It replaces only the first occurence of the item_no with the description from the inventory table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;purchase_id item_no desc&lt;/P&gt;&lt;P&gt;1 1 Dunlop tyre&lt;/P&gt;&lt;P&gt;2 1 Dunlop&lt;/P&gt;&lt;P&gt;3 1 Dun&lt;/P&gt;&lt;P&gt;4 3 windshield&lt;/P&gt;&lt;P&gt;5 2 tube&lt;/P&gt;&lt;P&gt;6 2 tub&lt;/P&gt;&lt;P&gt;7 4 Boss speakers&lt;/P&gt;&lt;P&gt;9 3 wind&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anybody suggest what can be done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 23:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21018#M4389</guid>
      <dc:creator>Anu_R</dc:creator>
      <dc:date>2011-06-24T23:23:46Z</dc:date>
    </item>
    <item>
      <title>Using Modify in the Datastep</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21019#M4390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The SAS documentation has a specific note about using modify when you've got duplicates - it might help explain this behaviour better than I can: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001772905.htm"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001772905.htm&lt;/A&gt;&lt;SPAN&gt; .&amp;nbsp; Watch out for the descriptions of the datasets - where the documentation refers to Master and Transaction datasets, the terms are used in the opposite sense from your own example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to overwrite the values of Desc, then you might try using "merge" instead of modify, or using hash tables.&amp;nbsp; I suppose it depends on your exact circumstances, e.g. what you want to do to your Transactions table when there is no matching entry in Inventory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example your code might read:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Inventory;&lt;/P&gt;&lt;P&gt;format item_no 8.;&lt;/P&gt;&lt;P&gt;format Description $20.;&lt;/P&gt;&lt;P&gt;infile datalines dsd delimiter=',';&lt;/P&gt;&lt;P&gt;input item_no Description $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1,Dunlop tyre&lt;/P&gt;&lt;P&gt;2,tube&lt;/P&gt;&lt;P&gt;3,windshield&lt;/P&gt;&lt;P&gt;4,Boss speakers&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Transactions;&lt;/P&gt;&lt;P&gt;format purchase_id 8.;&lt;/P&gt;&lt;P&gt;format item_no 8.;&lt;/P&gt;&lt;P&gt;format desc $7.;&lt;/P&gt;&lt;P&gt;infile datalines dsd delimiter=',';&lt;/P&gt;&lt;P&gt;input purchase_id item_no desc $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1,1,dunlop&lt;/P&gt;&lt;P&gt;2,1,Dunlop&lt;/P&gt;&lt;P&gt;3,1,Dun&lt;/P&gt;&lt;P&gt;4,3,windshi&lt;/P&gt;&lt;P&gt;5,2,tub&lt;/P&gt;&lt;P&gt;6,2,tub&lt;/P&gt;&lt;P&gt;7,4,Boss&lt;/P&gt;&lt;P&gt;8,4,Boss Sp&lt;/P&gt;&lt;P&gt;9,3,wind&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=Inventory;&lt;/P&gt;&lt;P&gt;by item_no;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sort data=Transactions;&lt;/P&gt;&lt;P&gt;by item_no;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Transactions;&lt;/P&gt;&lt;P&gt;merge Transactions (in=T drop=Desc) Inventory(rename=(Description=Desc));&lt;/P&gt;&lt;P&gt;by item_no;&lt;/P&gt;&lt;P&gt;if T then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would essentially delete the old Desc, and completely replace every row with the updated Description from Inventory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The equivalent with a hash table would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Transactions2 (rename=(Description=Desc) drop=rc);&lt;/P&gt;&lt;P&gt;set Transactions (drop=Desc);&lt;/P&gt;&lt;P&gt;format Description $20.;&lt;/P&gt;&lt;P&gt;if _n_ = 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash h(dataset:'Inventory');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineKey('Item_No');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineData('Description');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h.defineDone();&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;rc = h.find();&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This also has the advantage that you don't have to sort the datasets as you would for merge or modify.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another method you might consider is using a custom format built from Inventory.&amp;nbsp; That way your Transactions dataset only olds your Purchase_ID and Item_No fields, and the printed description would be taken by using Inventory as a lookup.&amp;nbsp; This would mean the values never change in Transaction, but you could still use proc report/tabulate etc. to summary based on the "formatted" values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 00:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21019#M4390</guid>
      <dc:creator>DF</dc:creator>
      <dc:date>2011-06-25T00:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modify in the Datastep</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21020#M4391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks to me like a pretty good excercise question which should make you reading about the modify statement and increase your understanding of the differences between transactional data and reference data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Patrick Matter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jun 2011 00:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21020#M4391</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2011-06-25T00:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modify in the Datastep</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21021#M4392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are almost to get that. The merge statement is what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; Inventory;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;input&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;SPAN class="SpellE"&gt;item_no&lt;/SPAN&gt; description &amp;amp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: teal; background: none repeat scroll 0% 0% white;"&gt;$50.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;cards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;1&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Dunlop &lt;SPAN class="SpellE"&gt;tyre&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;2&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;tube&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;3&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;windshield&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;4&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Boss speakers&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;Transactions;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;input&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;SPAN class="SpellE"&gt;purchase_id&lt;/SPAN&gt; &lt;SPAN class="SpellE"&gt;item_no&lt;/SPAN&gt; &lt;SPAN class="SpellE"&gt;desc&lt;/SPAN&gt; : &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: teal; background: none repeat scroll 0% 0% white;"&gt;$50.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;cards&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;1 &lt;SPAN class="SpellE"&gt;1&lt;/SPAN&gt; &lt;SPAN class="SpellE"&gt;&lt;SPAN class="GramE"&gt;dunlop&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;2 1 Dunlop&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;3 1 Dun&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;4 3 &lt;SPAN class="SpellE"&gt;windshi&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;5 2 tub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;6 2 tub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;7 4 Boss&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;8 4 Boss Sp&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% #ffffc0;"&gt;9 3 wind&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;sort&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;=Transactions;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;SPAN class="SpellE"&gt;item_no&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;data&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;want(drop=&lt;SPAN class="SpellE"&gt;desc&lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;merge&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;Transactions Inventory;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;SPAN class="SpellE"&gt;item_no&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;sort&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;data&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;=want;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" class="MsoNormal" style="text-align: left;"&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: blue; background: none repeat scroll 0% 0% white;"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt; &lt;SPAN class="SpellE"&gt;purchase_id&lt;/SPAN&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: navy; background: none repeat scroll 0% 0% white;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; color: black; background: none repeat scroll 0% 0% white;"&gt;;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 02:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21021#M4392</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-27T02:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modify in the Datastep</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21022#M4393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps a more straightforward approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;update transactions t1&lt;/P&gt;&lt;P&gt;set desc=(select description from inventory where item_no=t1.item_no)&lt;/P&gt;&lt;P&gt;where exists (select * from inventory where item_no=t1.item_no);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also might want to ensure the column is the correct width as the values could be truncated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2011 19:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Using-Modify-in-the-Datastep/m-p/21022#M4393</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-06-28T19:00:01Z</dc:date>
    </item>
  </channel>
</rss>

