BookmarkSubscribeRSS Feed
hmlong25
Obsidian | Level 7
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
69
70 %Let outpath=/ECRBM6/output;
71 %Let outpath=/home/u57597905/ECRBM6/output;
72 %Let StateName=California;
73
74 ODS PDF File="&outpath/ClaimsReport.PDF" style=sapphire pdftoc=1;
NOTE: Writing ODS PDF output to DISK destination "/home/u57597905/ECRBM6/output/ClaimsReport.PDF", printer "PDF".
75 ODS noproctitle;
76
77 ODS proclabel "Overall Date Issues";
78 Title 'Overall Date Issues in the Data Set';
79
80 proc freq Data=TSA.Claims_Cleaned;
81 Tables Date_Issue/nocum nopercent missing;
82 run;
 
NOTE: There were 220850 observations read from the data set TSA.CLAIMS_CLEANED.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
user cpu time 0.02 seconds
system cpu time 0.05 seconds
memory 3938.15k
OS Memory 32688.00k
Timestamp 04/19/2025 06:08:35 PM
Step Count 225 Switch Count 2
Page Faults 0
Page Reclaims 485
Page Swaps 0
Voluntary Context Switches 20
Involuntary Context Switches 2
Block Input Operations 0
Block Output Operations 272
 
 
83 title;
84
85 ODS Graphics on;
86 ODS proclabel "Overall Claims by Year";
87 Title "Claims per year of Incident Date";
88
89 Proc Freq Data=TSA.Claims_Cleaned;
90 Tables Incident_Date/ nocum nopercent plots=freqplot out=freq_out;
91 format Incident_Date year4.;
92 Where Date_Issue is null;
93
94 run;
 
NOTE: There were 216609 observations read from the data set TSA.CLAIMS_CLEANED.
WHERE Date_Issue is null;
NOTE: The data set WORK.FREQ_OUT has 16 observations and 3 variables.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.23 seconds
user cpu time 0.11 seconds
system cpu time 0.05 seconds
memory 16503.12k
OS Memory 46260.00k
Timestamp 04/19/2025 06:08:35 PM
Step Count 226 Switch Count 4
Page Faults 0
Page Reclaims 4108
Page Swaps 0
Voluntary Context Switches 285
Involuntary Context Switches 5
Block Input Operations 0
Block Output Operations 1328
 
 
95 Title;
96
97 /* Specific State Analysis */
98
99 ODS proclabel "&StateName Claims Overview";
100 Title "Claim Site, Claim Type, and Disposition for &StateName";
101
102 Proc Freq Data=TSA.Claims_Cleaned order=freq;
103 Tables Claim_Type
104 Claim_Site
105 Disposition/nocum nopercent;
106 where State="&StateName" and Date_Issue is null;
107 run;
 
NOTE: No observations were selected from data set TSA.CLAIMS_CLEANED.
NOTE: There were 0 observations read from the data set TSA.CLAIMS_CLEANED.
WHERE 0 /* an obviously FALSE WHERE clause */ ;
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1949.56k
OS Memory 45996.00k
Timestamp 04/19/2025 06:08:35 PM
Step Count 227 Switch Count 0
Page Faults 0
Page Reclaims 243
Page Swaps 0
Voluntary Context Switches 6
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
 
108 Title;
109
110 ODS proclabel "&StateName Close Amount Statistics";
111 Title "Close Amount Statistics for &StateName";
112
113 Proc Means Data=TSA.Claims_Cleaned sum mean min max maxdec=0;
114 Var Close_Amount;
115 where State="&StateName" and Date_Issue is null;
116
117 run;
 
NOTE: No observations were selected from data set TSA.CLAIMS_CLEANED.
NOTE: There were 0 observations read from the data set TSA.CLAIMS_CLEANED.
WHERE 0 /* an obviously FALSE WHERE clause */ ;
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 8325.93k
OS Memory 52176.00k
Timestamp 04/19/2025 06:08:35 PM
Step Count 228 Switch Count 0
Page Faults 0
Page Reclaims 1796
Page Swaps 0
Voluntary Context Switches 6
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
 
118 Title;
119
120 ODS PDF close;
NOTE: ODS PDF printed 3 pages to /home/u57597905/ECRBM6/output/ClaimsReport.PDF.
121
122
123
124 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
134
 
4 REPLIES 4
PaigeMiller
Diamond | Level 26

@hmlong25 

For the benefit of anyone else with a similar problem, please explain the solution you found.

--
Paige Miller
hmlong25
Obsidian | Level 7

I appreciate you checking on this issue for me.   

The problem was that I could only print the 'Overall Analysis" and not the "State Analysis".

 

I had to change the State Variable to Statename so that when I used the macro for StateName it corresponded to the Variable.  Then the State Analysis printed.  So sorry for the late response!  Thank you!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 774 views
  • 0 likes
  • 3 in conversation