The firts two bytes shows the record type
00 - Header
01 - Detail record
99 - Trailer
The number in the trailer in bold denotes the record count for that batch including header and trailer.
AAA,BBB,CCC denotes, which batch file they are comming from.
My requirement is to omit YYYYYYYYY kind of data from records in CCCCCCCCCC batch and update the trailer count for that batch. I want to retain all the other records in other batches intack in the output file.
Please note that the record count changed for the CCC batch in the trailer count.
Is this achivable in one step using DFSORT?
The record length is 180 bytes
Code:
field position length
----- --------- -------
rec type-------------------1---------------2
batch name-----------------3---------------10
Trailer count--------------50--------------9
field to be omited---------123-------------16
I tried searching the forum and found some of the links where record count in trailer is adjusted. but none of them explained how it works when multiple batch types (AAA,BBB,CCC) are in the file and the correction is needed to only one batch type.
The solution worked perfectly (as always ). Thanks a lot for that. I was just wondering whether it can be done in one step. Anyways, thanks for this wonderful solution.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Mar 13, 2007 10:38 am Post subject:
bade_miya,
Please define exactly what does 1 step mean? Is it 1 pass of data to get the desired results or multiple passes of data in a single step to get the desired results.
If multiple passes of data is ok then you can use the following JCL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum