View previous topic :: View next topic
|
Author |
Message |
murali.gummadi
New User
Joined: 17 May 2006 Posts: 5
|
|
|
|
Hi all,
I have got requirement that,
I am sorting the records and put them into another output file,But its okey
Now my requirement is, i want to display the count (i.e. Total number records in a output file) in the same file(output file).
Another thing i want to do changes in JCl only.
Please give me the solution as soon as possible its urgent
Thanks in advance
Murali |
|
Back to top |
|
|
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Please use sort sysin as below
INREC FIELDS=(C'00000000000001',
-------fields
SORT FIELDS=field1
SUM FIELDS=(2,13,ZD)
first use inrec and assign "C'00000000000001'" value then sort and write outrec
U have any questions please let me know
thanks |
|
Back to top |
|
|
murali.gummadi
New User
Joined: 17 May 2006 Posts: 5
|
|
|
|
Hi vicky10001,
Thanks for your kind response
Okey i will try this and i will get back to you if it wont work.
Please clear me that will it give us the count in out put file(number of records)
Thanks & Regards
Murali |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You don't need to use INREC, SUM and OUTREC. You can do it much more easily with a DFSORT job like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
SORT FIELDS=(...)
OUTFIL REMOVECC,
TRAILER1=(COUNT=(M11,LENGTH=8))
/*
|
This will give you an 8-byte count as the last record of your output file after the sorted records. |
|
Back to top |
|
|
murali.gummadi
New User
Joined: 17 May 2006 Posts: 5
|
|
|
|
Hi Frank Yaeger,
Thank you very much in helping me out in this regard.
Thaks a lot man Its working fine.
Regards
Murali |
|
Back to top |
|
|
|