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
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
  • 3 replies
  • 1228 views
  • 2 likes
  • 4 in conversation