<?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: Consecutive Variable list Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122684#M25198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the option I would go for. Unfortunately, I have about 100 files now and more files will be coming in .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Oct 2013 19:55:27 GMT</pubDate>
    <dc:creator>saslove</dc:creator>
    <dc:date>2013-10-24T19:55:27Z</dc:date>
    <item>
      <title>Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122672#M25186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I want to build a macro that does the following data steps, but I am not sure how to use the consecutive variable list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data compare7;&lt;/P&gt;&lt;P&gt;merge fileid5 fileid 6;&lt;/P&gt;&lt;P&gt;by vehid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from fileid7&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare7 );&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data compare8;&lt;/P&gt;&lt;P&gt;merge compare7 fileid7;&lt;/P&gt;&lt;P&gt;by vehid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from fileid8&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare8 );&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data compare9;&lt;/P&gt;&lt;P&gt;merge compare8 fileid8;&lt;/P&gt;&lt;P&gt;by vehid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from fileid9&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare9 );&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data compare10;&lt;/P&gt;&lt;P&gt;merge compare9 fileid9;&lt;/P&gt;&lt;P&gt;by vehid;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from fileid10&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare10 );&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;At the end of each data step, I do a PROC SQL to compare the distinct variables from the merged files and a new file (fileid8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me with developing a macro for this as I have to compare more than 100 files and it is impractical to do it manually at every step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I add the consecutive variables at every step in a macro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 15:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122672#M25186</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T15:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122673#M25187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like all the numbers depend on a single number that could be a macro parameter.&amp;nbsp; For example, your code would expect FIRST_FILE=5:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro files (first_file=);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; data compare%eval(&amp;amp;first_file+2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge fileid&amp;amp;first_file fileid%eval(&amp;amp;first_file+1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by vehid;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;%mend files;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%files (first_file=5)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 16:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122673#M25187</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-10-24T16:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122674#M25188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is helpful, but I am having a problem with adding the SQL code to the macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from &amp;amp;first_file+2&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare&lt;STRONG&gt;%eval(&amp;amp;first_file+2))&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the bolded part right? I get this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS Log:&lt;/P&gt;&lt;P&gt;There were 683 observations read from the data set WORK.FILEID6.&lt;/P&gt;&lt;P&gt;NOTE: There were 621 observations read from the data set WORK.FILEID7.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.COMPARE8 has 843 observations and 15 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: Line generated by the macro variable "FIRST_FILE".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 76&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, CONNECTION, DICTIONARY.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 16:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122674#M25188</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T16:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122675#M25189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i believe the problem is at the underlined part, where sas is expecting a name of the dataset rather than a number, here &amp;amp;first_file will resolve to a number but not the name of the dataset. something like &lt;STRONG&gt;field%eval(&amp;amp;first_file+2))&lt;/STRONG&gt; should work well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*)&lt;/P&gt;&lt;P&gt;from (select distinct vehicleid &lt;/P&gt;&lt;P&gt;from &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&amp;amp;first_file&lt;/STRONG&gt;&lt;/SPAN&gt;+2&lt;/P&gt;&lt;P&gt;except&lt;/P&gt;&lt;P&gt;select distinct vehicleid from compare&lt;STRONG&gt;%eval(&amp;amp;first_file+2))&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 16:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122675#M25189</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-10-24T16:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122676#M25190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The bolded part does look correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first thing to check is whether the program itself contains extra blanks.&amp;nbsp; I assume that you actually have the word "fileid" in the program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from fileid%eval(&amp;amp;first_file+2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that there is no space between fileid and %eval.&amp;nbsp; (Same would apply everywhere %eval appears.)&amp;nbsp; If that's already in good shape, we can still find a solution but it would be marginally more complex.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 17:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122676#M25190</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-10-24T17:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122677#M25191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like I was wrong. What I wanted in the merge statement is to merge all the previous datasets. How should that be done? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%macro files (first_file=);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; data compare%eval(&amp;amp;first_file+2);&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge fileid&amp;amp;first_file fileid%eval(&amp;amp;first_file+1); ------- Here instead of first_file, I want everything before 8,.. That is merge all previous fileid 7,6,5,4,3,2,1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by vehid;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%mend files;&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;%files (first_file=8)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 18:11:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122677#M25191</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T18:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122678#M25192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ideas? I want all of my previous datasets in my merge statement and the new file to be compared to all the older datasets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inputs please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 18:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122678#M25192</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T18:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122679#M25193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's how to handle that piece.&amp;nbsp; All of this replaces the MERGE statement;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%local i;&lt;/P&gt;&lt;P&gt;merge&lt;/P&gt;&lt;P&gt;%do i = &amp;amp;first_file - 1 %to 1 %by -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fileid&amp;amp;i&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The semicolon at the end completes the MERGE statement, and the %DO loop builds the list of data set names to be merged.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:07:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122679#M25193</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-10-24T19:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122680#M25194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does that include all the previous datasets until the current one I am comparing with. For some reason, I don't get the numbers I am looking for. For instance, for fileid=9, there were only 20 new vehicles added, but I get 714. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122680#M25194</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T19:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122681#M25195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That includes all the lower numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fileid8 fileid7 fileid6 fileid5 fileid4 fileid3 fileid2 fileid1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try adding this line first, so you can see the code that gets generated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options mprint;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122681#M25195</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-10-24T19:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122682#M25196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the actual problem trying to be solved here?&amp;nbsp; &lt;/P&gt;&lt;P&gt;You seem to be trying to count number of cars added per file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge fileid5 (in=in5 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid6 (in=in6 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid7 (in=in7 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid8 (in=in8 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid9 (in=in9 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid10(in=in10 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end=eof&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by vechicleid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.vehicleid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new6 + (in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new7 + (in7 and ^in6);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new8 + (in8 and ^in7);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new9 + (in9 and ^in8);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new10+ (in10 and ^in9);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if eof;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put (new6-new10) (=/);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122682#M25196</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-24T19:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122683#M25197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me try again! And&amp;nbsp; I already have the mprint option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122683#M25197</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T19:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122684#M25198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the option I would go for. Unfortunately, I have about 100 files now and more files will be coming in .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122684#M25198</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T19:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122685#M25199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am counting the number of &lt;STRONG&gt;unique&lt;/STRONG&gt; cars added per file. There should be no overlap in the vehicle numbers in each fileid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 19:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122685#M25199</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T19:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Consecutive Variable list Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122686#M25200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I modified the code to get the number of unique new cars added at every step and it works. It is a longer version to get the value for 100+ files, but I can live with it for now. Thanks Tom! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; merge fileid5 (in=in5 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid6 (in=in6 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid7 (in=in7 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid8 (in=in8 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid9 (in=in9 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileid10(in=in10 keep=vehicleid)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end=eof&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; by vehicleid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if first.vehicleid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; new6 + (in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new7 + (in7 and ^in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new8 + (in8 and ^in7 and ^in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new9 + (in9 and ^in8 and ^in7 and ^in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; new10+ (in10 and ^in9 and ^in8 and ^in7 and ^in6 and ^in5);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if eof;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put (new6-new10) (=/);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your time everyone. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 20:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Consecutive-Variable-list-Macro/m-p/122686#M25200</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2013-10-24T20:14:30Z</dc:date>
    </item>
  </channel>
</rss>

