View previous topic :: View next topic
|
Author |
Message |
BZ
New User
Joined: 01 Aug 2006 Posts: 2
|
|
|
|
Is there a way to format a zero-suppressed number with commas using sort? When I use the following sortlib I get a number #####. But I'd like to get ##,###. The number can be a different size each month.
Code: |
SORT FIELDS=COPY,
DYNALLOC=(,5),SIZE=E20000
OUTFIL CONVERT,
FILES=OUT,
OUTREC=(1:C'******* Monthly Totals: ', DESCRIPTION
25:1,6,PD,EDIT=(IIIIIIIIIITS), COUNT
37:44X)
|
|
|
Back to top |
|
|
sril.krishy
Active User
Joined: 30 Jul 2005 Posts: 183 Location: hyderabad
|
|
|
|
HI,
Check the MASK's available with DFSORT.If you are lucky,you might get one.
Thank you
Krishy |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can put commas in the EDIT pattern wherever you want them. For example:
Code: |
25:1,6,PD,EDIT=(II,III,III,IITS),SIGNS=(,,+,-),
|
Note that I've also added SIGNS which you need if you want the S to be interpreted as a trailing sign rather than as a hardcoded 'S'. |
|
Back to top |
|
|
BZ
New User
Joined: 01 Aug 2006 Posts: 2
|
|
|
|
That works and looks great! Thank you! |
|
Back to top |
|
|
|