<?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: sas programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762238#M241315</link>
    <description>&lt;P&gt;Yes, but the variable is hardly usable, when converted to text. So why not just keep the missing values, and maybe add a footnote when reporting, explaining the missing value.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 08:00:50 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2021-08-18T08:00:50Z</dc:date>
    <item>
      <title>sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761811#M241121</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
  select  memname
  into :table_list separated by ' '
  from comp_tbls   ;
quit;


data all;
  merge  &amp;amp;table_list;by id1 id2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to merge a dynamic number of sas datasets that is available&amp;nbsp; in comp_tbls table and they will be merged by id1 and id2. Now there could be some datasets that won't have the id1 and id2 at all in them. So I want to if there is any way that i can identify which dataset does not have id1 and id2 . So that I can put an indicator saying 'ID1 and ID2 combination does not exist'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an example let's say I have below 8 datasets in&amp;nbsp;comp_tbls.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;COMP_DC11111&lt;BR /&gt;COMP_DCTY567&lt;/P&gt;
&lt;P&gt;COMP_FFBNH&lt;BR /&gt;COMP_DC32344&lt;BR /&gt;COMP_HWADD&lt;BR /&gt;COMP_HWBSL&lt;BR /&gt;COMP_HWSAD&lt;BR /&gt;COMP_HWSLI&lt;/P&gt;
&lt;P&gt;My final merged output looks like below. Some blank values are there&amp;nbsp; where&lt;/P&gt;
&lt;P&gt;&lt;FONT face="arial black,avant garde"&gt;&amp;nbsp;id1 and id2 combination does not exist &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;or it could be&amp;nbsp;&lt;/P&gt;
&lt;P&gt;id1 and id2 exist but&amp;nbsp; the value under the COMP_* column&amp;nbsp; could be really null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to update those blank as&amp;nbsp; 'ID1 and ID2 combination does not exist' where the above situation (in bold letter) occurs .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="987"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;id1&amp;nbsp;&lt;/TD&gt;
&lt;TD width="64"&gt;id2&lt;/TD&gt;
&lt;TD width="115"&gt;COMP_DC11111&lt;/TD&gt;
&lt;TD width="115"&gt;COMP_DCTY567&lt;/TD&gt;
&lt;TD width="94"&gt;COMP_FFBNH&lt;/TD&gt;
&lt;TD width="105"&gt;COMP_DC32344&lt;/TD&gt;
&lt;TD width="112"&gt;COMP_HWADD&lt;/TD&gt;
&lt;TD width="106"&gt;COMP_HWBSL&lt;/TD&gt;
&lt;TD width="110"&gt;COMP_HWSAD&lt;/TD&gt;
&lt;TD width="102"&gt;COMP_HWSLI&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;15&lt;/TD&gt;
&lt;TD&gt;V&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD&gt;T&lt;/TD&gt;
&lt;TD&gt;Y&lt;/TD&gt;
&lt;TD&gt;f&lt;/TD&gt;
&lt;TD&gt;e&lt;/TD&gt;
&lt;TD&gt;u&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;56&lt;/TD&gt;
&lt;TD&gt;Y&lt;/TD&gt;
&lt;TD&gt;Y&lt;/TD&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;j&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;67&lt;/TD&gt;
&lt;TD&gt;N&lt;/TD&gt;
&lt;TD&gt;U&lt;/TD&gt;
&lt;TD&gt;T&lt;/TD&gt;
&lt;TD&gt;d&lt;/TD&gt;
&lt;TD&gt;y&lt;/TD&gt;
&lt;TD&gt;m&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;k&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 16 Aug 2021 14:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761811#M241121</guid>
      <dc:creator>suchismita</dc:creator>
      <dc:date>2021-08-16T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761891#M241159</link>
      <description>&lt;P&gt;Please be a bit more specific. I'm not following everything in your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;on this statement, I can offer insight.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114973"&gt;@suchismita&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So I want to if there is any way that i can identify which dataset does not have id1 and id2 . So that I can put an indicator saying 'ID1 and ID2 combination does not exist'.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;When you use LIBNAME to define a library, several tables are updated in SAS.&amp;nbsp; One of them is DICTIONARY.COLUMNS (its view is known&amp;nbsp;as SASHELP.VCOLUMN).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select libname, memname, name
    from Dictionary.columns
    where upcase(name) in ("MAKE","MODEL");
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;You could use this dataset to select files with columns ID1 and ID2 in the library(ies) you choose.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, you can use DICTIONARY.TABLES:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select cats(libname,".",memname)
    into :PRDSAL_table_list separated by ' ' 
    from Dictionary.Tables
    where MEMNAME like "PRDSAL_"
       AND LIBNAME in ("SASHELP");
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761891#M241159</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-08-16T19:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761896#M241162</link>
      <description>&lt;P&gt;As soon as you merge data sets the variable(s) exist unless you specifically drop them before the merge.&lt;/P&gt;
