BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MFLoGrasso
Obsidian | Level 7

I am trying to create a table using the following code using SAS 9.4.  The parameter value &rptyr is a four-character integer (representing the year of the report).  I would like TITLE3 to provide the following result, and the code I am using below is only the most recent of several unsuccessful approaches at achieving this result:

 

Race and Gender Breakdown of All Students from Fall 2015 to Spring 2016 

 

proc tabulate data=srkdemog_ath out=srkdemog_all;
	var athlete;
	class state campus_code campus_desc ethnicity gender bid;
	table all='College' ethnicity='' gender='',
		(all='College' state=''*campus_code='Campus'*campus_desc='')*athlete=''*n='Total'*f=comma8.;
	title 'Student Right-to-Know Graduation Rate';
	title2 'Student Athletes';
	title3 "Race and Gender Breakdown of All Students from Fall %sysfunc(put(&rptyr-1,4.)) to Spring &rptyr";
	run;

 

Any assistance towards achieving this goal would be welcome.  Thank you.

 

Marc

 

1 ACCEPTED SOLUTION

Accepted Solutions
4 REPLIES 4
Reeza
Super User

%EVAL instead of PUT and SYSFUNC?

MFLoGrasso
Obsidian | Level 7
This worked perfectly. Thanks!
Astounding
PROC Star

%SYSFUNC does not support the PUT function.  You can switch to the PUTN function instead.  Once you do that, you may have to experiment with the third parameter (it may need to go in quotes).

MFLoGrasso
Obsidian | Level 7
I tried this as well, since you took the time to answer, and using PUTN instead of PUT also worked, so thank you!

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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