View previous topic :: View next topic
|
Author |
Message |
venkatprasana
New User
Joined: 21 Oct 2013 Posts: 5 Location: india
|
|
|
|
I have an input file with any one of the values:
588
8558
45633
20
The expected output is :
000,588
008,558
045,633
000,020
The output is of 6 numbers with leading zeros and one comma after the first 3 digits. Please let me know how to achieve this using sort/FILEAID |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Code: |
//STEP100 EXEC PGM=SORT
//SORTIN DD *
588
8558
45633
20
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,6,UFF,EDIT=(TTT,TTT))
/*
//SYSOUT DD SYSOUT=* |
Output will be
Code: |
000,588
008,558
045,633
000,020
|
|
|
Back to top |
|
|
venkatprasana
New User
Joined: 21 Oct 2013 Posts: 5 Location: india
|
|
|
|
Thanks Escapa It worked well. Can u explain what UFF means and its significance |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Escapa provided the working snippet,
why should he waste time retelling what is already explained in the manuals ?
the link is the top at the page
or start from here
www-03.ibm.com/systems/z/os/zos/bkserv/index.html
or search the forums
IIRC one of the DFSORT Developers explained it already |
|
Back to top |
|
|
|