In the last example, you saw how
to use the SYMPUT routine to create a series of macro variables whose
names are based on the values of
However, you still needed to modify the TITLE statement in each PROC
PRINT step in order to print output for each course.
Suppose you want to
write a PROC PRINT step that you can reuse without any modification
to print information about each course. You can do this by using an
indirect reference in the TITLE statement.
data _null_; set sasuser.courses; call symput(course_code,trim(course_title)); run; %let crsid=C002; proc print data=sasuser.schedule noobs label; where course_code="&crsid"; var location begin_date teacher; title1 "Schedule for ...