<?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: updating value conditionally from another table in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153658#M40407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response! I ran your codes and it runs beautifully!!&lt;/P&gt;&lt;P&gt;The number of stores changes from time to time, so I am very happy with your codes because I only need to update an array function when I retrieve the sales data.&lt;/P&gt;&lt;P&gt;I really learn a lot from all of you, so thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Hatsumi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2014 00:51:58 GMT</pubDate>
    <dc:creator>hatsumi</dc:creator>
    <dc:date>2014-05-13T00:51:58Z</dc:date>
    <item>
      <title>updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153644#M40393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hi &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I have 2 sets of monthly sales data:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Master data where all the updates need to be made&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Updated data &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;ABC variables are the name of each store and value in the table represent each store's monthly sales.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Each store has different opening date, so sales figures start from various timing depending on when it opened.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;Master sales data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 270px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" width="78"&gt;Date&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jan-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;89&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Feb-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;19&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Mar-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Apr-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;73&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;57&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;May-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;38&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;76&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jun-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;55&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jul-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;67&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Aug-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Sep-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;91&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Oct-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Nov-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;52&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Dec-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;89&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jan-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;39&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;39&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Feb-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;92&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Mar-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;86&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;46&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;61&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Updated sales data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 270px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" width="78"&gt;Date&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-left: none;" width="64"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jan-13&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-top: none; border-left: none;"&gt;80&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Feb-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;80&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Mar-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;80&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Apr-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;80&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;57&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;May-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="text-align: -webkit-right;"&gt;80&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;76&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jun-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;55&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jul-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;67&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Aug-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Sep-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;91&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Oct-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Nov-13&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Dec-13&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;89&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Jan-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;39&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;39&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Feb-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;92&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;Mar-14&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;86&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;61&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;There are 2 data cleaning steps I coded in SAS:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;1. &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Update master data table based on the updated data ONLY when the updated value is missing or blank. Value in the master data should NOT be modified if update is numerical value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2. &lt;SPAN style="font-family: Arial, sans-serif;"&gt;Replace sales figure with&lt;SPAN style="font-family: Arial, sans-serif;"&gt; a missing value or blank&lt;/SPAN&gt; for the first 3 months of store opening&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; as the initial sales period is considered unstable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I did my best to follow the textbook in writing codes below, but I cannot resolve the errors... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I am guessing my array statement has an issue. If someone could let me know how I can resolve the issue, I really appreciate your help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Below is the codes I wrote for step 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'ＭＳ ゴシック';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; work.master_sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; work.updated_sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;modify&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; work.master_sales work.updated_sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; consistent(*)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;_numeric_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&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; &lt;SPAN style="font-family: Arial, sans-serif;"&gt;/*I did not list all variables because there are over 100 stores in the real data set*/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; consistent(*)_numeric_=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'ＭＳ ゴシック';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Below is for step 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'ＭＳ ゴシック';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; work.master_sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; work.master_sales;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; firstyear(*)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;_numeric_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'ＭＳ ゴシック';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;to&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'ＭＳ ゴシック';"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; (firstyear(i) ne&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;/*Replace sales figure with ' ' for the first 3 months of store opening*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;firstyear(i) = &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: purple; background: white;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: blue; background: white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'ＭＳ ゴシック'; color: black; background: white;"&gt; i;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2014 20:53:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153644#M40393</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-10T20:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153645#M40394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Given your example data what do you want the master dataset to look like after being modified?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 00:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153645#M40394</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-05-11T00:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153646#M40395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that only missing values in update dataset are meaningful?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 03:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153646#M40395</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-05-11T03:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153647#M40396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arthur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking a look at my question. I really appreciate your time for doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After step 1, I want my master data to look like below. The purpose of step 1 is to reflect the store closure status (blank value) contained in the updated table to the master table.&lt;/P&gt;&lt;P&gt;So I am only reflecting blank value from the updated table because those are the days when stores were actually closed, and thus they should not have any sales in the master data table.&lt;/P&gt;&lt;P&gt;Based on updated sales data table, sales figures (under A, Nov13&amp;nbsp; &amp;amp; under B, Mar14) are replaced with blank/missing value.&lt;/P&gt;&lt;P&gt;However, please kindly note that none of the updated sales figures are transferred to the master table because their calculation method is different and I want to keep the original master sales figures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Master sales data after running step 1 code&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;-webkit-right&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 0px solid #575757; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; width: 302px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;Date&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;A&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;B&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center; padding: 2px;"&gt;C&lt;/TH&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Jan-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;89&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Feb-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;19&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Mar-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;8&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Apr-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;73&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;57&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;May-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;38&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;76&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Jun-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;33&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;55&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Jul-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;67&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Aug-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;33&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;65&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Sep-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;91&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;15&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Oct-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;30&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;35&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Nov-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;45&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Dec-13&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;100&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;89&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Jan-14&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;39&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;39&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Feb-14&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;100&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;92&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;Mar-14&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;86&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="padding: 0px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #575757; text-align: -webkit-right; background-color: transparent;"&gt;61&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After step 2, the master data should look like below. The purpose of step 2 is to replace the first 3-month sales figures with blank value because initial sales periods are considered unstable.&lt;/P&gt;&lt;P&gt;After running step 2, the first 3-month data points are removed. Sales figures replaced with blanks are (Under A, Jan13,Feb13,Mar13; Under B, Apr13,May13,Jun13; Under C, Nov13,Dec13,Jan14).&lt;/P&gt;&lt;P&gt;Please also note that there are over 100 stores in the real data set not just A, B, C.&lt;/P&gt;&lt;P&gt;If am still being unclear, please kindly let me know. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Master sales data after running step 2 code&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="404" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;-webkit-right&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 0px solid rgb(87, 87, 87); font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: rgb(255, 255, 255); width: 301px; height: 404px;"&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center;"&gt;Date&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center;"&gt;A&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center;"&gt;B&lt;/TH&gt;&lt;TH style="color: #ffffff; background-color: #6690bc; text-align: center;"&gt;C&lt;/TH&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Jan-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Feb-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Mar-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Apr-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;73&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;May-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;38&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Jun-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;33&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Jul-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;67&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;4&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Aug-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;33&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;65&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Sep-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;91&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;15&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Oct-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;30&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;35&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Nov-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;45&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Dec-13&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;100&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;89&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Jan-14&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;39&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;39&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Feb-14&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;100&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;92&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD class="xl66" height="20" style="font-style: inherit; text-align: -webkit-right;"&gt;Mar-14&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;86&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit; text-align: -webkit-right;"&gt;61&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 14:14:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153647#M40396</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-11T14:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153648#M40397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PGStats,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking a look at my question, and yes, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;only missing values in updated dataset are meaningful because missing value represent days when stores were actually closed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;So I am trying to make the master dataset consistent with store closure (missing value) contained in the updated dataset.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;In the updated dataset, calculation method to derive sales figures have changed, so I do not want to transfer new sales figures into the master dataset. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks again for your kind help and please feel to let me know if any of my explanation is unclear.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 14:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153648#M40397</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-11T14:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153649#M40398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is one way you could do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set updated_sales;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array consistent A--C;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over consistent;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(consistent) then consistent=.A;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else call missing(consistent);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data master_sales;&lt;/P&gt;&lt;P&gt;&amp;nbsp; missing a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; modify master_sales temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by date;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 16:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153649#M40398</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-05-11T16:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153650#M40399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about exact data structures of the mentioned tables, I tried in this way. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table master_plus_updated as&lt;BR /&gt;select a.date,a.a,a.b,a.c,b.a as up_a,b.b as up_b,b.c as up_c&lt;BR /&gt;from master a inner join updated b&lt;BR /&gt;on a.date=b.date;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final(drop=i up_a up_b up_c);&lt;BR /&gt;set master_plus_updated;&lt;BR /&gt;array master{*}&amp;nbsp; a b c;&lt;BR /&gt;array updated{*} up_a up_b up_c;&lt;BR /&gt;do i=1 to dim(master);&lt;BR /&gt;&amp;nbsp; if missing(updated{i}) then master{i}=updated{i};&lt;BR /&gt;&amp;nbsp; if _n_&amp;lt;4 then master{i}=.;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=final;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 May 2014 22:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153650#M40399</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-11T22:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153651#M40400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hi Arthur,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Thank you for your response! I ran your code, but I got a letter 'A' instead of missing value, so I added below codes at the end to replace all ‘A’ with missing value. This works perfectly for step 1. Thanks again for your help!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;data master;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;set master;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;array sales(*)_numeric_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;do i=1 to dim (sales);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;if sales(i)='A' then sales(i)=' ';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;drop i;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 01:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153651#M40400</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-12T01:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153652#M40401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi stat@sas,&lt;/P&gt;&lt;P&gt;Thank you for taking a look at my question and it was very useful to learn how you coded step 2, removing the first 3-month sales from the table. I ran your code and it works perfectly if the sales figure started from the very first observation Jan2013. However, whenever sales figures do not start from the first row like B &amp;amp; C, it does not remove the first 3-month sales. Please look at the results of final dataset created. Red circled figures need to be replaced with blank. I tried to experiment with other condition/functions, but I am still unable to figure out how to make it work for B &amp;amp; C… &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Final dataset after running code.jpg" class="jive-image" src="https://communities.sas.com/legacyfs/online/6279_Final dataset after running code.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 01:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153652#M40401</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-12T01:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153653#M40402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code didn`t replace your missing values with As but rather with .As .. which are quite valid SAS missing values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 01:27:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153653#M40402</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-05-12T01:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153654#M40403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, building on Art's clever idea, Here is the code for getting normal missing values everywhere you want them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data master;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format date yymmd.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infile datalines missover;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input D$ A B C;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(cats("01-", D), date9.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop D;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jan-13 89&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Feb-13 19&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mar-13 8&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Apr-13 73 57&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;May-13 38 76&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jun-13 33 55&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jul-13 67 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aug-13 33 65&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sep-13 91 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Oct-13 30 35&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Nov-13 52 45 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dec-13 100 89 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jan-14 39 39 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Feb-14 100 92 65&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mar-14 86 46 61&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data updated;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format date yymmd.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;infile datalines missover;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input D$ A B C;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(cats("01-", D), date9.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop D;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;datalines;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jan-13 80&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Feb-13 80&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mar-13 80&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Apr-13 80 57&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;May-13 80 76&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jun-13 33 55&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jul-13 67 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aug-13 33 65&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sep-13 91 15&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Oct-13 30 35&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Nov-13 . 45 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dec-13 100 89 12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jan-14 39 39 9&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Feb-14 100 92 65&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mar-14 86 . 61&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Create a view from the update dataset where numerical sales are replaced with &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;normal missing values '.' which will be ignored in the update process and missing &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sales are replaced with the special missing value '._' which will update the master &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;table sale to a normal missing value. */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data temp / view=temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; set updated;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; array sales A--C;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; do i = 1 to dim(sales);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(sales{i}) then sales{i}=._;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else call missing(sales{i});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; drop i;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Update the master dataset */ &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data updatedMaster;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; update master temp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; by date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Remove first three months of every store series */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Change the data structure to create proper time series */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc transpose data=updatedMaster out=longMaster(where=(col1 is not missing));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Change sales to missing for the first three months from each time series */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;create table longMasterTrim as&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;select date, _name_, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; case when date &amp;lt; intnx("MONTH", min(date), 3) then .&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; else COL1 end as sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from longMaster&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;group by _name_&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;order by date, _name_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Reorganize the time series horizontally */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc transpose data=longMasterTrim out=wantedMaster(drop=_name_);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;by date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;id _name_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var sales;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print data=wantedMaster noobs; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 01:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153654#M40403</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-05-12T01:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153655#M40404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arthur, I see. I did not know .As are missing values in SAS. I'm still learning a lot about SAS, so please bear with me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 02:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153655#M40404</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-12T02:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153656#M40405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PGStats, this is exactly what I wanted and the code runs perfectly!! Thank you very much!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arthur, stats@sas, and PGStats,&lt;/P&gt;&lt;P&gt;I really want to thank you again for all your generous help and I learned so much from all of you!&lt;/P&gt;&lt;P&gt;I’ve been thinking about how to run this program all this weekend… you have no idea how much I appreciate all of your guidance!! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 02:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153656#M40405</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-12T02:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153657#M40406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is Hash Table version code . Hope it would be faster than PG. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;If I know how many &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; store&lt;/SPAN&gt;s you have, that would be easier.&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;PRE&gt; 
