- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.