Locate unused User Defined Variables (UDVs) for SAS® Fraud Management


This SAS KB article explains how to find unused UDVs in SAS Fraud Management to reclaim space for new UDV creation.

Run the following SQL query in the System of Records (SOR) database as the sassorapp user:

     select * from ( select F.field_id, F.field_businessname, F.data_pop_attr_value, F.field_desc, F.field_initial_value, F.field_starting_pos, F.lstupdt_nbr, F.create_timestamp,
     F.create_user, F.lstupdt_timestamp, F.lstupdt_user, F.business_unit_id, B.business_unit_name, coalesce(F.begin_build_id,2147483647) as build_id,
     case when F.begin_build_id is null then '0' else '1' end as has_been_built_ind, coalesce((select count(distinct R.base_rule_id) as use_count from FCMCORE.FCM_RULE_SEGMENT_VARIABLE B
     join FCMCORE.fcm_rule R on R.rule_id=B.rule_id where F.field_id=B.field_id and R.rule_state='Production' group by B.field_id,R.rule_state ),0) as prod_use_count,
     coalesce((select count(distinct R.base_rule_id) as use_count from FCMCORE.FCM_RULE_SEGMENT_VARIABLE B join fcm_rule R on R.rule_id=B.rule_id where F.field_id=B.field_id
     and R.rule_state='Testing' group by B.field_id,R.rule_state ),0) as test_use_count, F.field_name, F.variable_type, F.field_length, F.sas_informat, F.sas_format, S.segment_desc ,
     S.segment_prefix_char, S.segment_length, S.segment_id, S.segment_id_version, S.tenant_multi_org_id, M.node_name, rtrim(S.segment_acronym) as segment_acronym, F.masking_type
     from FCMCORE.FCM_FIELD_DEFINITION F left join FCMCORE.FCM_SEGMENT_DEFINITION S on F.segment_id=S.segment_id left join FCMCORE.FCM_BUSINESS_UNIT B on B.business_unit_id=F.business_unit_id
     left join FCMCORE.FCM_MULTI_ORG M on M.multi_org_id=S.tenant_multi_org_id where F.logical_del_ind='0' and F.end_build_id is null and S.logical_del_ind='0'
     and (S.segment_rule_accessible_ind='1' or (S.segment_id_version like '10%' )) and F.field_rule_accessible_ind='1' and (S.segment_id_version like '10%'
     or S.segment_acronym='RUA') and segment_acronym like 'V0%' ) where 1=1 order by coalesce(lstupdt_timestamp,TO_TIMESTAMP('1953-04-12-05.00.00.000000','YYYY-MM-DD HH24.MI.SS.FF6')) desc, field_businessname;

The SAS Fraud Management web application uses sassorapp to access the SOR database credentials.

The UDVs with 0 (zero) for both the test_use_count and prod_use_count columns in the result of the SQL query above are the unused UDVs. You can delete these UDVs to reclaim space for new UDV creation.