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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.