&lt;P&gt;So testing after merging isn't a very effective approach, especially if those variables exist in multiple data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you intend to merge BY variables then you need to make sure the variables are there before the merge because missing variables (not values, the variable) will cause an error and the merge will not take place at all.&lt;/P&gt;
&lt;P&gt;Unless you use the NOTSORTED option on your BY statement all of the data sets must be sorted by the BY variables before merging. If you do use NOTSORTED is suspect you won't be happy with the results&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could identify which datasets do not contribute to a record by using the IN= dataset option but the BY variable still need to be present in the data set though missing would be acceptable.&lt;/P&gt;
&lt;PRE&gt;data set1;
  input id $ var;
datalines;
.  11
1  22
2  33
;

data set2;
   input id $ var2;
datalines;
1  111
2  222
;


data example;
   merge set1 (in=in1) 
         set2 (in=in2)
   ;
   by id;
   if not(in1) or not(in2) then mergeby='Only one set contributed';
   else if in1 and in2 then mergeby='Both sets contributed'; 
run;
&lt;/PRE&gt;
&lt;P&gt;The logic for which data sets might be missing values would require additional variables with the values of the BY variables, unique to each data set to avoid the behavior of Merge to replace values since only one variable by the same name can ever exist in a SAS data set.&lt;/P&gt;
&lt;P&gt;Note that when merging if you have multiple missing values for any of the by variables in more than one data set you in the realm of a many-to-many&amp;nbsp; merge and the result is almost never as desired in that case.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 19:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761896#M241162</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-16T19:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761968#M241188</link>
      <description>&lt;P&gt;thank you for your reply.&lt;/P&gt;
