As 1 block contains 4 records (10,20,30 & 40) and the requirement is to look for the string 'OK' in record 20 and if it is satisfied and get the corresponding 10,20,30 & 40 records
For the above example, output file will be -
Is it possible to do this thru DFSORT/ICETOOL?
Record length of the file - 80, position of the string - 4.
Record type (like 10,20,30,40) is in the first 2 bytes always. String 'OK' is present in the position 6 in record type 20 and it is fixed.
I have just provided the example and there can be many occurences of 'OK' in the record type 20 and whenever it satisfies the condition, we need to extract the complete block (10, 20,30,40) and input file will always have the records in the sequence 10 - 20-30-40 - 10-20-30-40.