Page 1 of 1

PARSE All Matching Fields in a Record

PostPosted: Mon Jan 25, 2010 11:56 pm
by Chris Eberhart
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?

Re: PARSE All Matching Fields in a Record

PostPosted: Tue Jan 26, 2010 1:38 am
by dick scherrer
Hello,

Suggest you post a more representative sample of the input data and what you want as output when that input is processed.

Also mention the recfm and lrecl of the files.