<?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: How to skip records that do not have entry for the current month scenario execution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664385#M198474</link>
    <description>&lt;P&gt;Hello Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your input.&lt;/P&gt;&lt;P&gt;Attached is the scenario code. I tried attaching the header code but it keeps giving an error, so here it is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let header_id = 68634;&lt;/P&gt;&lt;P&gt;/* Set error code to 0 */&lt;BR /&gt;%let trans_rc = 0;&lt;/P&gt;&lt;P&gt;/* Include Scenario Messages */&lt;BR /&gt;filename scenMsgs "!AMLROOT/scenario/codegen/scenario_messages.sas" encoding='windows';&lt;BR /&gt;%include scenMsgs;&lt;/P&gt;&lt;P&gt;/* Set alert filenames */&lt;BR /&gt;%let alert_fname=work._tempalerts;&lt;BR /&gt;%let alert_fname_final=STG_ALER.CUSTOM_ACCOUNT_ALERTS&amp;amp;runasofdate ;&lt;/P&gt;&lt;P&gt;/* Remove Previous Temporary Alert Table */&lt;BR /&gt;proc datasets lib=work nowarn nolist;&lt;BR /&gt;delete _tempalerts;&lt;BR /&gt;quit;&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;/* Macros for each scenario/risk factor */&lt;BR /&gt;/* 10076 */&lt;BR /&gt;%macro fcf_run_scenario_391674_1 (&lt;BR /&gt;p10076_account_type_desc=,&lt;BR /&gt;p10076_amt_pct_increase=,&lt;BR /&gt;p10076_cnt_pct_increase=,&lt;BR /&gt;p10076_corr_seg=,&lt;BR /&gt;p10076_curr_amt_seg1_high=,&lt;BR /&gt;p10076_curr_amt_seg1_low=,&lt;BR /&gt;p10076_curr_amt_seg1_med=,&lt;BR /&gt;p10076_curr_amt_seg1_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg2_high=,&lt;BR /&gt;p10076_curr_amt_seg2_low=,&lt;BR /&gt;p10076_curr_amt_seg2_med=,&lt;BR /&gt;p10076_curr_amt_seg2_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg3_high=,&lt;BR /&gt;p10076_curr_amt_seg3_low=,&lt;BR /&gt;p10076_curr_amt_seg3_med=,&lt;BR /&gt;p10076_curr_amt_seg3_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg4_high=,&lt;BR /&gt;p10076_curr_amt_seg4_low=,&lt;BR /&gt;p10076_curr_amt_seg4_med=,&lt;BR /&gt;p10076_curr_amt_seg4_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg5_high=,&lt;BR /&gt;p10076_curr_amt_seg5_low=,&lt;BR /&gt;p10076_curr_amt_seg5_med=,&lt;BR /&gt;p10076_curr_amt_seg5_veryhigh=,&lt;BR /&gt;p10076_curr_count=,&lt;BR /&gt;p10076_high=,&lt;BR /&gt;p10076_low=,&lt;BR /&gt;p10076_med=,&lt;BR /&gt;p10076_N_exclude_swift=,&lt;BR /&gt;p10076_num_month=,&lt;BR /&gt;p10076_seg1=,&lt;BR /&gt;p10076_seg2=,&lt;BR /&gt;p10076_seg3=,&lt;BR /&gt;p10076_seg4=,&lt;BR /&gt;p10076_seg5=,&lt;BR /&gt;p10076_veryhigh=&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;%include 'E:\SAS\Config\Lev1\Applications\SASComplianceSolutions/FCFBU1/scenario/scenario_code_active/CON10076_v_19.sas' ;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;/* End scenario/risk factor macros */&lt;/P&gt;&lt;P&gt;/* Set array_dimension value */&lt;BR /&gt;%fcf_calculate_array_dim(ds=MST_PREP.ACCOUNT_PROFILE_CUSTOM, nkey=ACCOUNT_NUMBER);&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;/* Begin Header Code */&lt;/P&gt;&lt;P&gt;data &amp;amp;alert_fname&lt;BR /&gt;;&lt;BR /&gt;if 0 then set seg_kc.fsk_alert(keep=actual_values_text primary_entity_number primary_entity_level_code rename=(primary_entity_level_code=entity_level_code));&lt;BR /&gt;keep primary_entity_number scenario_id rundate actual_values_text entity_level_code&lt;BR /&gt;entity_segment_id&lt;BR /&gt;;&lt;BR /&gt;format rundate date9. ;&lt;BR /&gt;array ACCOUNT_TYPE_DESC (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array AVERAGE_DAILY_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array AVG_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array BEGINNING_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CASH_TRANSACTIONS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CLOSING_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_CREDIT_CASH (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_CREDIT_WIRE (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array COUNT_DEBIT_CASH (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_DEBIT_WIRE (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array CUST_INITIATED_TRANS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CUSTOMER_SEGMENT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array DEPOSITS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array ENDING_CASH_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array LARGEST_CREDIT_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array LARGEST_DEBIT_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array MAX_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array MIN_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array MONTH_KEY (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array RISK_LEVEL (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_CASH_CREDITS_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array TOTAL_CASH_DEBITS_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array TOTAL_CREDITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_DEBITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_TRANSACTIONS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_WIRE_CREDITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_WIRE_DEBITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TRANSACTIONS_COUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array WIRES_COUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array WITHDRAWALS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;set MST_PREP.ACCOUNT_PROFILE_CUSTOM&lt;BR /&gt;(rename=(&lt;BR /&gt;ACCOUNT_TYPE_DESC = temp2&lt;BR /&gt;ACCOUNT_VALUE_AMOUNT = temp3&lt;BR /&gt;AVERAGE_DAILY_BALANCE_AMOUNT = temp4&lt;BR /&gt;AVG_ACCOUNT_VALUE_AMOUNT = temp5&lt;BR /&gt;BEGINNING_BALANCE_AMOUNT = temp6&lt;BR /&gt;CASH_TRANSACTIONS_COUNT = temp7&lt;BR /&gt;CLOSING_BALANCE_AMOUNT = temp8&lt;BR /&gt;COUNT_CREDIT_CASH = temp9&lt;BR /&gt;COUNT_CREDIT_WIRE = temp10&lt;BR /&gt;COUNT_DEBIT_CASH = temp11&lt;BR /&gt;COUNT_DEBIT_WIRE = temp12&lt;BR /&gt;CUST_INITIATED_TRANS_COUNT = temp13&lt;BR /&gt;CUSTOMER_SEGMENT = temp14&lt;BR /&gt;DEPOSITS_COUNT = temp15&lt;BR /&gt;ENDING_CASH_BALANCE_AMOUNT = temp16&lt;BR /&gt;LARGEST_CREDIT_AMOUNT = temp18&lt;BR /&gt;LARGEST_DEBIT_AMOUNT = temp19&lt;BR /&gt;MAX_ACCOUNT_VALUE_AMOUNT = temp20&lt;BR /&gt;MIN_ACCOUNT_VALUE_AMOUNT = temp21&lt;BR /&gt;MONTH_KEY = temp22&lt;BR /&gt;RISK_LEVEL = temp23&lt;BR /&gt;TOTAL_CASH_CREDITS_AMOUNT = temp24&lt;BR /&gt;TOTAL_CASH_DEBITS_AMOUNT = temp25&lt;BR /&gt;TOTAL_CREDITS_AMOUNT = temp26&lt;BR /&gt;TOTAL_DEBITS_AMOUNT = temp27&lt;BR /&gt;TOTAL_TRANSACTIONS_AMOUNT = temp28&lt;BR /&gt;TOTAL_WIRE_CREDITS_AMOUNT = temp29&lt;BR /&gt;TOTAL_WIRE_DEBITS_AMOUNT = temp30&lt;BR /&gt;TRANSACTIONS_COUNT = temp31&lt;BR /&gt;WIRES_COUNT = temp32&lt;BR /&gt;WITHDRAWALS_COUNT = temp33&lt;BR /&gt;))&lt;BR /&gt;;&lt;BR /&gt;by ACCOUNT_NUMBER ;&lt;BR /&gt;if _n_ eq 1 then do;&lt;BR /&gt;retain rundate rundate_number entity_level_code run_scenario_init;&lt;BR /&gt;rundate = input(put(&amp;amp;runasofdate,8.),yymmdd8.);&lt;BR /&gt;rundate_number = input(put(rundate,date_to_num.),8.);&lt;BR /&gt;entity_level_code = "ACC";&lt;BR /&gt;run_scenario_init = 1;&lt;BR /&gt;end;&lt;BR /&gt;if first.ACCOUNT_NUMBER then n = 0;&lt;BR /&gt;n + 1;&lt;BR /&gt;if not entity_segment_id then entity_segment_id=-1;&lt;BR /&gt;if n le &amp;amp;array_dimension then do;&lt;BR /&gt;ACCOUNT_TYPE_DESC{n} = temp2;&lt;BR /&gt;ACCOUNT_VALUE_AMOUNT{n} = temp3;&lt;BR /&gt;AVERAGE_DAILY_BALANCE_AMOUNT{n} = temp4;&lt;BR /&gt;AVG_ACCOUNT_VALUE_AMOUNT{n} = temp5;&lt;BR /&gt;BEGINNING_BALANCE_AMOUNT{n} = temp6;&lt;BR /&gt;CASH_TRANSACTIONS_COUNT{n} = temp7;&lt;BR /&gt;CLOSING_BALANCE_AMOUNT{n} = temp8;&lt;BR /&gt;COUNT_CREDIT_CASH{n} = temp9;&lt;BR /&gt;COUNT_CREDIT_WIRE{n} = temp10;&lt;BR /&gt;COUNT_DEBIT_CASH{n} = temp11;&lt;BR /&gt;COUNT_DEBIT_WIRE{n} = temp12;&lt;BR /&gt;CUST_INITIATED_TRANS_COUNT{n} = temp13;&lt;BR /&gt;CUSTOMER_SEGMENT{n} = temp14;&lt;BR /&gt;DEPOSITS_COUNT{n} = temp15;&lt;BR /&gt;ENDING_CASH_BALANCE_AMOUNT{n} = temp16;&lt;BR /&gt;LARGEST_CREDIT_AMOUNT{n} = temp18;&lt;BR /&gt;LARGEST_DEBIT_AMOUNT{n} = temp19;&lt;BR /&gt;MAX_ACCOUNT_VALUE_AMOUNT{n} = temp20;&lt;BR /&gt;MIN_ACCOUNT_VALUE_AMOUNT{n} = temp21;&lt;BR /&gt;MONTH_KEY{n} = temp22;&lt;BR /&gt;RISK_LEVEL{n} = temp23;&lt;BR /&gt;TOTAL_CASH_CREDITS_AMOUNT{n} = temp24;&lt;BR /&gt;TOTAL_CASH_DEBITS_AMOUNT{n} = temp25;&lt;BR /&gt;TOTAL_CREDITS_AMOUNT{n} = temp26;&lt;BR /&gt;TOTAL_DEBITS_AMOUNT{n} = temp27;&lt;BR /&gt;TOTAL_TRANSACTIONS_AMOUNT{n} = temp28;&lt;BR /&gt;TOTAL_WIRE_CREDITS_AMOUNT{n} = temp29;&lt;BR /&gt;TOTAL_WIRE_DEBITS_AMOUNT{n} = temp30;&lt;BR /&gt;TRANSACTIONS_COUNT{n} = temp31;&lt;BR /&gt;WIRES_COUNT{n} = temp32;&lt;BR /&gt;WITHDRAWALS_COUNT{n} = temp33;&lt;BR /&gt;end;&lt;BR /&gt;if not last.ACCOUNT_NUMBER then return;&lt;/P&gt;&lt;P&gt;/* End Header Code Generation */&lt;/P&gt;&lt;P&gt;/* Call each scenario/risk factor macro after setting scenario_id variable.*/&lt;BR /&gt;scenario_id = 391674;&lt;BR /&gt;if entity_segment_id = -1 or (&lt;BR /&gt;-1 = -1 /* is this the call for default */&lt;BR /&gt;and entity_segment_id not in ( /* is the segment for this entity specified, or do we call default */&lt;BR /&gt;-1&lt;BR /&gt;)&lt;BR /&gt;) then do;&lt;BR /&gt;/* CON10076 */&lt;BR /&gt;entity_level_code = "ACC";&lt;BR /&gt;primary_entity_number=ACCOUNT_NUMBER;&lt;BR /&gt;%fcf_run_scenario_391674_1 (&lt;BR /&gt;p10076_account_type_desc=%str('P','C') ,&lt;BR /&gt;p10076_amt_pct_increase=20 ,&lt;BR /&gt;p10076_cnt_pct_increase=20 ,&lt;BR /&gt;p10076_corr_seg=%str(('Z','R')) ,&lt;BR /&gt;p10076_curr_amt_seg1_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_count=5 ,&lt;BR /&gt;p10076_high=3 ,&lt;BR /&gt;p10076_low=1 ,&lt;BR /&gt;p10076_med=2 ,&lt;BR /&gt;p10076_N_exclude_swift=%str('CITIUS33','CITIGB2L','SCBLGB2L','SCBLDEFX','NWBKGB2L') ,&lt;BR /&gt;p10076_num_month=5 ,&lt;BR /&gt;p10076_seg1=%str('I') ,&lt;BR /&gt;p10076_seg2=%str('J') ,&lt;BR /&gt;p10076_seg3=%str('E') ,&lt;BR /&gt;p10076_seg4=%str('C') ,&lt;BR /&gt;p10076_seg5=%str('R') ,&lt;BR /&gt;p10076_veryhigh=4&lt;BR /&gt;);&lt;BR /&gt;end; /* if segment_ids == */&lt;/P&gt;&lt;P&gt;run_scenario_init = 0;&lt;BR /&gt;drop run_scenario_init;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Append results to final alert file */&lt;BR /&gt;proc append data=&amp;amp;alert_fname&lt;BR /&gt;base=&amp;amp;alert_fname_final FORCE;&lt;BR /&gt;run;&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2020 16:38:21 GMT</pubDate>
    <dc:creator>Ololade</dc:creator>
    <dc:date>2020-06-23T16:38:21Z</dc:date>
    <item>
      <title>How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663557#M198099</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly assist.&lt;/P&gt;&lt;P&gt;I have a dataset that has monthly transaction records of customers. I need to input a code in my scenario to skip customers that do not have entry for the current month scenario execution.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FORMAT rundate_number p10601_end_date 8.;&lt;/P&gt;&lt;P&gt;/*We created 1 variables, p10601_end_date, in order to check the date_key */&lt;BR /&gt;rundate_number=input(put(rundate,date_to_num.),8.);&lt;BR /&gt;p10601_end_date = input(put(rundate_number,num_to_date.),8.);&lt;/P&gt;&lt;P&gt;/* Skip parties that do not have transactions on the current day */&lt;BR /&gt;if month_key{n} gt p10601_end_date then goto &amp;amp;sysmacroname.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 17:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663557#M198099</guid>
      <dc:creator>Ololade</dc:creator>
      <dc:date>2020-06-19T17:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663562#M198100</link>
      <description>&lt;P&gt;First of all more code and data samples would be handy. I do not see a need for go to unless you want to do some logic and return back to the main code. If your sole objective is to skip records that do not match a certain criteria and you do not want them in the output you can just add the following line the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if some_date = current_date;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The lines following that conditional statement including output will only be executed if the conditional is true.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 17:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663562#M198100</guid>
      <dc:creator>smantha</dc:creator>
      <dc:date>2020-06-19T17:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663656#M198157</link>
      <description>&lt;P&gt;That looks like a SAS AML transaction monitoring scenario.&lt;/P&gt;
&lt;P&gt;It's too long ago that I've actually done something with AML so below just some pseudo-code to give you the idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe what you need to do is to create a look-up table with all customers that have had a transaction on the day. In below code that's done via a hash table (syntax needs amendment with actual column names; also make sure that "&amp;amp;runasofdate" matches the data type of "&lt;CODE class=" language-sas"&gt;transaction_date").&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;"PrepFile"&amp;nbsp; in this bit&lt;EM&gt;&amp;nbsp; dcl hash h_p10601(dataset:"&lt;STRONG&gt;PrepFile&lt;/STRONG&gt;(keep=party_no...&amp;nbsp;&lt;/EM&gt;needs to be the name of your header/prep/abt file ...I believe that's also stored in some macro variable which you could use.&lt;/P&gt;
&lt;P&gt;You then can check in your scenario logic if a customer exists in the lookup table (the hash table) and skip the execution if it doesn't - no more sure whether&amp;nbsp;&lt;CODE class=" language-sas"&gt;goto &amp;amp;sysmacroname.&lt;/CODE&gt;&amp;nbsp;is what makes the scenario execute or not for a specific row; in below logic it should exclude the transaction/customer if condition&amp;nbsp;h_p10601.check() ne 0 is TRUE.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;FORMAT rundate_number p10601_end_date 8.;

/*We created 1 variables, p10601_end_date, in order to check the date_key */
rundate_number=input(put(rundate,date_to_num.),8.);
p10601_end_date = input(put(rundate_number,num_to_date.),8.);

if _n_=1 then
  do;
    dcl hash h_p10601(dataset:"PrepFile(keep=party_no transaction_date (where=(transaction_date='&amp;amp;runasofdate'd)))");
    h_p10601.defineKey('party_no');
    h_p10601.defineDone();
  end;

/* Skip parties that do not have transactions on the current day */
if h_p10601.check() ne 0 then goto &amp;amp;sysmacroname.;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;....actually: I'm even no more sure if the header bit now got all the transactions for a customer transposed into a single row or not. If it's a single row then above code wouldn't work and you would need to search through the array to figure out if there is a transaction for the &amp;amp;runasofdate (and don't use the execution/system date but the date for which the AGP executes - I believe to remember that this is &amp;amp;runasofdate - but eventually that was also only something site specific we did ...too long ago!).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please share the header code section and eventually your scenario code as well. ...if the header is auto-generated then you should still be able to extract the code from the SAS log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 07:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/663656#M198157</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-20T07:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664385#M198474</link>
      <description>&lt;P&gt;Hello Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your input.&lt;/P&gt;&lt;P&gt;Attached is the scenario code. I tried attaching the header code but it keeps giving an error, so here it is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let header_id = 68634;&lt;/P&gt;&lt;P&gt;/* Set error code to 0 */&lt;BR /&gt;%let trans_rc = 0;&lt;/P&gt;&lt;P&gt;/* Include Scenario Messages */&lt;BR /&gt;filename scenMsgs "!AMLROOT/scenario/codegen/scenario_messages.sas" encoding='windows';&lt;BR /&gt;%include scenMsgs;&lt;/P&gt;&lt;P&gt;/* Set alert filenames */&lt;BR /&gt;%let alert_fname=work._tempalerts;&lt;BR /&gt;%let alert_fname_final=STG_ALER.CUSTOM_ACCOUNT_ALERTS&amp;amp;runasofdate ;&lt;/P&gt;&lt;P&gt;/* Remove Previous Temporary Alert Table */&lt;BR /&gt;proc datasets lib=work nowarn nolist;&lt;BR /&gt;delete _tempalerts;&lt;BR /&gt;quit;&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;/* Macros for each scenario/risk factor */&lt;BR /&gt;/* 10076 */&lt;BR /&gt;%macro fcf_run_scenario_391674_1 (&lt;BR /&gt;p10076_account_type_desc=,&lt;BR /&gt;p10076_amt_pct_increase=,&lt;BR /&gt;p10076_cnt_pct_increase=,&lt;BR /&gt;p10076_corr_seg=,&lt;BR /&gt;p10076_curr_amt_seg1_high=,&lt;BR /&gt;p10076_curr_amt_seg1_low=,&lt;BR /&gt;p10076_curr_amt_seg1_med=,&lt;BR /&gt;p10076_curr_amt_seg1_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg2_high=,&lt;BR /&gt;p10076_curr_amt_seg2_low=,&lt;BR /&gt;p10076_curr_amt_seg2_med=,&lt;BR /&gt;p10076_curr_amt_seg2_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg3_high=,&lt;BR /&gt;p10076_curr_amt_seg3_low=,&lt;BR /&gt;p10076_curr_amt_seg3_med=,&lt;BR /&gt;p10076_curr_amt_seg3_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg4_high=,&lt;BR /&gt;p10076_curr_amt_seg4_low=,&lt;BR /&gt;p10076_curr_amt_seg4_med=,&lt;BR /&gt;p10076_curr_amt_seg4_veryhigh=,&lt;BR /&gt;p10076_curr_amt_seg5_high=,&lt;BR /&gt;p10076_curr_amt_seg5_low=,&lt;BR /&gt;p10076_curr_amt_seg5_med=,&lt;BR /&gt;p10076_curr_amt_seg5_veryhigh=,&lt;BR /&gt;p10076_curr_count=,&lt;BR /&gt;p10076_high=,&lt;BR /&gt;p10076_low=,&lt;BR /&gt;p10076_med=,&lt;BR /&gt;p10076_N_exclude_swift=,&lt;BR /&gt;p10076_num_month=,&lt;BR /&gt;p10076_seg1=,&lt;BR /&gt;p10076_seg2=,&lt;BR /&gt;p10076_seg3=,&lt;BR /&gt;p10076_seg4=,&lt;BR /&gt;p10076_seg5=,&lt;BR /&gt;p10076_veryhigh=&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;%include 'E:\SAS\Config\Lev1\Applications\SASComplianceSolutions/FCFBU1/scenario/scenario_code_active/CON10076_v_19.sas' ;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;/* End scenario/risk factor macros */&lt;/P&gt;&lt;P&gt;/* Set array_dimension value */&lt;BR /&gt;%fcf_calculate_array_dim(ds=MST_PREP.ACCOUNT_PROFILE_CUSTOM, nkey=ACCOUNT_NUMBER);&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;/* Begin Header Code */&lt;/P&gt;&lt;P&gt;data &amp;amp;alert_fname&lt;BR /&gt;;&lt;BR /&gt;if 0 then set seg_kc.fsk_alert(keep=actual_values_text primary_entity_number primary_entity_level_code rename=(primary_entity_level_code=entity_level_code));&lt;BR /&gt;keep primary_entity_number scenario_id rundate actual_values_text entity_level_code&lt;BR /&gt;entity_segment_id&lt;BR /&gt;;&lt;BR /&gt;format rundate date9. ;&lt;BR /&gt;array ACCOUNT_TYPE_DESC (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array AVERAGE_DAILY_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array AVG_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array BEGINNING_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CASH_TRANSACTIONS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CLOSING_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_CREDIT_CASH (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_CREDIT_WIRE (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array COUNT_DEBIT_CASH (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array COUNT_DEBIT_WIRE (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array CUST_INITIATED_TRANS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array CUSTOMER_SEGMENT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array DEPOSITS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array ENDING_CASH_BALANCE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array LARGEST_CREDIT_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array LARGEST_DEBIT_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array MAX_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array MIN_ACCOUNT_VALUE_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array MONTH_KEY (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array RISK_LEVEL (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_CASH_CREDITS_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array TOTAL_CASH_DEBITS_AMOUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;array TOTAL_CREDITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_DEBITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_TRANSACTIONS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_WIRE_CREDITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TOTAL_WIRE_DEBITS_AMOUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array TRANSACTIONS_COUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array WIRES_COUNT (&amp;amp;array_dimension) _temporary_ ;&lt;BR /&gt;array WITHDRAWALS_COUNT (&amp;amp;array_dimension) $1 _temporary_ ;&lt;BR /&gt;set MST_PREP.ACCOUNT_PROFILE_CUSTOM&lt;BR /&gt;(rename=(&lt;BR /&gt;ACCOUNT_TYPE_DESC = temp2&lt;BR /&gt;ACCOUNT_VALUE_AMOUNT = temp3&lt;BR /&gt;AVERAGE_DAILY_BALANCE_AMOUNT = temp4&lt;BR /&gt;AVG_ACCOUNT_VALUE_AMOUNT = temp5&lt;BR /&gt;BEGINNING_BALANCE_AMOUNT = temp6&lt;BR /&gt;CASH_TRANSACTIONS_COUNT = temp7&lt;BR /&gt;CLOSING_BALANCE_AMOUNT = temp8&lt;BR /&gt;COUNT_CREDIT_CASH = temp9&lt;BR /&gt;COUNT_CREDIT_WIRE = temp10&lt;BR /&gt;COUNT_DEBIT_CASH = temp11&lt;BR /&gt;COUNT_DEBIT_WIRE = temp12&lt;BR /&gt;CUST_INITIATED_TRANS_COUNT = temp13&lt;BR /&gt;CUSTOMER_SEGMENT = temp14&lt;BR /&gt;DEPOSITS_COUNT = temp15&lt;BR /&gt;ENDING_CASH_BALANCE_AMOUNT = temp16&lt;BR /&gt;LARGEST_CREDIT_AMOUNT = temp18&lt;BR /&gt;LARGEST_DEBIT_AMOUNT = temp19&lt;BR /&gt;MAX_ACCOUNT_VALUE_AMOUNT = temp20&lt;BR /&gt;MIN_ACCOUNT_VALUE_AMOUNT = temp21&lt;BR /&gt;MONTH_KEY = temp22&lt;BR /&gt;RISK_LEVEL = temp23&lt;BR /&gt;TOTAL_CASH_CREDITS_AMOUNT = temp24&lt;BR /&gt;TOTAL_CASH_DEBITS_AMOUNT = temp25&lt;BR /&gt;TOTAL_CREDITS_AMOUNT = temp26&lt;BR /&gt;TOTAL_DEBITS_AMOUNT = temp27&lt;BR /&gt;TOTAL_TRANSACTIONS_AMOUNT = temp28&lt;BR /&gt;TOTAL_WIRE_CREDITS_AMOUNT = temp29&lt;BR /&gt;TOTAL_WIRE_DEBITS_AMOUNT = temp30&lt;BR /&gt;TRANSACTIONS_COUNT = temp31&lt;BR /&gt;WIRES_COUNT = temp32&lt;BR /&gt;WITHDRAWALS_COUNT = temp33&lt;BR /&gt;))&lt;BR /&gt;;&lt;BR /&gt;by ACCOUNT_NUMBER ;&lt;BR /&gt;if _n_ eq 1 then do;&lt;BR /&gt;retain rundate rundate_number entity_level_code run_scenario_init;&lt;BR /&gt;rundate = input(put(&amp;amp;runasofdate,8.),yymmdd8.);&lt;BR /&gt;rundate_number = input(put(rundate,date_to_num.),8.);&lt;BR /&gt;entity_level_code = "ACC";&lt;BR /&gt;run_scenario_init = 1;&lt;BR /&gt;end;&lt;BR /&gt;if first.ACCOUNT_NUMBER then n = 0;&lt;BR /&gt;n + 1;&lt;BR /&gt;if not entity_segment_id then entity_segment_id=-1;&lt;BR /&gt;if n le &amp;amp;array_dimension then do;&lt;BR /&gt;ACCOUNT_TYPE_DESC{n} = temp2;&lt;BR /&gt;ACCOUNT_VALUE_AMOUNT{n} = temp3;&lt;BR /&gt;AVERAGE_DAILY_BALANCE_AMOUNT{n} = temp4;&lt;BR /&gt;AVG_ACCOUNT_VALUE_AMOUNT{n} = temp5;&lt;BR /&gt;BEGINNING_BALANCE_AMOUNT{n} = temp6;&lt;BR /&gt;CASH_TRANSACTIONS_COUNT{n} = temp7;&lt;BR /&gt;CLOSING_BALANCE_AMOUNT{n} = temp8;&lt;BR /&gt;COUNT_CREDIT_CASH{n} = temp9;&lt;BR /&gt;COUNT_CREDIT_WIRE{n} = temp10;&lt;BR /&gt;COUNT_DEBIT_CASH{n} = temp11;&lt;BR /&gt;COUNT_DEBIT_WIRE{n} = temp12;&lt;BR /&gt;CUST_INITIATED_TRANS_COUNT{n} = temp13;&lt;BR /&gt;CUSTOMER_SEGMENT{n} = temp14;&lt;BR /&gt;DEPOSITS_COUNT{n} = temp15;&lt;BR /&gt;ENDING_CASH_BALANCE_AMOUNT{n} = temp16;&lt;BR /&gt;LARGEST_CREDIT_AMOUNT{n} = temp18;&lt;BR /&gt;LARGEST_DEBIT_AMOUNT{n} = temp19;&lt;BR /&gt;MAX_ACCOUNT_VALUE_AMOUNT{n} = temp20;&lt;BR /&gt;MIN_ACCOUNT_VALUE_AMOUNT{n} = temp21;&lt;BR /&gt;MONTH_KEY{n} = temp22;&lt;BR /&gt;RISK_LEVEL{n} = temp23;&lt;BR /&gt;TOTAL_CASH_CREDITS_AMOUNT{n} = temp24;&lt;BR /&gt;TOTAL_CASH_DEBITS_AMOUNT{n} = temp25;&lt;BR /&gt;TOTAL_CREDITS_AMOUNT{n} = temp26;&lt;BR /&gt;TOTAL_DEBITS_AMOUNT{n} = temp27;&lt;BR /&gt;TOTAL_TRANSACTIONS_AMOUNT{n} = temp28;&lt;BR /&gt;TOTAL_WIRE_CREDITS_AMOUNT{n} = temp29;&lt;BR /&gt;TOTAL_WIRE_DEBITS_AMOUNT{n} = temp30;&lt;BR /&gt;TRANSACTIONS_COUNT{n} = temp31;&lt;BR /&gt;WIRES_COUNT{n} = temp32;&lt;BR /&gt;WITHDRAWALS_COUNT{n} = temp33;&lt;BR /&gt;end;&lt;BR /&gt;if not last.ACCOUNT_NUMBER then return;&lt;/P&gt;&lt;P&gt;/* End Header Code Generation */&lt;/P&gt;&lt;P&gt;/* Call each scenario/risk factor macro after setting scenario_id variable.*/&lt;BR /&gt;scenario_id = 391674;&lt;BR /&gt;if entity_segment_id = -1 or (&lt;BR /&gt;-1 = -1 /* is this the call for default */&lt;BR /&gt;and entity_segment_id not in ( /* is the segment for this entity specified, or do we call default */&lt;BR /&gt;-1&lt;BR /&gt;)&lt;BR /&gt;) then do;&lt;BR /&gt;/* CON10076 */&lt;BR /&gt;entity_level_code = "ACC";&lt;BR /&gt;primary_entity_number=ACCOUNT_NUMBER;&lt;BR /&gt;%fcf_run_scenario_391674_1 (&lt;BR /&gt;p10076_account_type_desc=%str('P','C') ,&lt;BR /&gt;p10076_amt_pct_increase=20 ,&lt;BR /&gt;p10076_cnt_pct_increase=20 ,&lt;BR /&gt;p10076_corr_seg=%str(('Z','R')) ,&lt;BR /&gt;p10076_curr_amt_seg1_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg1_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg2_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg3_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg4_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_high=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_low=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_med=1000 ,&lt;BR /&gt;p10076_curr_amt_seg5_veryhigh=1000 ,&lt;BR /&gt;p10076_curr_count=5 ,&lt;BR /&gt;p10076_high=3 ,&lt;BR /&gt;p10076_low=1 ,&lt;BR /&gt;p10076_med=2 ,&lt;BR /&gt;p10076_N_exclude_swift=%str('CITIUS33','CITIGB2L','SCBLGB2L','SCBLDEFX','NWBKGB2L') ,&lt;BR /&gt;p10076_num_month=5 ,&lt;BR /&gt;p10076_seg1=%str('I') ,&lt;BR /&gt;p10076_seg2=%str('J') ,&lt;BR /&gt;p10076_seg3=%str('E') ,&lt;BR /&gt;p10076_seg4=%str('C') ,&lt;BR /&gt;p10076_seg5=%str('R') ,&lt;BR /&gt;p10076_veryhigh=4&lt;BR /&gt;);&lt;BR /&gt;end; /* if segment_ids == */&lt;/P&gt;&lt;P&gt;run_scenario_init = 0;&lt;BR /&gt;drop run_scenario_init;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Append results to final alert file */&lt;BR /&gt;proc append data=&amp;amp;alert_fname&lt;BR /&gt;base=&amp;amp;alert_fname_final FORCE;&lt;BR /&gt;run;&lt;BR /&gt;%fcf_rcset(&amp;amp;syserr);&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 16:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664385#M198474</guid>
      <dc:creator>Ololade</dc:creator>
      <dc:date>2020-06-23T16:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664386#M198475</link>
      <description>&lt;P&gt;Hi Smantha,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this but it didn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 16:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664386#M198475</guid>
      <dc:creator>Ololade</dc:creator>
      <dc:date>2020-06-23T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664526#M198541</link>
      <description>&lt;P&gt;That's an account based scenario and you've got one row per account (and then arrays with monthly account profile data).&lt;/P&gt;
&lt;P&gt;Now you want to exclude accounts from customers that didn't have a transaction in the current month (or last 30 days; or whatever you choose).&lt;/P&gt;
&lt;P&gt;Transactions are between accounts and not customers but a customer can own multiple accounts - and you've got primary and secondary account holders.&lt;/P&gt;
&lt;P&gt;First thing you need to decide: Do you want to exclude an account with no current transactions if the owning customer has another account that had transactions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever way you want to go: You currently don't have the necessary data in the Prep file you're using. What you need to construct is a lookup table with account numbers to include (or exclude) from monitoring. To get there you will first have to create a distinct list of account numbers from the transaction table (=all account numbers where transaction_date=&amp;amp;runasofdate). If you're excluding account based then you've got your lookup table (and you could do the lookup via a hash table as proposed earlier).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to only exclude accounts if the owning customer didn't have any transaction on any of the other accounts owned by the customer then you would need to lookup the customer via the Party_Account bridge, select all matching customers and then lookup all accounts they own again via the Party_Account Bridge - and then use this list of distinct accounts as lookup table.&lt;/P&gt;
&lt;P&gt;To create the lookup table: The scenarios execute within a SAS data step so that's nothing you can implement within the scenario code. You basically need to create another daily prep file (lookup table) and you then load this prep file into a hash table as part of your scenario code and then do the lookup.&lt;/P&gt;
&lt;P&gt;Does this make sense?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 07:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664526#M198541</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-06-24T07:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip records that do not have entry for the current month scenario execution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664565#M198569</link>
      <description>Thank you Patrick.&lt;BR /&gt;I'll try the lookup table approach to exclude accounts with no profile entry for the rundate.&lt;BR /&gt;&lt;BR /&gt;Best regards and stay safe.&lt;BR /&gt;Ololade</description>
      <pubDate>Wed, 24 Jun 2020 06:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-skip-records-that-do-not-have-entry-for-the-current-month/m-p/664565#M198569</guid>
      <dc:creator>Ololade</dc:creator>
      <dc:date>2020-06-24T06:55:37Z</dc:date>
    </item>
  </channel>
</rss>

