IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DFSORT Formatting zero-suppressed numbers with commas


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
BZ

New User


Joined: 01 Aug 2006
Posts: 2

PostPosted: Tue Aug 01, 2006 2:13 am
Reply with quote

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
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Aug 02, 2006 9:18 pm
Reply with quote

HI,
Check the MASK's available with DFSORT.If you are lucky,you might get one.

Thank you
Krishy
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Aug 05, 2006 10:40 pm
Reply with quote

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
View user's profile Send private message
BZ

New User


Joined: 01 Aug 2006
Posts: 2

PostPosted: Mon Aug 07, 2006 7:00 pm
Reply with quote

That works and looks great! Thank you!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top