If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Could I ask it in more detail?
I want to read a variable length file and write another variable length file.
They have the same definition as the following:
Code:
Organization . . . : PS
Record format . . . : VB
Record length . . . : 27994
Block size . . . . : 27998
In the input file:
----------------------------------------------------------------------------
000001 HEADER
......
TRA00500GCB2006110220061102132230890000007EQ040BL1T
000002 TRA00500TRANOUT GCB 00000000095 00000000095A0510497130400710000
000003 TRA00500TRANOUT GCB 00000000096 00000000096A0510497130400710000
000004 TRA00500TRANOUT GCB 00000000097 00000000097A0510497130400710000
000076 TRA00500TRADETAX +00000000167 B +00000000167BA +0510497130400+
000077 TRA00500TRANOUT GCB 00000000168 00000000168A0510497130400727319
000078 TRA00500TRADETAX +00000000168 B +00000000168BA +0510497130400+
000079 TRA00500TRANOUT GCB 00000000169 00000000169A0510497130400727319
000080 TRA00500TRADETAX +00000000169 B +00000000169BA +0510497130400+
000081 TRA00500TRANOUT GCB 00000000170 00000000170A0510497130400727319
......
000097 TRAILER TRA005002006110213223089 000000095000000 95 is the record counter.
----------------------------------------------------------------------------
Header, trailer and records with TRANOUT should be copied directly, records with TRADETAX should be bypassed.
At last, calcute the record count again, write the count(<95) into trailer.
Thanks for your help.
Yes, I do not want records with TRADETAX appear in the output file.
Header and trailer records are to be counted with detail records.