<?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 Base in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394463#M95058</link>
    <description>&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; have;&lt;/P&gt;&lt;P&gt;input ID $ Segment : $15.&amp;nbsp; Fail_Record_Number_NTB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total_Record_Number_NTB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fail_Record_Number_ALL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00070&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp; 4210 10712&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00071&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 299&amp;nbsp; 6193&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00072&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 99&amp;nbsp;&amp;nbsp; 642&amp;nbsp; 6570&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00070&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp; 191&amp;nbsp; 10712&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00071&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 235&amp;nbsp; 6193&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00072&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 99&amp;nbsp;&amp;nbsp; 163&amp;nbsp; 6570&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; want;&lt;/P&gt;&lt;P&gt;if _N_ = &lt;STRONG&gt;1&lt;/STRONG&gt; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;STRONG&gt;0&lt;/STRONG&gt; then set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash myhash( );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineKey('segment');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineData('_Fail_Record_Number_ALL');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineDone( );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; call missing(_Fail_Record_Number_ALL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _Fail_Record_Number_ALL=Fail_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if myhash.check() ne &lt;STRONG&gt;0&lt;/STRONG&gt; then myhash.add();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; myhash.find();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Total_Record_Number_ALL=Total_Record_Number_ALL-_Fail_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop _:;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Sep 2017 18:44:15 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2017-09-09T18:44:15Z</dc:date>
    <item>
      <title>SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394445#M95049</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a SAS Data manipulation question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see attached excel.&lt;/P&gt;
&lt;P&gt;I am trying to change the column 'Total_Record_Number_ALL'&amp;nbsp;from column F to column G.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SAS Code should look at each Segment, then keep the value of column&lt;SPAN&gt;&amp;nbsp;'&lt;/SPAN&gt;&lt;SPAN&gt;Total_Record_Number_ALL'&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; same for the first ID, but&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;change the value of the subsequent IDs. for example, for Segment 'SEG_00070', the value for Segment 'QA_00012' should stay as&amp;nbsp;10712. But for ID&amp;nbsp;QA_00013, the value should exclude the Failure records&amp;nbsp;(columns C &amp;amp; E) corresponding to the first ID&amp;nbsp;QA_00012 thus the value will change from&amp;nbsp;10712 to&amp;nbsp;10712&amp;nbsp;- 0 (column C) - 4210 (column E) = 6502.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 14:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394445#M95049</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2017-09-09T14:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394449#M95050</link>
      <description>A) Please use your imagination. How does your subject distinguish your question from others?&lt;BR /&gt;B) Don't attach Excel files.&lt;BR /&gt;C) This is not a programming service. What have you tried so far?</description>
      <pubDate>Sat, 09 Sep 2017 15:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394449#M95050</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-09-09T15:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394450#M95051</link>
      <description>&lt;P&gt;The subject line as &lt;STRONG&gt;SAS base&lt;/STRONG&gt; warrants to be &lt;U&gt;&lt;STRONG&gt;completely ridiculed&lt;/STRONG&gt; &lt;/U&gt;by the moderator. Also like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp; mentioned, OP should extend courtesy to responders when asking for help by explaining the situation, ideally a business problem or a real world technical solution with some self attempt in the first place. Very annoying indeed!!!!!!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Should super users like &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;who gave me likes to a similar comment of mine for another ridiculous question&amp;nbsp;have privileges to mark such questions as invalid, they should mark without any hesitation. It can't be like one can sit at work, expecting to throw their work onto people in the forum while they can enjoy their coffee.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 15:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394450#M95051</guid>
      <dc:creator>MarkWik</dc:creator>
      <dc:date>2017-09-09T15:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394454#M95052</link>
      <description>&lt;P&gt;I see some strong comments.hmm. I do concur with their thoughts. OK However., I saw your sample and I'm afraid you should have framed the subject line as some kind of &lt;STRONG&gt;&lt;EM&gt;look up across columns/column values&lt;/EM&gt;&lt;/STRONG&gt; and stuff and not SAS base lol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alright, so there you go,&lt;/P&gt;&lt;P&gt;1. now you know that your problem requires a look up solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. What you should be doing next? Search for SAS look up concepts. For examples, joins, merge, arrays, hashes etc&lt;/P&gt;&lt;P&gt;3. Then try to figure which of the above can work for your data and requirement&lt;/P&gt;&lt;P&gt;4. You may require pre processing your data to get into PDV for SAS to execute.&lt;/P&gt;&lt;P&gt;5. Break your solution into pieces so it is easy to understand and debug until you gain solid expertise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SAS programming, what I learned in my 4+ years of exp, the code should come to your mind as soon as you look at the data or while your stakeholders/boss at work assign you the task. This is when you'll know you have arrived .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to give it your best shot take the above 5 points and if you still don't get it right, that's perfectly fine. We the community and&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt; I will&lt;/EM&gt; &lt;/U&gt;&lt;/STRONG&gt;give you the solution as long as there is a solid effort. I promise. Either way, if somebody does give you what you want without you having to go through the pain of my suggested points. God bless! All the best!&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 16:46:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394454#M95052</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-09-09T16:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394456#M95054</link>
      <description>&lt;P&gt;Don't post spreadsheets. Just post the data. Also use shortner names, at least in your examples, nobody wants to type a paragraph just to reference a varaible by name. &amp;nbsp;Also if you know what value you want to get then give that in your example so we can test whether our suggestions work or not.&lt;/P&gt;
