I have a need to identify/extract all '69' segments from all records of a VSAM file. All of the '69' segments will start with the same key and will have the same length. There can be from zero to very many '69' segments per record. PARSE is almost ideal, but it only finds the instances I specify, for example, for infile: 0069ABCdje69XYZmdne,
SORT FIELDS=COPY
OUTFIL PARSE=(%00=(STARTAFT=C'69',FIXLEN=3)),
BUILD=(%00)
provides one output record, 'ABC'. I suppose that I could specify up to 100 instances, but there may be more than that in a record.
Has anyone found a slick way of performing an operation like this?