for explanation of how to use the forum "markup" see
http://support.sas.com/forums/thread.jspa?messageID=27609毙
I really think this might make a useful link on the "Post Message: Reply" toolbar
In the situation where the message you are interested in has partly disappeared, you can reveal most of the message (here from ArtC) with the "Quote Original" button in the "Post Message: Reply" frame
> You can build your own format with the PICTURE
> statement in PROC FORMAT. Adapt the following, which
> should be close.
>
> For some reason the code is being truncated and does
> not show up in the forum. email me and I will send
> it to you.
> art@caloxy.com
>
> [pre]
> proc format;
> picture ve
> low - < 0 = '0999.9'(prefix='-')
> 0 = '9'
> igh = '0999.9' (prefix='+');
> run;
>
> data vals;
> x=-23.4; output;
> x=1.5; output;
> x=0; output;
> x=0.78; output;
> x=91.34; output;
> run;
> proc print data=vals;
> format x ve.;
> run;
> [/pre]
Most of the problem has been caused by the less-than symbol used in trying to exclude 0 from the negative range
(
I don't know if that could become default behaviour, but I would certainly vote for it in a sasware ballot!!! see http://support.sas.com/community/ballot/)
Here is my markup with the "special" you can reveal with "Quote Original" (, I hope)
[pre] proc format cntlout=cntlout ;
picture ve
low - 0 = '0999.9' (prefix='-')
0 - 0 =' 0000.0' ( noedit )
0 - high = '0999.9' (prefix='+');
run;
%put %sysfunc( putn( 123, ve ))
%sysfunc( putn( 1.2, ve ))
%sysfunc( putn(-1.2, ve ))
%sysfunc( putn( 0, ve ));[/pre]This puts this line into the log [pre]+123.0 +001.2 -001.2 -000.0[/pre]demonstrating that the 0 is included in the negative range, even though it has its own range ?!?!?
So here is proc format code with "zero exclusion" on the negative range (and a demo of the markup which allows a "less than" symbol [pre]
proc format cntlout=cntlout ;
picture ve
0 - high = '0999.9' (prefix='+')
low - <0 = '0999.9' (prefix='-') ;
run;
%put %sysfunc( putn( 123, ve ))
%sysfunc( putn( 1.2, ve ))
%sysfunc( putn(-1.2, ve ))
%sysfunc( putn( 0, ve ));[/pre] clipped from the saslog, proving zero is no longer in the negative range[pre]+123.0 +001.2 -001.2 +000.0[/pre]
Does the SASware ballot extend to recommendations for change to this Forum?