I have the following formats in a format library:
value $Credit_Grp
'1' = '0-15'
'2' = '16-30'
'3' = '31+';
value $Credit_Grp2
'1' = '0-15 Credit Hours'
'2' = '16-30 Credit Hours'
'3' = '31+ Credit Hours';
When I run the tabulate code below using the $Credit_Grp format it works as advertised. But when I use the $Credit_Grp2 format it only displays the first two characters (ie "0-", "16", "31") for each value. What am I doing wrong? Thanks.
tabulate data = AnnFiveYearCombined2;
class ay2 acadplan Credit_Grp;
var FTES;
format acadplan $acadplandeg.;
format Credit_Grp $Credit_Grp.;
table Credit_Grp='Credit Hours' all='Total'*f=comma6., ay2=''*(N='HC' FTES='FTES'*sum=''*f=comma6.);
run;
Hi
Format names are not allowed to end in a number since this number is taken as the length of the formatted value call your format $Credit_Grp2X and it should work
Hi
Format names are not allowed to end in a number since this number is taken as the length of the formatted value call your format $Credit_Grp2X and it should work
Thanks Bruno. I'm a newbie when it comes to format libraries.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.