I'm new to Proc Report and ODS processing. How to I prevent duplication of data given the below code. The line in RED shouldn't print.
Physician Component 63 63
Welcome to your Bible Count 104 104
Welcome to your Bible Count 104 104
proc report data=vbb_rpt out=vbb_out split='*' missing nowd;
column incent_plan_effdt incentive_plan_name incentive_component_name last_name first_name subscriber_id
subscriber_and_sfx relationship_code reward_earndt reward_type reward_amount
incent_comp_achieve_earndt incent_comp_achieve_createdt elig_ruleset eff_cnt plan_cnt;
define incent_plan_effdt / group 'Incentive Plan Eff Dt' width=22;
define incentive_plan_name / group 'Incentive Plan Name' width=19;
define incentive_component_name / group 'Incentive Component Name' width=25;
define last_name / order order=internal 'Last Name' width=9;
define first_name / order order=internal 'First Name' width=10;
define subscriber_id / group 'Subscriber Id' width=13;
define subscriber_and_sfx / group 'Member Id' width=14;
define relationship_code / order order=data 'Relationship Code' width=17;
define reward_earndt / order order=data'Reward Earned Dt' width=16;
define reward_type / order order=data 'Reward Type' width=11;
define reward_amount / order order=data 'Reward Amt' width=10 format=dollar5.2;
define incent_comp_achieve_earndt / order order=data 'Incentive Component*Achievement Earn Dt' width=40;
define incent_comp_achieve_createdt / order order=data 'Incentive Component*Achievement Created Dt' width=42;
define elig_ruleset / order order=data 'Eligibility Classification' width=11;
define eff_cnt / analysis sum noprint;
define plan_cnt / analysis sum noprint;
compute before incent_plan_effdt;
uniqsub = 0;
uniqsub+eff_cnt.sum;
endcomp;
compute after incent_plan_effdt;
line @1 ipname $60. @62 'Count' @68 uniqsub 4. @79 uniqsub 4.;
endcomp;
compute before incentive_plan_name;
ipname = incentive_plan_name;
uniqmem = 0;
uniqmem+plan_cnt.sum;
endcomp;
compute after incentive_plan_name;
line @1 incentive_plan_name $60. @62 'Count' @68 uniqmem 4. @79 uniqmem 4.;
endcomp;
compute before incentive_component_name;
subcnt=0;
endcomp;
compute after incentive_component_name;
line @10 incentive_component_name $30. @95 subcnt 4. @115 subcnt 4.;
endcomp;
compute after subscriber_id;
subcnt+1;
endcomp;
rbreak after / summarize ul ol;
run;
;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.