I have the below code. I wish to align the summary count under the correct column using the line statement with compute. Using @ doesnt seem to place the text where I need it to be. What I'm I doing wrong?
Options nodate nobyline pageno=1 PS=100 LS=160;
title1 "VBB Member Achievements for All Dates";
title2 "RUN DATE: &SYSDATE9.";
title3 "&NoRecord";
proc report data=vbb_process 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 ;
define incent_plan_effdt / group 'Incentative Plan Eff Dt' width=22;
define incentive_plan_name / group 'Incentive Plan Name' width=19;
define incentive_component_name / group 'Incentative Component Name' width=25;
define last_name / order order=internal 'Last Name' width=9;
define first_name / order order=data 'First Name' width=10;
define subscriber_id / order order=data 'Subscriber Id' width=13;
define subscriber_and_sfx / order order=data '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 'Incentative Component*Achievement Earn Dt' width=40;
define incent_comp_achieve_createdt / order order=data 'Incentative Component*Achievement Created Dt' width=42;
define elig_ruleset / order order=data 'Eligibility Classification' width=11;
compute before incentive_plan_name;
ipname = trim(incentive_plan_name);
endcomp;
compute before incentive_component_name;
subcnt=0;
memcnt=0;
endcomp;
compute after incentive_component_name;
line @1 incentive_component_name $30. @40 subcnt 4. @45 memcnt 4.;
endcomp;
compute after subscriber_id;
subcnt+1;
subtot+1;
endcomp;
compute after subscriber_and_sfx;
memcnt+1;
memtot+1;
endcomp;
compute before incent_plan_effdt;
subtot=0;
memtot=0;
ipe = incent_plan_effdt;
endcomp;
compute after incent_plan_effdt;
line @1 ipname $60. 'Count' subtot 4. memtot 4.;
line @1 ipe mmddyy10. subtot 4. memtot 4.;
endcomp;
break after incent_plan_effdt / skip;
rbreak after / summarize dol;
run;
Sample Output: SubScriber_Id Member_ID
00000001111 000022222
These are the count: 1 1 (what I need)
Theses are the counts: 1 1 (what I'm getting).
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.