|
Summary:
What is the Perl regex metacharacter for a page break character?
Details:
I'm writing yet another "Page x of Y" macro, stealing liberally from other
examples, especially Roland Rashleigh-Berry's example
(http://www.datasavantconsulting.com/roland/Spectre/sysmacros/pagexofy.sas)
(Thanks Roland...)
I'm having a problem matching on the page break character SAS is generating
when it spits a new page.
Here is some sample code:
filename out temp;
data source;
do x=1 to 111;
output;
end;
run;
options ls=80 ps=20 number pageno=1;
proc printto print=out;
run;
title "This is my title";
proc print data=source;
run;
proc printto print=print;
run;
data _null_;
length delim $20;
delim="/\f/";
if _n_=1 then do;
retain prx;
prx=prxparse(quote(delim));
end;
infile out eof=last;
input;
pos=prxmatch(prx,_infile_);
if pos then do;
putlog "I GOTTA MATCH!";
pagecnt+1;
end;
return;
last:
call symputx("pagecnt",pagecnt + 1);
run;
%put pagecnt=&pagecnt;
Shouldn't "/\f/" match that funny little square (the page break character,
'0C'x) I see when I "fslist out" after generating the above output?
Thanks,
Scott
|