After running as suggested, only the first page is output. Below is the log - there are a number of warning relating to formatting, but I don't see anything else:
381
382 %macro proc_code(var,i,title);
383 ods select none;
384 proc freq data=pd.griffin_collapsed_values;
385 tables &var*(gender agecat_coll race_coll edu_coll2
385! income_coll2
386 employ_coll2)/chisq;
387 where &var not in (.,99);
388 ods output chisq=chi&i;
389 run;
390 ods select all;
391
392
393 *Create macro variable containing Chi-Square Results for
393! each demographic variable;
394 data _null_;set chi&i;
395 format tmp $40.;
396 if Statistic="Chi-Square" and Table="Table &var *
396! Gender"
397 then do;
398 tmp1=cat("Chi-Square Results
398! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
398! <.001,"<.001",strip(round(prob,.001))));
399 call symputx("chia&i",tmp1, 'G');
400 end;
401 if Statistic="Chi-Square" and Table="Table &var *
401! agecat_coll"
402 then do;
403 tmp2=cat("Chi-Square Results
403! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
403! <.001,"<.001",strip(round(prob,.001))));
404 call symputx("chib&i",tmp2, 'G');
405 end;
406 if Statistic="Chi-Square" and Table="Table &var *
406! race_coll"
407 then do;
408 tmp3=cat("Chi-Square Results
408! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
408! <.001,"<.001",strip(round(prob,.001))));
409 call symputx("chic&i",tmp3, 'G');
410 end;
411 if Statistic="Chi-Square" and Table="Table &var *
411! edu_coll2"
412 then do;
413 tmp4=cat("Chi-Square Results
413! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
413! <.001,"<.001",strip(round(prob,.001))));
414 call symputx("chid&i",tmp4, 'G');
415 end;
416 if Statistic="Chi-Square" and Table="Table &var *
416! income_coll2"
417 then do;
418 tmp5=cat("Chi-Square Results
418! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
418! <.001,"<.001",strip(round(prob,.001))));
419 call symputx("chie&i",tmp5, 'G');
420 end;
421 if Statistic="Chi-Square" and Table="Table &var *
421! employ_coll2"
422 then do;
423 tmp6=cat("Chi-Square Results
423! CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
423! <.001,"<.001",strip(round(prob,.001))));
424 call symputx("chif&i",tmp6, 'G');
425 end;
426 RUN;
427
428 ***********************************************************
428! ****************;
429
430 proc gslide;
431 title1 "Q&i. &title" lspace=.5in f="bold";
432 run;quit;
433
434 *Bar chart #1;
435
436 goptions horigin=0 vorigin=6.75 hsize=3 vsize=3 htext=7pt
436! htitle=9pt ;
437 axis1 label=(a=90 f="Albany AMT" "Frequency") order=(0 to
437! 220 by 40) minor=none;
438 axis2 label=none value=none;
439 axis3 label=none ;
440 legend1
441 label=("Response" h=2 pt position=left j=c)
442 position=(top inside left) mode=share;
443 pattern1 v=solid color=CX93BFBF;
444 pattern2 v=solid color=CX4791ED;
445
446 proc gchart data=pd.griffin_collapsed_values;
447 vbar &var/DISCRETE
448 OUTSIDE=PERCENT
449 G100
450 GROUP=gender
451 SUBGROUP=&var
452 RAXIS=axis1
453 maxis=axis2
454 gaxis=axis3
455 legend=legend1
456 space=0
457 width=6
458 coutline=white;
459 where &var not =. and &var ne 99 and gender in (1,2);
460 format gender genderf. &var yesno.;
461 title1 "Gender" ;
462 footnote1 j=c h=.75 f=Albany "&chia&i";
463 run;
464 quit;
465
466 title;
467 footnote;
468
469 %mend;
470 ods pdf file="\\vmware-host\Shared Folders\Documents\My
470! Documents\PreDict\Hospital Reports\macro_a.pdf"
470! startpage=never ;
NOTE: Writing ODS PDF output to DISK destination
"\\vmware-host\Shared Folders\Documents\My
Documents\PreDict\Hospital Reports\macro_a.pdf",
printer "PDF".
471
472 GOPTIONS RESET=ALL ftext="Albany AMT";
473 goptions htitle=11pt;
474 options nodate nonumber;
475 options leftmargin=0.5in rightmargin=0.5in;
476 options mprint symbolgen;
477 %proc_code( discuss_pay,1,Hospital personnel came to my
477! room to discuss payment );
MPRINT(PROC_CODE): ods select none;
MPRINT(PROC_CODE): proc freq data=pd.griffin_collapsed_values;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): tables discuss_pay*(gender agecat_coll
race_coll edu_coll2 income_coll2 employ_coll2)/chisq;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): where discuss_pay not in (.,99);
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): ods output chisq=chi1;
MPRINT(PROC_CODE): run;
NOTE: The data set WORK.CHI1 has 40 observations and 5
variables.
NOTE: There were 254 observations read from the data set
PD.GRIFFIN_COLLAPSED_VALUES.
WHERE discuss_pay not in (., 99);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(PROC_CODE): ods select all;
MPRINT(PROC_CODE): *Create macro variable containing
Chi-Square Results for each demographic variable;
MPRINT(PROC_CODE): data _null_;
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): set chi1;
MPRINT(PROC_CODE): format tmp $40.;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * Gender" then do;
MPRINT(PROC_CODE): tmp1=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chia1",tmp1, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * agecat_coll" then do;
MPRINT(PROC_CODE): tmp2=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chib1",tmp2, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * race_coll" then do;
MPRINT(PROC_CODE): tmp3=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chic1",tmp3, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * edu_coll2" then do;
MPRINT(PROC_CODE): tmp4=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chid1",tmp4, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * income_coll2" then do;
MPRINT(PROC_CODE): tmp5=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chie1",tmp5, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
discuss_pay * employ_coll2" then do;
MPRINT(PROC_CODE): tmp6=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 1
MPRINT(PROC_CODE): call symputx("chif1",tmp6, 'G');
MPRINT(PROC_CODE): end;
MPRINT(PROC_CODE): RUN;
NOTE: Numeric values have been converted to character
values at the places given by: (Line):(Column).
3:41 5:63 6:92 7:113 9:164 10:191
NOTE: Variable tmp is uninitialized.
NOTE: There were 40 observations read from the data set
WORK.CHI1.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
MPRINT(PROC_CODE):
****************************************************************
***********;
MPRINT(PROC_CODE): proc gslide;
SYMBOLGEN: Macro variable I resolves to 1
SYMBOLGEN: Macro variable TITLE resolves to Hospital personnel
came to my room to discuss payment
MPRINT(PROC_CODE): title1 "Q1 Hospital personnel came to my
room to discuss payment" lspace=.5in f="bold";
MPRINT(PROC_CODE): run;
NOTE: 5929 bytes written to
C:\Users\bt24\AppData\Local\Temp\1\SAS Temporary
Files\_TD4600_MW25F6B917-VMW_\gslide4.png.
MPRINT(PROC_CODE): quit;
NOTE: PROCEDURE GSLIDE used (Total process time):
real time 0.14 seconds
cpu time 0.12 seconds
MPRINT(PROC_CODE): *Bar chart #1;
NOTE: No units specified for the HORIGIN option. INCHES will
be used.
NOTE: No units specified for the VORIGIN option. INCHES will
be used.
NOTE: No units specified for the HSIZE option. INCHES will be
used.
NOTE: No units specified for the VSIZE option. INCHES will be
used.
MPRINT(PROC_CODE): goptions horigin=0 vorigin=6.75 hsize=3
vsize=3 htext=7pt htitle=9pt ;
MPRINT(PROC_CODE): axis1 label=(a=90 f="Albany AMT"
"Frequency") order=(0 to 220 by 40) minor=none;
MPRINT(PROC_CODE): axis2 label=none value=none;
MPRINT(PROC_CODE): axis3 label=none ;
MPRINT(PROC_CODE): legend1 label=("Response" h=2 pt
position=left j=c) position=(top inside left) mode=share;
MPRINT(PROC_CODE): pattern1 v=solid color=CX93BFBF;
MPRINT(PROC_CODE): pattern2 v=solid color=CX4791ED;
MPRINT(PROC_CODE): proc gchart
data=pd.griffin_collapsed_values;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): vbar discuss_pay/DISCRETE OUTSIDE=PERCENT
G100 GROUP=gender SUBGROUP=discuss_pay RAXIS=axis1 maxis=axis2
gaxis=axis3 legend=legend1 space=0 width=6 coutline=white;
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): where discuss_pay not =. and discuss_pay
ne 99 and gender in (1,2);
SYMBOLGEN: Macro variable VAR resolves to discuss_pay
MPRINT(PROC_CODE): format gender genderf. discuss_pay yesno.;
MPRINT(PROC_CODE): title1 "Gender" ;
WARNING: Apparent symbolic reference CHIA not resolved.
SYMBOLGEN: Macro variable I resolves to 1
SYMBOLGEN: Macro variable CHIA1 resolves to Chi-Square Results
CHISQ(1)=0.57 p0.452
MPRINT(PROC_CODE): footnote1 j=c h=.75 f=Albany "Chi-Square
Results CHISQ(1)=0.57 p0.452";
MPRINT(PROC_CODE): run;
WARNING: The VBAR/VBAR3D chart for discuss_pay could not be
labeled because the labels are wider than the bars.
WARNING: There is not enough room for even one legend entry and
the label.
WARNING: The legend has been suppressed.
NOTE: Foreground color WHITE same as background. Part of your
graph might not be visible.
NOTE: 5062 bytes written to
C:\Users\bt24\AppData\Local\Temp\1\SAS Temporary
Files\_TD4600_MW25F6B917-VMW_\gchart14.png.
MPRINT(PROC_CODE): quit;
NOTE: There were 250 observations read from the data set
PD.GRIFFIN_COLLAPSED_VALUES.
WHERE discuss_pay not in (., 99) and gender in (1, 2);
NOTE: PROCEDURE GCHART used (Total process time):
real time 0.34 seconds
cpu time 0.25 seconds
MPRINT(PROC_CODE): title;
MPRINT(PROC_CODE): footnote;
478 %proc_code( doc_language,2,All hospital documents were
478! available in the language I prefer to read );
MPRINT(PROC_CODE): ods select none;
MPRINT(PROC_CODE): proc freq data=pd.griffin_collapsed_values;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): tables doc_language*(gender agecat_coll
race_coll edu_coll2 income_coll2 employ_coll2)/chisq;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): where doc_language not in (.,99);
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): ods output chisq=chi2;
MPRINT(PROC_CODE): run;
NOTE: The data set WORK.CHI2 has 40 observations and 5
variables.
NOTE: There were 256 observations read from the data set
PD.GRIFFIN_COLLAPSED_VALUES.
WHERE doc_language not in (., 99);
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(PROC_CODE): ods select all;
MPRINT(PROC_CODE): *Create macro variable containing
Chi-Square Results for each demographic variable;
MPRINT(PROC_CODE): data _null_;
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): set chi2;
MPRINT(PROC_CODE): format tmp $40.;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * Gender" then do;
MPRINT(PROC_CODE): tmp1=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chia2",tmp1, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * agecat_coll" then do;
MPRINT(PROC_CODE): tmp2=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chib2",tmp2, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * race_coll" then do;
MPRINT(PROC_CODE): tmp3=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chic2",tmp3, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * edu_coll2" then do;
MPRINT(PROC_CODE): tmp4=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chid2",tmp4, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * income_coll2" then do;
MPRINT(PROC_CODE): tmp5=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chie2",tmp5, 'G');
MPRINT(PROC_CODE): end;
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): if Statistic="Chi-Square" and Table="Table
doc_language * employ_coll2" then do;
MPRINT(PROC_CODE): tmp6=cat("Chi-Square Results
CHISQ","(",DF,")=",round(value,.01)," p",ifc(prob
<.001,"<.001",strip(round(prob,.001))));
SYMBOLGEN: Macro variable I resolves to 2
MPRINT(PROC_CODE): call symputx("chif2",tmp6, 'G');
MPRINT(PROC_CODE): end;
MPRINT(PROC_CODE): RUN;
NOTE: Numeric values have been converted to character
values at the places given by: (Line):(Column).
3:41 5:63 6:92 7:113 9:164 10:191
NOTE: Variable tmp is uninitialized.
NOTE: There were 40 observations read from the data set
WORK.CHI2.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
MPRINT(PROC_CODE):
****************************************************************
***********;
MPRINT(PROC_CODE): proc gslide;
SYMBOLGEN: Macro variable I resolves to 2
SYMBOLGEN: Macro variable TITLE resolves to All hospital
documents were available in the language I prefer
to read
MPRINT(PROC_CODE): title1 "Q2 All hospital documents were
available in the language I prefer to read" lspace=.5in
f="bold";
MPRINT(PROC_CODE): run;
WARNING: TITLE1 is too long. Height has been reduced to 69.13
pct of specified or default size.
WARNING: TITLE1 is too long. Height has been reduced to 70.97
pct of specified or default size.
NOTE: 2683 bytes written to
C:\Users\bt24\AppData\Local\Temp\1\SAS Temporary
Files\_TD4600_MW25F6B917-VMW_\gslide5.png.
MPRINT(PROC_CODE): quit;
NOTE: PROCEDURE GSLIDE used (Total process time):
real time 0.26 seconds
cpu time 0.20 seconds
MPRINT(PROC_CODE): *Bar chart #1;
NOTE: No units specified for the HORIGIN option. INCHES will
be used.
NOTE: No units specified for the VORIGIN option. INCHES will
be used.
NOTE: No units specified for the HSIZE option. INCHES will be
used.
NOTE: No units specified for the VSIZE option. INCHES will be
used.
MPRINT(PROC_CODE): goptions horigin=0 vorigin=6.75 hsize=3
vsize=3 htext=7pt htitle=9pt ;
MPRINT(PROC_CODE): axis1 label=(a=90 f="Albany AMT"
"Frequency") order=(0 to 220 by 40) minor=none;
MPRINT(PROC_CODE): axis2 label=none value=none;
MPRINT(PROC_CODE): axis3 label=none ;
MPRINT(PROC_CODE): legend1 label=("Response" h=2 pt
position=left j=c) position=(top inside left) mode=share;
MPRINT(PROC_CODE): pattern1 v=solid color=CX93BFBF;
MPRINT(PROC_CODE): pattern2 v=solid color=CX4791ED;
MPRINT(PROC_CODE): proc gchart
data=pd.griffin_collapsed_values;
SYMBOLGEN: Macro variable VAR resolves to doc_language
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): vbar doc_language/DISCRETE OUTSIDE=PERCENT
G100 GROUP=gender SUBGROUP=doc_language RAXIS=axis1 maxis=axis2
gaxis=axis3 legend=legend1 space=0 width=6 coutline=white;
SYMBOLGEN: Macro variable VAR resolves to doc_language
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): where doc_language not =. and doc_language
ne 99 and gender in (1,2);
SYMBOLGEN: Macro variable VAR resolves to doc_language
MPRINT(PROC_CODE): format gender genderf. doc_language yesno.;
MPRINT(PROC_CODE): title1 "Gender" ;
WARNING: Apparent symbolic reference CHIA not resolved.
SYMBOLGEN: Macro variable I resolves to 2
SYMBOLGEN: Macro variable CHIA2 resolves to Chi-Square Results
CHISQ(1)=0 p0.962
MPRINT(PROC_CODE): footnote1 j=c h=.75 f=Albany "Chi-Square
Results CHISQ(1)=0 p0.962";
MPRINT(PROC_CODE): run;
WARNING: The VBAR/VBAR3D chart for doc_language could not be
labeled because the labels are wider than the bars.
WARNING: There is not enough room for even one legend entry and
the label.
WARNING: The legend has been suppressed.
NOTE: Foreground color WHITE same as background. Part of your
graph might not be visible.
NOTE: 5009 bytes written to
C:\Users\bt24\AppData\Local\Temp\1\SAS Temporary
Files\_TD4600_MW25F6B917-VMW_\gchart15.png.
MPRINT(PROC_CODE): quit;
NOTE: There were 252 observations read from the data set
PD.GRIFFIN_COLLAPSED_VALUES.
WHERE doc_language not in (., 99) and gender in (1, 2);
NOTE: PROCEDURE GCHART used (Total process time):
real time 0.40 seconds
cpu time 0.29 seconds
MPRINT(PROC_CODE): title;
MPRINT(PROC_CODE): footnote;
479 ods pdf close;
NOTE: ODS PDF printed 1 page to \\vmware-host\Shared
Folders\Documents\My Documents\PreDict\Hospital
Reports\macro_a.pdf.
... View more