05-24-2013 10:35 AM
data loans(keep=loan_num log_code filter);
Here is the scenario for the log codes.
if the log code is
TLS only (log code) – Received tab
TLS and TCD (log codes) – Pending
TLS and TMOD (log codes) – Reset
The issue is TLS can appear in all three scenarios, in scenarios 2 and 3, the second log code dictates the tab.
if log code = 'TLS' and log code not in ('TCD','TMOD') the filter = 'TLS';
if log code in('TLS','TCD)
I want the filter to populate with Received, Pending or Reset. What complicates this is TLS can appear in all 3 scenarios.
05-24-2013 10:59 AM
Are those actual data lines? If not actual, or at least the way it actually will appear in the data would be more helpful.
If log code in ('TLS','TCD') won't do what you want as this is true if the entire code is either of these values.
you may be looking for
if findw(Log_code,'TLS')>0 and findw(Log_code,'TCD')>0 then filter='Pending';
05-25-2013 04:47 AM
Does this data have key (or id) columns to group by?
I'm assuming when a group has the appropriate collection it belongs in one of the three tabs.
The design i would propose makes a join of 3 streams having just one type of data in each stream. But that approach needs a definition of the grouping.
With ordered data the 3 tabs could be written by a single data step. Proc sql wouln't need ordered data but can only write one tab at a time.