Good afternoon! I have a strange occurance that we aren't able to track down a solution for just yet. When I run the tabulate below EG shows the following output:
However, when I view the pdf that is being written during the process, I get the following output; notice how Gender changes to Has Pell:
Any idea why it is doing this?
ods pdf file="&FILELOC" notoc STYLE=ATD; options papersize=LEGAL orientation=landscape nodate LEFTMARGIN=.25IN RIGHTMARGIN=.25IN MISSING=0; /* SET GRID DIMENSIONS */ TITLE1 BOLD "Remedial Math - 1 Level Below"; TITLE2; FOOTNOTE "Generated by the Office of Institutional Research on %TRIM(%QSYSFUNC(DATE(), NLDATE20.))"; ods layout gridded rows = 2 columns = 4 column_gutter=.25in; %let CYEAR = 2012; /* COHORT YEAR */ %let TERM1 = &CYEAR.FA; /* COHORT TERM */ ods region row = 1 column = 1; ods text= "&CYEAR Cohort"; ods text= "Attempted in Fall"; PROC TABULATE DATA=WORK.DEV_&TERM1. format=6. MISSING STYLE=[background=white] ORDER=FORMATTED; WHERE (MaRAI_fall = '1' AND MaRGI_fall NOT IN(-1,.)); CLASS gender raceethn has_pell_fall / STYLE=[background=LIGHTGREY ]; CLASS MaRGI_fall / STYLE=[background=white]; TABLES (gender={LABEL='Gender'} raceethn={LABEL='Ethnic Origin'} has_pell_fall={LABEL='Has Pell'} all), MaRGI_fall={LABEL='Grade Rem Math - 1 Level'}*(n='N'*f=4. rowpctN='%'*f=4.1)*[s=[background=white CELLWIDTH=.3in]]; FORMAT gender $GENDER. raceethn $RACEETHN. MaRGI_fall DEV_GRADE.; RUN; ods pdf close;
Without data to test or complete few of the table it isn't easy to diagnose.
Does this do the same thing:
PROC TABULATE DATA=WORK.DEV_&TERM1. format=6. MISSING STYLE=[background=white] ORDER=FORMATTED;
WHERE (MaRAI_fall = '1' AND MaRGI_fall NOT IN(-1,.));
CLASS gender raceethn has_pell_fall / STYLE=[background=LIGHTGREY ];
CLASS MaRGI_fall / STYLE=[background=white];
TABLE gender raceethn has_pell_fall all,
MaRGI_fall *(n='N'*f=4. rowpctN='%'*f=4.1)*[s=[background=white CELLWIDTH=.3in]];
FORMAT gender $GENDER. raceethn $RACEETHN. MaRGI_fall DEV_GRADE.;
label
gender ='Gender'
raceethn ='Ethnic Origin'
has_pell_fall ='Has Pell'
MaRGI_fall ='Grade Rem Math - 1 Level'
;
RUN;
I would also try your code without the () around the first bit of the table statement.
You might check the log as well. I think you are getting a warning.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: