Hi:
It sticks in my mind that this is how PICTURE works and you can't change it. The FILL option fills AFTER the picture has been applied (so, for example, you could create a mask of
[pre]
*******$12,345.00
[/pre]
But you have gotten the last neuron of my PICTURE knowledge. If I really, really, had to get a $ in the leftmost position, for LISTING only, I'd create a character variable from the amount and substring or concatenate the $ into the new character variable. Another possibility is to NOT show ANY dollar signs in the report rows and just show a $ on the LAST total row or at the bottom of the report -- which you can do with PROC REPORT and a CALL DEFINE for format on the RBREAK row. Maybe somebody else has a better idea or you could try Tech Support.
[pre]
Using FILL and Creating a Character Variable
Obs X flDOL other
1 12345 ****$12,345.00 $ 12,345.00
2 -12345 ***$-12,345.00 $ (12,345.00)
3 -187.65 ******$-187.65 $ (187.65)
4 187.65 *******$187.65 $ 187.65
5 1100000 *$1,100,000.00 $ 1,100,000.00
6 11100000 $11,100,000.00 $11,100,000.00
[/pre]
Personally, I don't like how the OTHER column looks in the output. And, in a proportional spaced font, such as that used with
HTML, RTF, etc, I doubt that it would all line up, anyway. Which means that as a stored process, even if you LIKE the way it looks in the ASCII output version,
it will NOT look that same way in EG or the SAS Add-in or Web Report Studio.
cynthia
[pre]
PROC FORMAT;
PICTURE OTHR (max=15) LOW-<0 = '000,000,009.99)' (PREFIX='(' FILL=' ' )
0 -HIGH = '000,000,009.99 ' (FILL=' ' );
PICTURE flDOL (max=15) LOW-<0 = '000,000,009.99' (PREFIX='$-' fill='*')
0 -HIGH = '000,000,009.99' (PREFIX='$' fill='*');
RUN;
DATA testfmt;
length other $15;
INFILE DATALINES;
INPUT X ;
flDOL = X;
other = put(x,othr.);
substr(other,1,1) = '$';
FORMAT x best14.4 flDOL flDOL.;
return;
DATALINES;
12345
-12345
-187.65
187.65
1.1E6
1.11E7
;
RUN;
PROC PRINT data=testfmt;
TITLE 'Using FILL and Creating a Character Variable';
VAR X flDOL other;
RUN;
[/pre]