&lt;P&gt;to elaborate it little more, here I am trying to explain it with a&amp;nbsp; simple example. Please let me know if it is easy to understand now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's say I&amp;nbsp; have an incoming data for a set of employees where I&amp;nbsp; have data like below:&lt;/P&gt;
&lt;P&gt;table1&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="255px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="47px"&gt;id1&lt;/TD&gt;
&lt;TD width="58px"&gt;id2&lt;/TD&gt;
&lt;TD width="91px"&gt;dob&lt;/TD&gt;
&lt;TD width="59px"&gt;name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="47px"&gt;309&lt;/TD&gt;
&lt;TD width="58px"&gt;6789&lt;/TD&gt;
&lt;TD width="91px"&gt;07/08/1987&lt;/TD&gt;
&lt;TD width="59px"&gt;abc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="47px"&gt;567&lt;/TD&gt;
&lt;TD width="58px"&gt;8905&lt;/TD&gt;
&lt;TD width="91px"&gt;07/09/1966&lt;/TD&gt;
&lt;TD width="59px"&gt;xyz&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="47px"&gt;348&lt;/TD&gt;
&lt;TD width="58px"&gt;1235&lt;/TD&gt;
&lt;TD width="91px"&gt;07/10/1967&lt;/TD&gt;
&lt;TD width="59px"&gt;cdf&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="47px"&gt;456&lt;/TD&gt;
&lt;TD width="58px"&gt;5688&lt;/TD&gt;
&lt;TD width="91px"&gt;07/10/1969&lt;/TD&gt;
&lt;TD width="59px"&gt;vbn&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I need to perform a comparison if any of the combination of id1 and id2 already exist in any of employees department (sales, marketing ,payroll and there could be more etc). I will use id1 and id2 combination to pull what&amp;nbsp; all department&amp;nbsp; they exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My sales dept data is like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="267"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;id1&lt;/TD&gt;
&lt;TD width="64"&gt;id2&lt;/TD&gt;
&lt;TD width="75"&gt;dob&lt;/TD&gt;
&lt;TD width="64"&gt;name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;309&lt;/TD&gt;
&lt;TD&gt;6789&lt;/TD&gt;
&lt;TD&gt;07/08/1987&lt;/TD&gt;
&lt;TD&gt;abc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;567&lt;/TD&gt;
&lt;TD&gt;8905&lt;/TD&gt;
&lt;TD&gt;07/09/1966&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;348&lt;/TD&gt;
&lt;TD&gt;1235&lt;/TD&gt;
&lt;TD&gt;07/10/1967&lt;/TD&gt;
&lt;TD&gt;efg&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Marketing dept data is like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="245"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;id1&lt;/TD&gt;
&lt;TD width="64"&gt;id2&lt;/TD&gt;
&lt;TD width="75"&gt;dob&lt;/TD&gt;
&lt;TD width="42"&gt;name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;309&lt;/TD&gt;
&lt;TD&gt;6789&lt;/TD&gt;
&lt;TD&gt;07/08/1987&lt;/TD&gt;
&lt;TD&gt;abc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;567&lt;/TD&gt;
&lt;TD&gt;8905&lt;/TD&gt;
&lt;TD&gt;07/09/1966&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;348&lt;/TD&gt;
&lt;TD&gt;1235&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;cdf&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Payroll dept data is like below:&lt;/P&gt;
&lt;TABLE width="267"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;id1&lt;/TD&gt;
&lt;TD width="64"&gt;id2&lt;/TD&gt;
&lt;TD width="75"&gt;dob&lt;/TD&gt;
&lt;TD width="64"&gt;name&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;309&lt;/TD&gt;
&lt;TD&gt;6789&lt;/TD&gt;
&lt;TD&gt;07/08/1987&lt;/TD&gt;
&lt;TD&gt;abc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;567&lt;/TD&gt;
&lt;TD&gt;8905&lt;/TD&gt;
&lt;TD&gt;07/09/1966&lt;/TD&gt;
&lt;TD&gt;xyz&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now when I want get a comparison&amp;nbsp; of all 4 datasets, I merged all 4 by id1 and id2. And I am renaming column names as _&amp;lt;dept name&amp;gt; , see below green bold names.&lt;/P&gt;
&lt;P&gt;data all;&lt;/P&gt;
&lt;P&gt;merge &amp;amp;table_list;by id1 id2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;where table_list is macro variable that contains all table names like sales, marketing and payroll etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="802px"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="40px"&gt;id1&lt;/TD&gt;
&lt;TD width="46.5938px"&gt;id2&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;dob&lt;/TD&gt;
&lt;TD width="51.0312px"&gt;name&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;dob_sales&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="101.734px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;name_sales&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="125.688px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;dob_marketing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="138.172px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;name_marketing&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="101.688px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;dob_payroll&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="114.156px"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;name_payroll&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="40px"&gt;309&lt;/TD&gt;
&lt;TD width="46.5938px"&gt;6789&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/08/1987&lt;/TD&gt;
&lt;TD width="51.0312px"&gt;abc&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/08/1987&lt;/TD&gt;
&lt;TD width="101.734px"&gt;abc&lt;/TD&gt;
&lt;TD width="125.688px"&gt;07/08/1987&lt;/TD&gt;
&lt;TD width="138.172px"&gt;abc&lt;/TD&gt;
&lt;TD width="101.688px"&gt;07/08/1987&lt;/TD&gt;
&lt;TD width="114.156px"&gt;abc&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="40px"&gt;567&lt;/TD&gt;
&lt;TD width="46.5938px"&gt;8905&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/09/1966&lt;/TD&gt;
&lt;TD width="51.0312px"&gt;xyz&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/09/1966&lt;/TD&gt;
&lt;TD width="101.734px"&gt;xyz&lt;/TD&gt;
&lt;TD width="125.688px"&gt;07/09/1966&lt;/TD&gt;
&lt;TD width="138.172px"&gt;xyz&lt;/TD&gt;
&lt;TD width="101.688px"&gt;07/09/1966&lt;/TD&gt;
&lt;TD width="114.156px"&gt;xyz&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="40px"&gt;&lt;FONT color="#0000FF"&gt;348&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="46.5938px"&gt;&lt;FONT color="#0000FF"&gt;1235&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/10/1967&lt;/TD&gt;
&lt;TD width="51.0312px"&gt;cdf&lt;/TD&gt;
&lt;TD width="91.0781px"&gt;07/10/1967&lt;/TD&gt;
&lt;TD width="101.734px"&gt;efg&lt;/TD&gt;
&lt;TD width="125.688px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="138.172px"&gt;cdf&lt;/TD&gt;
&lt;TD width="101.688px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="114.156px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now since 348( id1) and 1235(id2) combination does not exist in payroll dataset , so I would like update &lt;STRONG&gt;&lt;FONT color="#339966"&gt;dob_payroll &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;and&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;name_payroll&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;it as '&lt;STRONG&gt;id1 and id2 combination does not exist'.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I&lt;/STRONG&gt;f we know the number&amp;nbsp;of datasets we are merging, we can assign alias like&amp;nbsp;&lt;STRONG&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&lt;/STRONG&gt;mentioned . But here every time the number&amp;nbsp; and name&amp;nbsp; of datasets in merge statement will change it could be 5 or 10 or 20 ,based on incoming/existing data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if this helps to understand the problem statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 04:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761968#M241188</guid>
      <dc:creator>suchismita</dc:creator>
      <dc:date>2021-08-17T04:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761973#M241191</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;So now since 348( id1) and 1235(id2) combination does not exist in payroll dataset , so I would like update &lt;STRONG&gt;&lt;FONT color="#339966"&gt;dob_payroll &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;and&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;name_payroll&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;it as '&lt;STRONG&gt;id1 and id2 combination does not exist'.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hardly possible to insert text in a date-variable. &lt;/P&gt;
