Date: Thu, 16 Apr 2009 21:11:23 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Losing Text when using escapechar?
In-Reply-To: <110fae15-e54f-4665-9909-ba166ddba75b@y10g2000prc.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
I think that's WAD... when you use ods escapechar=~, ~ is supposed to mask
the next character and treat it as a control character. That's the point.
I'm surprised it doesn't mask the N - perhaps it doesn't have a meaning, but
I and P do?
More importantly, why do you feel you need to use ~ as both escapechar and
in the actual data? Why not use a different character? Or, if you mean an
unprintable character (ie, you want ~ to not be printed so to use it as a
not-printed marker), use ~ Protect instead of ~Protect. Or have a
non-printing column (NOPRINT option) to do your conditional work instead of
a displayed column...
Unless I'm really confused as to what the escapechar does, anyway...
-Joe
On Thu, Apr 16, 2009 at 7:30 PM, Gaz239 <garry.stevens@bilbys.org> wrote:
> This is a simple program showing an issue that is occuring in a more
> complicated one. Originally I noticed was only losing the letter I but
> now I have noticed I am losing the letter P as well??
>
> If you run the code below, the output in the rtf file that is created
> will look like this...
>
> rotect
> onise
> Normal
>
> Case Number: 0
>
> I want it to look like this
>
> Potect
> Ionise
> Normal
>
> Case Number: 0
>
>
> The code.....
>
> Data bill;
> case_note=1;
> rept_var = '~Protect';
> output;
> rept_var = '~Ionise';
> output;
> rept_var = '~Normal';
> output;
> run;
>
>
>
> ods rtf file="e:\sas\ebiserver\Lev2\SASMAin\tmp\Raj.rtf";
> ods escapechar = '~';
>
> PROC REPORT DATA=bill NOWD CENTER MISSING NOHEADER
> style(report)={rules=groups frame=hsides cellspacing=0 cellpadding=2
> borderwidth=1}
> style (column) = [background=white]
> style (header) = [foreground=black]
> style (lines)= [font_face=arial font_size=10pt ]
> ;
>
> footnote font=arial height=3 "~S={font_size=10pt font_weight=bold}Run
> on: &sysdate. &systime. Page ~{pageof}~S={}";
>
> COLUMN
> rept_var
> case_note
> ;
>
> DEFINE case_note /display order noprint;
> DEFINE rept_var / display;
>
> compute rept_var;
> if index(rept_var,'~')>0 then do;
> call define ('rept_var',"style","style=[font_weight=bold ]"); /
> *rules=none*/
> end;
> endcomp;
>
> break after case_note / page ;
>
> compute after _page_ /left;
> line ' ' ;
> line ' ' ;
> line @1 "~S={font_weight=bold}Case Number~S={}: " @63 case_note 8. ;
> endcomp;
>
> run;
>
> ods rtf close;
>
> run;
>
> Anyone else have a similar issue....
>
> Cheers
>
|