View previous topic :: View next topic
|
Author |
Message |
Himanshu-kaushik
New User
Joined: 15 Mar 2007 Posts: 8 Location: delhi
|
|
|
|
Hi,
I have a requirement. I have an input file which is having employee name and their salary. i need to sort them acceding order of there name and in the end i need to give the count of total employee as well as total salary given to them. I need to do it through JCL only.
Sample file
Code:
Amar 10000.00
vijay 10000.00
ajay 10000.00
kapoor 12000.00
Answer
ajay 10000.00
Amar 10000.00
kapoor 12000.00
vijay 10000.00
04 42000.00 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Himanshu,
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
amar 10000.00
vijay 10000.00
ajay 10000.00
kapoor 12000.00
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)
OUTFIL REMOVECC,
TRAILER1=(COUNT=(M11,LENGTH=2),X,
TOT=(16,8,UFF,EDIT=(TTTTT.TT)))
/*
|
|
|
Back to top |
|
|
Himanshu-kaushik
New User
Joined: 15 Mar 2007 Posts: 8 Location: delhi
|
|
|
|
Hi Frank,
I am getting error while running above JCL. It is Saying Report Field Error on UEF. IS UEF is Correct. Check the Error.
Code: |
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 16:50 ON THU OCT
SORT FIELDS=(1,15,CH,A)
OUTFIL REMOVECC,
TRAILER1=(COUNT=(M11,LENGTH=2),X,
TOT=(16,8,UEF,EDIT=(TTTTT.TT)))
$
ICE223A 0 REPORT FIELD ERROR
|
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Himanshu Kaushik,
TOT=(16,8,UFF,EDIT=(TTTTT.TT))) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Interesting that you diagnosed the error from the error message, but weren't able to go back to my original post to see that I had UFF and you had UEF and answer your own question. |
|
Back to top |
|
|
|