View previous topic :: View next topic
|
Author |
Message |
comp_ashok
New User
Joined: 30 Nov 2007 Posts: 15 Location: India
|
|
|
|
Hi All.
My requirement is jcl to do like this:
input file : fb, lrec=80
2222 60.00
2222 250.00
3333 1,700.00
3333 500.00
7777 100.00
output file: fb, lrec=8
2222 310.00
3333 2,200.00
7777 100.00
If starting 4 bytes are same in input file we have to add next numeric field of 6 bytes having thousand separator and upto 2 point of decimal in the input file and write one record in output file. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
comp_ashok,
You can use DFSORT UFF format to sum up the values. The following JCL will give you desired results
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
2222 60.00
2222 250.00
3333 1,700.00
3333 500.00
7777 100.00
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
SECTIONS=(1,4,
TRAILER3=(1,4,X,
TOT=(6,8,UFF,EDIT=(I,IIT.TT))))
/*
|
Hope this helps...
Cheers |
|
Back to top |
|
|
comp_ashok
New User
Joined: 30 Nov 2007 Posts: 15 Location: India
|
|
|
|
Thanks Skolusu
yes, It worked fine. But, please tell me meaning of SECTION and TRAILER in the SYSIN card. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
comp_ashok,
You might want to go through "z/OS DFSORT: Getting Started" It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols.
Use [URL] BBCode for External Links |
|
Back to top |
|
|
|