&lt;P&gt;So it looks like you have this data.&lt;/P&gt;
&lt;PRE&gt;ID,Segment,Fail_NTB,Total_NTB,Fail_ALL,Total_ALL,Want
QA_00012,SEG_00070,0,35,4210,10712,10712&lt;BR /&gt;QA_00012,SEG_00071,0,30,299,6193,6193&lt;BR /&gt;QA_00012,SEG_00072,0,99,642,6570,6570&lt;BR /&gt;QA_00013,SEG_00070,0,35,191,10712,6502&lt;BR /&gt;QA_00013,SEG_00071,0,30,235,6193,5894&lt;BR /&gt;QA_00013,SEG_00072,0,99,163,6570,5928&lt;BR /&gt;QA_00001,SEG_00142,0,19,3,565,565&lt;/PRE&gt;
&lt;P&gt;So it looks like you have an two id variables. How do they relate to each other? &amp;nbsp;You seem to have sorted the data by ID and SEGMENT but your explanation of your algorithm makes it look like you really want to sort by SEGMENT and then ID .&lt;/P&gt;
&lt;P&gt;So let's turn your data into an actual SAS dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  infile cards dsd truncover ;
  length id segment $10 ;
  input ID $ Segment $ Fail_NTB Total_NTB Fail_ALL Total_ALL Want;
cards;
QA_00012,SEG_00070,0,35,4210,10712,10712
QA_00012,SEG_00071,0,30,299,6193,6193
QA_00012,SEG_00072,0,99,642,6570,6570
QA_00013,SEG_00070,0,35,191,10712,6502
QA_00013,SEG_00071,0,30,235,6193,5894
QA_00013,SEG_00072,0,99,163,6570,5928
QA_00001,SEG_00142,0,19,3,565,565
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Next sort it properly so we can process the recrods in the right order.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort;
  by segment id ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We can calculate the number of non-failures by subtraction, but it looks like you want to actually keep the value from the previous calculation&amp;nbsp;instead of the calculation on the current record. &amp;nbsp;So we could use LAG() to get the value from the previous value, but we need to execute the LAG() function on every observation otherwise if will messup how LAG() operates. So calculate if first and then overwrite the value when you are on the first record of the group.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have ;
  by segment  ;
  non_fail = total_all - fail_ntb - fail_all ;
  new = lag(non_fail);
  if first.segment then new=total_all ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;                                        Total_              Total_
