Date: Tue, 19 Mar 2002 17:50:04 +0100
Reply-To: Peter Crawford <peter.crawford@DB.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <peter.crawford@DB.COM>
Subject: Re: Picture format,
is it possible to put numeric character in the message part.
Content-type: text/plain; charset=iso-8859-1
Hi Ya Huang
I don't know the limits of ps fonts, but it might be worth
investigating the ps language to discover whether you
can "pass-thru" the superscript in some other way that
does not involve number characters.
If the superscript 2 is available as another character of
the symbol set, find it by trial-and-error, printing out a charset
(code to generate this is available in sas-l archives)
or even (last resort) read the documentation. ;-)
As designed, even in v8 there is no directive for picture
strings that allows the "noedit" option to be applied to only
part of the picture. The sophistication of the datetime
directives for picture formats provide a design model
which might be extended, if the right people at SI can be
influenced....
The current problem is that a number in the picture string
is considered a "digit selector"...
Extract from onlinedoc
Pictures are specified with three types of characters:
digit selectors,
message characters, and
directives.
Digit selectors are numeric characters (0 through 9)
that define positions for numeric values.
In your proposal, the 2(for square) is treated as a digit selector
If you want different behaviour, you'll have to "influence" SI...
good luck
Peter
Datum: 19/03/2002 15:51
An: SAS-L@LISTSERV.UGA.EDU
Antwort an: "Huang, Ya" <ya.huang@PFIZER.COM>
Betreff: Re: Picture format, is it possible to put numeric character in t he me ssage part?
Nachrichtentext:
Thanks Peter!
I did try the same thing before I got your response.
I also found 'b2'x to be a good candidate, it works fine
for SAS/Win and SAS/Unix V8, but it does not work for
v612/Unix (yes, we still use v612 in production), in which
you get an error message.
It seems that SI has improved the picture format in V8 by allowing
the some nonprintable letter in the message part. I wonder why
they did think about allowing a numeric character in the message
part!
Unfortunately, 'B2'x won't be my choice because our postscript printer
won't honor the font. I believe it is true also, if I convert it to
pdf file.
Regards,
Ya Huang
-----Original Message-----
From: Peter Crawford [mailto:peter.crawford@db.com]
Sent: Tuesday, March 19, 2002 4:21 AM
To: Huang, Ya
Cc: SAS-L@LISTSERV.UGA.EDU
Subject: Picture format, is it possible to put numeric character in the
me ssage part?
Clearly proc format is compiling the picture string from right
to left, starting with the power digit !
If you look in the symbol set with which you normally work,
you might find the integer power symbols.
(in this sasfont and courierNew it is 'b2'x for ^2 and 'b3'x for ^3)
I expect these would look even better than ^2, ^3 etc and they
won't be confused with "digit selectors" in the picture string
proc format;
picture dosefmt
low-high='000 mg/m' "b2"x
; /* another discovery ===> proc format supports
concatenated literal strings for the picture !! */
data _null_;
do dose=1,2,4,8;
put dose dosefmt.;
end;
run;
this produced on my log
1 mg/m²
2 mg/m²
4 mg/m²
8 mg/m²
Otherwise, you might have to look for strings that resolve suitably
in your preferred ods destination.
Good Luck
Peter Crawford
Datum: 18/03/2002 19:11
An: SAS-L@LISTSERV.UGA.EDU
Antwort an: "Huang, Ya" <ya.huang@PFIZER.COM>
Betreff: Picture format, is it possible to put numeric
character in the me ssage part?
Nachrichtentext:
Hi there,
71 proc format;
72 picture dosefmt
73 low-high='000 mg/m^'
74 ;
76 data _null_;
77 do dose=1,2,4,8;
78 put dose dosefmt.;
79 end;
80 run;
1 mg/m^
2 mg/m^
4 mg/m^
8 mg/m^
What I really want is:
1 mg/m^2
2 mg/m^2
4 mg/m^2
8 mg/m^2
But if I change the format to:
81 proc format;
82 picture dosefmt
83 low-high='000 mg/m^2' /* note the 2 here */
84 ;
86 data _null_;
87 do dose=1,2,4,8;
88 put dose dosefmt.;
89 end;
90 run;
1
2
4
8
duh!
According to the manual, message part of picture format
can only include nonnumeric character. I wonder if there
is any trick to get around it. noedit option won't work!
Thanks
Ya Huang
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.