View previous topic :: View next topic |
Author |
Message |
WallaceC Beginner
Joined: 17 Dec 2002 Posts: 22 Topics: 10
|
Posted: Fri Jan 25, 2008 11:49 am Post subject: Validate trailer count |
|
|
I have a file with header, detail, and trailer with count as of follow:
Code: | ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
1HDR 20080124
2DTL 111111
2DTL 222222
2DTL 333333
2DTL 444444
2DTL 555555
9TRL 200801240000000005 |
Trailer count should equal number of detail records, i.e. record with 2DTL. I would like know if trailer count does not match number of detail records on the file. Is there any way to validate it in one SORT step and how? Thanks. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
WallaceC Beginner
Joined: 17 Dec 2002 Posts: 22 Topics: 10
|
Posted: Fri Jan 25, 2008 12:42 pm Post subject: |
|
|
Thank you Kolusu. I tried the codes suggested and they worked. |
|
Back to top |
|
 |
|
|