LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 31 Aug 2010 11:50:12 -0400
Reply-To:   Scott Bass <sas_l_739@YAHOO.COM.AU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Scott Bass <sas_l_739@YAHOO.COM.AU>
Subject:   What is the Perl metacharacter for a page break character?

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


Back to: Top of message | Previous page | Main SAS-L page