I have a table Delinquency which has about 10 columns, one of them has about numbers 0 to 120 I need them separated out as 0-29,30-69, 70-89, and 90-120 how to write the program to get the output. Where we have to find the Tot_days
naming convention is 0-29 as 0-29 ,30-69 as 30-69, 70-89 as 70-89 and 90-120 as 90-120.
It is not clear what and why you want:
If the target is a report you don't need a change in your table.
you can use a format to get summary or any statistics by groups you defined.
In the excel, you have posted, are two columns: account_number and tot_days.
There are more then one line per each. What are those duplicates?
You haven't mention which column name to relate to.
Please explain what exactly you want.
probably you can try the format as below and apply it to create a new variable
proc format;
value days
0-29='0-29'
30-69='30-69'
70-89='70-89'
90-120='90-120'
;
data want;
set have;
tot_days_new=put(tot_days,days.);
run;
Here's a tutorial on creating and recoding variables.
https://stats.idre.ucla.edu/sas/modules/creating-and-recoding-variables-in-sas/
Formats are a great option as well.
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: