Drop records from DS-A, basis records in DS-B
Posted: Thu Jun 09, 2016 9:29 pm
Hello,
My apologies for another done to death query.
We have an FB-RECL 20k, dataset, the data is a mix of records which vary in their actual xml-tag and content length; tag and data positions can vary record to record; a single record can have a repetition of tags and the data content; and there can be duplicate records.
We have another dataset, this has records that have only- key1: 16 bytes, key2: 8 bytes; both of these keys may/may-not be present in the earlier dataset.
We need to skip all the records from the first dataset that have (key1 AND key2) present.
Have tried two approaches:
a. Ugly method: Dynamically created a SORT card with 'SS' operator coupled with an OMIT, keys seperated by an AND, and each key change combination seperated by an OR, but this failed, as the entire SORT card went for greater than 40k+ lines (23k key1, key2 combinations; each were seperated by AND; whole lot seperated by OR)
b. Dirty method: JOINKEYS- Parsed dataset-1 to get key1, key2 in extended record; JOINed it with dataset-2 (the one with keys), and waited for the entire horde to get over.
It'd be really-really kind if someone can please point out a simpler method, as I seem to have knocked my brains out.
Thank you.
My apologies for another done to death query.
We have an FB-RECL 20k, dataset, the data is a mix of records which vary in their actual xml-tag and content length; tag and data positions can vary record to record; a single record can have a repetition of tags and the data content; and there can be duplicate records.
We have another dataset, this has records that have only- key1: 16 bytes, key2: 8 bytes; both of these keys may/may-not be present in the earlier dataset.
We need to skip all the records from the first dataset that have (key1 AND key2) present.
Have tried two approaches:
a. Ugly method: Dynamically created a SORT card with 'SS' operator coupled with an OMIT, keys seperated by an AND, and each key change combination seperated by an OR, but this failed, as the entire SORT card went for greater than 40k+ lines (23k key1, key2 combinations; each were seperated by AND; whole lot seperated by OR)
b. Dirty method: JOINKEYS- Parsed dataset-1 to get key1, key2 in extended record; JOINed it with dataset-2 (the one with keys), and waited for the entire horde to get over.
It'd be really-really kind if someone can please point out a simpler method, as I seem to have knocked my brains out.
Thank you.