Hi,
I have a data file and want to split into 4 different files, each with a trailer record that states the number of records in the file together with specific details extracted from parameter files.
Trailer information is getting from two parameter files, each parameter file has only one record.
Parameter File 1: .....0900..... (890 bytes. fixed length record) --- want to extract from offset 6-10 (4 bytes)
Parameter File 2: 20090731.... (100 bytes, fixed length record) --- want to extract from offset 1-8 (8 bytes)
Final trailor record looks like: .....0900......20090731....."counter value"...... --- where "counter value" contains number of data records after split and "......." are constant literals
Original Data file
Rec 1: .........4614......... (let's say offset is 5-9)
Rec 2: .........4611.........
Rec 3: .........4614.........
Rec 4: .........4612.........
Rec 5: .........4611.........
Final output file 1:
........4611.......... (copy from original data file)
........4611..........
.....0900......20090731......0000002...... ("0900" offset is 7-10, "20090731" offset is 21-28, "0000002" offset is 35-41)
Final output file 2:
........4612..........
.....0900......20090731......0000001......
Final output file 3: (no data record, just trailer, with counter value = 0)
.....0900......20090731......0000000......
Final output file 4:
........4614..........
........4614..........
.....0900......20090731......0000002......
Any idea how this can be done in DFSORT?
Thanks.