data master;
format date yymmd.;
infile datalines missover;
input D$ A B C;
date = input(cats("01-", D), date9.);
drop D;
datalines;
Jan-13 89
Feb-13 19
Mar-13 8
Apr-13 73 57
May-13 38 76
Jun-13 33 55
Jul-13 67 4
Aug-13 33 65
Sep-13 91 15
Oct-13 30 35
Nov-13 52 45 3
Dec-13 100 89 12
Jan-14 39 39 9
Feb-14 100 92 65
Mar-14 86 46 61
;
data updated;
format date yymmd.;
infile datalines missover;
input D$ A B C;
date = input(cats("01-", D), date9.);
drop D;
datalines;
Jan-13 80
Feb-13 80
Mar-13 80
Apr-13 80 57
May-13 80 76
Jun-13 33 55
Jul-13 67 4
Aug-13 33 65
Sep-13 91 15
Oct-13 30 35
Nov-13 . 45 3
Dec-13 100 89 12
Jan-14 39 39 9
Feb-14 100 92 65
Mar-14 86 . 61
;
run;
data temp;
 set master;
 length vname $ 40;
 array _x{*} a--c ;
 do i=1 to dim(_x);
&amp;nbsp; if not missing(_x{i}) then do;vname=vname(_x{i});output;end;
 end;
 keep date vname;
