I have having a hard time getting variable data in to the title and the n=
I am using the #BYVAR for one part and that is working fine but when I try to use the symput to get the value from another column in the data I am only getting a "."
Can you look at my code and tell me what I am doing wrong?
Code generated by SAS Task
Generated on: Monday, January 21, 2008 at 11:57:11 AM
By task: List Data
Input Data: WORK.CUR_PREV_LIB_STUDIES
Server: SASMain
------------------------------------------------------------------- */
/* Start of custom user code. */
options nobyline;
/* End of custom user code. */
PROC SQL;
%_SASTASK_DROPDS(WORK.SORTTempTableSorted);
QUIT;
/* -------------------------------------------------------------------
Data set WORK.CUR_PREV_LIB_STUDIES does not need to be sorted.
------------------------------------------------------------------- */
PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted
AS SELECT Dept_Course, MscTitle1, SUM_OF_MscMaxSeats, SUM_OF_MscTotalEnrolled1, SUM_OF_MscMaxSeats1, SUM_OF_MscTotalEnrolled, "Seats Remaining"n, Difference, Comment, SemDescrip1, SemDescrip, Group FROM WORK.CUR_PREV_LIB_STUDIES;
QUIT;
TITLE;
TITLE1 "Liberal Studies Maximum Seating Comparison";
TITLE2 "#byval(group)";
TITLE3 "#byval(semdescrip) VS #byval(semdescrip1)";
TITLE4 "%SYSFUNC(DATE(), WORDDATE32.) at %SYSFUNC(TIME(), TIMEAMPM8.);";
FOOTNOTE;
/* Start of custom user code. */
DATA _NULL_;
if _N_ = 1 then
call symput("PrevSemester", "Spring 2007");
if _N_ = 1 then
call symput("CurSemester", "Spring 2008");
if _N_ = 1 then
call symput("Lib_Group", put(group, best.));
else stop;
/* End of custom user code. */
PROC PRINT DATA=WORK.SORTTempTableSorted
NOOBS
LABEL
SPLIT='*'
/* Start of custom user code. */
n="TOTAL Classes for this &lib_Group = "
style(total)={background=yellow}
/* End of custom user code. */
;
VAR Dept_Course MscTitle1 SUM_OF_MscMaxSeats SUM_OF_MscTotalEnrolled1 SUM_OF_MscMaxSeats1 SUM_OF_MscTotalEnrolled "Seats Remaining"n Difference Comment SemDescrip1 SemDescrip
/* Start of custom user code. */
/ STYLE= {Foreground=bigdiff.}
/* End of custom user code. */
;
BY Group NOTSORTED;
SUMBY Group;
LABEL Dept_Course="DEPT*COURSE_NO"
MscTitle1="_____COURSE_TITLE_____"
SUM_OF_MscMaxSeats="PREV_SEM*MAX_SEATS"
SUM_OF_MscTotalEnrolled1="PREV_SEM*TOTAL_REG"
SUM_OF_MscMaxSeats1="CUR_SEM*MAX_SEATS"
SUM_OF_MscTotalEnrolled="CUR_SEM*TOTAL_REG"
"Seats Remaining"n="SEATS*REMAIN";
RUN;
/* -------------------------------------------------------------------
End of task code.
------------------------------------------------------------------- */
RUN; QUIT;
PROC SQL;
%_SASTASK_DROPDS(WORK.SORTTempTableSorted);
QUIT;
TITLE; FOOTNOTE;