Obs     id        segment   Fail_NTB    NTB   Fail_ALL    ALL    Want  non_fail   new

 1   QA_00012    SEG_00070      0       35      4210     10712  10712     6502   10712
 2   QA_00013    SEG_00070      0       35       191     10712   6502    10521    6502
 3   QA_00012    SEG_00071      0       30       299      6193   6193     5894    6193
 4   QA_00013    SEG_00071      0       30       235      6193   5894     5958    5894
 5   QA_00012    SEG_00072      0       99       642      6570   6570     5928    6570
 6   QA_00013    SEG_00072      0       99       163      6570   5928     6407    5928
 7   QA_00001    SEG_00142      0       19         3       565    565      562     565&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Sep 2017 17:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394456#M95054</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-09-09T17:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394463#M95058</link>
      <description>&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; have;&lt;/P&gt;&lt;P&gt;input ID $ Segment : $15.&amp;nbsp; Fail_Record_Number_NTB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total_Record_Number_NTB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fail_Record_Number_ALL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00070&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp; 4210 10712&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00071&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 299&amp;nbsp; 6193&lt;/P&gt;&lt;P&gt;QA_00012&amp;nbsp;&amp;nbsp; SEG_00072&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 99&amp;nbsp;&amp;nbsp; 642&amp;nbsp; 6570&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00070&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 35&amp;nbsp;&amp;nbsp; 191&amp;nbsp; 10712&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00071&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 235&amp;nbsp; 6193&lt;/P&gt;&lt;P&gt;QA_00013&amp;nbsp;&amp;nbsp; SEG_00072&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 99&amp;nbsp;&amp;nbsp; 163&amp;nbsp; 6570&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00001&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00002&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00142&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp; 565&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00143&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 59&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 491&lt;/P&gt;&lt;P&gt;QA_00003&amp;nbsp;&amp;nbsp; SEG_00144&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 201&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; want;&lt;/P&gt;&lt;P&gt;if _N_ = &lt;STRONG&gt;1&lt;/STRONG&gt; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;STRONG&gt;0&lt;/STRONG&gt; then set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; declare hash myhash( );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineKey('segment');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineData('_Fail_Record_Number_ALL');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myhash.defineDone( );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; call missing(_Fail_Record_Number_ALL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _Fail_Record_Number_ALL=Fail_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if myhash.check() ne &lt;STRONG&gt;0&lt;/STRONG&gt; then myhash.add();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; myhash.find();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Total_Record_Number_ALL=Total_Record_Number_ALL-_Fail_Record_Number_ALL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop _:;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 18:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394463#M95058</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-09-09T18:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394480#M95070</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34445"&gt;@MarkWik&lt;/a&gt;&amp;nbsp;SuperUsers can't mark questions invalid, but we can edit questions. I usually will for subject lines if I catch it early enough and understand the question.&amp;nbsp;Although I agree in general, I try not to get too aggressive with people, though I have been on several sides of this rant, people who feel I'm 'rude or arrogant' and unhelpful. &amp;nbsp;One part of learning programming is learning how to ask questions, basically you don't even know what you don't know. At the end of the day, the only behaviour we can control is ours, and if a users continuously doesn't show effort, we can&amp;nbsp;just ignore the question. There are a few users who I won't answer on principal anymore.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/24118"&gt;@Siddharth123&lt;/a&gt;&amp;nbsp;although some of the points here may come across as rude, please realize the goal is really to answer your&amp;nbsp;question as efficiently and quickly as possible. Taking time to ask for clarifications, figure out the problem, download/open attachments all reduce the amount of time to answer your question or others. &amp;nbsp;These suggestions are designed to help you get answers faster and they really, really do.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 00:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394480#M95070</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-10T00:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Base</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394491#M95074</link>
      <description>&lt;P&gt;I apologise and would take special care when posting question on the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kind regards&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 05:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Base/m-p/394491#M95074</guid>
      <dc:creator>Siddharth123</dc:creator>
      <dc:date>2017-09-10T05:45:38Z</dc:date>
    </item>
  </channel>
</rss>

