BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Here's the log.

6064 proc sort data = abc_complaint_type
6065 out = Algcomplaint_type_08 (keep=complaint_id com_type
6066 type_id);
6067 by complaint_id descending type_id;
6068 run;

NOTE: Sorting was performed by the data source.
NOTE: There were 12632 observations read from the data set ICMSDATA.CMS_COMPLAINT_TYPE.
NOTE: The data set WORK.ALGCOMPLAINT_TYPE_08 has 12632 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.31 seconds
cpu time 0.03 seconds

6070 proc sort data = abc_complaint
6071 out = algcomplaints_08 (keep=complaint_id init_desc date_reported
6072 case_no inactive
6073 call_assigned_to);
6074 by complaint_id ;
6075 run;

NOTE: Sorting was performed by the data source.
NOTE: There were 11504 observations read from the data set ICMSDATA.CMS_COMPLAINT.
NOTE: The data set WORK.ALGCOMPLAINTS_08 has 11504 observations and 12 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 2.89 seconds
cpu time 0.21 seconds


6076
6077 data algcomplaints_report_08;
6078 merge algcomplaint_type_08 algcomplaints_08;
6079 by complaint_id ;
6080 if date_reported >= '1jan2008:00:00:00'dt & date_reported <='31dec2008:00:00:00'dt;
6081 if inactive = 'Y' then delete;
6082 run;

NOTE: There were 12632 observations read from the data set WORK.ALGCOMPLAINT_TYPE_08.
NOTE: There were 11504 observations read from the data set WORK.ALGCOMPLAINTS_08.
NOTE: The data set WORK.ALGCOMPLAINTS_REPORT_08 has 1923 observations and 14 variables.
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.03 seconds


6083
6084 proc sort data = algcomplaints_report_08;
6085 by type_id;
6086 run;

NOTE: There were 1923 observations read from the data set WORK.ALGCOMPLAINTS_REPORT_08.
NOTE: The data set WORK.ALGCOMPLAINTS_REPORT_08 has 1923 observations and 14 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


6087
6088 data algcomplaints_report_08v1;
6089 set algcomplaints_report_08;
6090 by type_id;
6091 if first.type_id;
6092 run;

NOTE: There were 1923 observations read from the data set WORK.ALGCOMPLAINTS_REPORT_08.
NOTE: The data set WORK.ALGCOMPLAINTS_REPORT_08V1 has 1923 observations and 14 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
deleted_user
Not applicable
Not all the log appeared. Here is the rest.

6087
6088 data algcomplaints_report_08v1;
6089 set algcomplaints_report_08;
6090 by type_id;
6091 if first.type_id;
6092 run;

NOTE: There were 1923 observations read from the data set WORK.ALGCOMPLAINTS_REPORT_08.
NOTE: The data set WORK.ALGCOMPLAINTS_REPORT_08V1 has 1923 observations and 14 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You still have SAS log missing from your post-reply. Again, suggest you diagnose your program in detail by adding the suggested PUTLOG statement and you will want to debug it for both DATA steps. Break down your SAS processing into sequenced steps and analyze/debug them one at a time, working towards your desired output -- don't proceed to the next step until your confident with each successive PROC or DATA step -- remember, you know your data and your processing needs better than others (and you're closer to the data, as well). I tend to want to guide individuals on these forums rather than pushing code their way -- the SAS learning experience goes much farther that way.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Do you have anything in the observations that can be used to uniquely indentify a complaint? You cannot use the Case ID because a case can have many complaints. You cannot use the type ID because you can have many complaints with the same type ID. So, there needs to be some other variables/fields that can be used to differentiate the observations. If you are looking at log records, this gets to be more difficult because you can have many entries with differing type ids and different timestamps for the same complaint. The system needs to have a complaint ID of some sort to identify the specific complaint. This is what I gather from what I've read, so far, from the posting(s).
deleted_user
Not applicable
Yes, this is the issue. The case number can have many complaints and each of these is linked to that case number. There is no identifier that is unique to a single row of data.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 19 replies
  • 2251 views
  • 0 likes
  • 3 in conversation