run;
proc sort data=temp;by&amp;nbsp; vname;run;
data map;
 set temp;
 by vname;
 if first.vname then n=0;
 n+1;
 if n le 3 then output;
 drop n;
run;
data map1;
 set updated;
 length vname $ 40;
 array _x{*} a--c ;
 do i=1 to dim(_x);
&amp;nbsp; if missing(_x{i}) and not missing(lag(_x{i})) then do;vname=vname(_x{i});output;end;
 end;
 keep date vname;
run;
proc append base=map data=map1 force;run;
data want;
 if _n_ eq 1 then do;
&amp;nbsp; if 0 then set map;
&amp;nbsp; declare hash h(dataset:'map');
&amp;nbsp;&amp;nbsp; h.definekey('date','vname');
&amp;nbsp;&amp;nbsp; h.definedone();
 end;
 set master;
 length vname $ 40;
 array _x{*} a--c ;
 do i=1 to dim(_x);
&amp;nbsp; vname=vname(_x{i});
&amp;nbsp; if h.check()=0 then call missing(_x{i});
 end;
 drop i vname;
run;


&lt;/PRE&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;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 14:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153657#M40406</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-12T14:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: updating value conditionally from another table</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153658#M40407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response! I ran your codes and it runs beautifully!!&lt;/P&gt;&lt;P&gt;The number of stores changes from time to time, so I am very happy with your codes because I only need to update an array function when I retrieve the sales data.&lt;/P&gt;&lt;P&gt;I really learn a lot from all of you, so thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Hatsumi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 00:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/updating-value-conditionally-from-another-table/m-p/153658#M40407</guid>
      <dc:creator>hatsumi</dc:creator>
      <dc:date>2014-05-13T00:51:58Z</dc:date>
    </item>
  </channel>
</rss>

