The %closerep macro calls the macro %pagexofy to add the
"Page x of Y" labels and to make some character substitutions such as changing
the "A0"x character to spaces put there by %unistats for descriptive statistics
decimal point alignment. If you are not adding page labels of the form
"Page x of Y" then you do not need to call this macro. You have the choice
with %pagexofy of overwriting the input file or specifying an output file.
You
must make sure you have freed the print file before you call this macro
to overwrite it. If you have used a "proc printto" to redirect print
output then you must cancel it with another call "proc printto print=print;"
to free the output file before you call the %pagexofy macro to overwrite
it. If you have allocated the print file using a filename statement then
you must "clear" that fileref. Details of how to use the macro are
in the header. Note that you must supply file names to this macro and not
filerefs.
%pagexofy
options noovp nodate nonumber center
missing=" " formchar='|_---|+|---+=|-/\<>*'; options sasautos=("C:\spectre\macros" SASAUTOS); options ls=78 ps=63; %ctitlepgmrk("Centered title with a page marker on the right")
proc format;
proc sort data=sasuser.demog(where=(fascd=1))
%popfmt(demog,trtcd,uniqueid=patno invid) filename tmp "roland.txt";
%unistats(dsin=demog,
proc printto print=print;
filename tmp clear; %pagexofy("roland.txt"); |
And here is "roland.txt" after being converted in-place by %pagexofy
to change the "FF"x character to a page label.
Centered title with a page marker on the right
Page 1 of 1
______________________________________________________________________________ Ambident (1g/day) Betamax (500mg/day) (N=9) (N=8) ______________________________________________________________________________ GENDER CODE MALE 4 ( 44.4) 3 ( 37.5) FEMALE 5 ( 55.6) 5 ( 62.5) RACE CODE CAUCASIAN 5 ( 55.6) 1 ( 12.5) BLACK 2 ( 22.2) 3 ( 37.5) ASIAN 2 ( 22.2) 3 ( 37.5) HISPANIC 0 ( 0.0) 0 ( 0.0) OTHER 0 ( 0.0) 1 ( 12.5) AGE (YEARS) N 9 8 Min 16.0 16.0 Mean 26.3 24.0 Max 40.0 36.0 STD. 8.03 8.49 WEIGHT (KG) N 9 8 Min 65.5 65.5 Mean 76.6 70.8 Max 79.6 78.1 STD. 4.36 5.69 HEIGHT (CM) N 9 8 Min 175.0 175.0 Mean 197.2 182.3 Max 212.0 200.0 STD. 11.94 9.00 |
Use the "Back" button of your browser to return to the previous page