Hi:
Remember that by default, numeric variables are right justified. That will never put the dollar sign in a fixed position (unless, of course, all your numbers are the same number of digits). The only way to get the dollar sign into a "fixed" position is to turn your number into a character string and then put the $ in front of the character string (see CHARDOL variable and compare how it looks in LISTING vs ODS HTML).
If you left justify the number, using a PICTURE format, you may find the dollar signs lining up.
The program below makes some data and by comparing the ODS HTML and the LISTING output, you will see the difference between the outputs and perhaps, depending on what you want to create, you will find an answer to your question.
My tendency would be to leave the $ off the rows and only put a $ on the last summary row, instead of trying to force a lined up $ (using call define). The character variable solution looks attractive, but then you can't summarize on a character variable -- so that's a down side. And depending on your client application in which this format is being used the picture format or character variable may not align the way you want anyway.
cynthia
[pre]
PROC FORMAT;
PICTURE DOL LOW-HIGH = '000,000,009.99' (PREFIX='$ ');
PICTURE flDOL LOW-HIGH = '000,000,009.99' (PREFIX='$ ' fill='*');
RUN;
DATA testfmt;
INFILE DATALINES;
INPUT DOL ;
flDOL = dol;
x = dol;
chardol = '$'||right(put(dol,comma14.2));
FORMAT x best14.4 DOL DOL. flDOL flDOL.;
return;
DATALINES;
12345
0
187.65
.23
14.2
987.234
1.234
101.23
;
RUN;
options nodate nonumber linesize=70;
ods listing;
ods html file='c:\temp\leftjust.html' style=egdefault;
PROC report data=testfmt nowd;
TITLE 'Using Picture Formats with default justify (right)';
column X DOL flDOL chardol;
define x /display;
define dol /display;
define fldol /display;
define chardol / display;
RUN;
PROC report data=testfmt nowd;
TITLE 'Using Picture Formats with left justify and ODS';
column X DOL flDOL chardol;
define x /display style(column)={just=left};
define dol /display style(column)={just=left};
define fldol /display style(column)={just=left};
define chardol /display style(column)={asis=on};
RUN;
ods html close; [/pre]