BookmarkSubscribeRSS Feed
Sultana
Calcite | Level 5

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.

 

3 REPLIES 3
Shmuel
Garnet | Level 18

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.

Jagadishkatam
Amethyst | Level 16

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;
Thanks,
Jag

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 500 views
  • 2 likes
  • 4 in conversation