&lt;P&gt;For future posts: please take some more time to find a proper title for your topics.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 06:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/761973#M241191</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-08-17T06:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762030#M241219</link>
      <description>&lt;P&gt;the dataset option "IN=" could help you flag non matching records.&amp;nbsp; There are more than one way to do this, some better for you than others --- you will have to chose.&amp;nbsp; Below is one example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*simulating your setup*/

%put &amp;amp;=table_list ;
/*log:*/
*table_list = 
    TABLELST.sales(in=insales)     
    TABLELST.marketing(in=inmarketing)   
    TABLELST.payroll(in=inPayroll)
/*end log*/;

data all errors ;
  merge &amp;amp;table_list;
    by id1 id2;
  if insales and inmarketing and inPayroll
    then output all;
    else output errors; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Aug 2021 12:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762030#M241219</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-08-17T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762059#M241234</link>
      <description>&lt;P&gt;sure will do that. thank you.&lt;/P&gt;
&lt;P&gt;If I convert dob to character variable, then is there a way to update it?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 13:50:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762059#M241234</guid>
      <dc:creator>suchismita</dc:creator>
      <dc:date>2021-08-17T13:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762238#M241315</link>
      <description>&lt;P&gt;Yes, but the variable is hardly usable, when converted to text. So why not just keep the missing values, and maybe add a footnote when reporting, explaining the missing value.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 08:00:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762238#M241315</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-08-18T08:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: sas programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762339#M241358</link>
      <description>&lt;P&gt;Sounds like you don't want to MERGE that data at all.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a SET statement with the INDSNAME= option to indicate which dataset contributed the observation.&lt;/P&gt;
&lt;P&gt;You could then store the name into a permanent variable and use that in conjunction with PROC TRANSPOSE to generate new variable names.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data step1;
   set ds1 ds2 ds3 indsname=dsn;
   by id1 id2;
   dsname = upcase(scan(dsn,-1,'.'));
run;
proc transpose data=step1 name=variable out=step2;
  by id1 id2 dsname notsorted;
  var dob name;
run;
proc transpose data=step2 out=want(drop=_name_) delim=_;
  by id1 id2 ;
  id variable dsname;
  var col1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Aug 2021 16:40:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-programming/m-p/762339#M241358</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-18T16:40:11Z</dc:date>
    </item>
  </channel>
</rss>

