With the slice facility I know we can do some kind of matching, but for all examples I saw, is necessary to add some extra characters at the end of the record in order to identify if the record come from the file-A or file-B or if the record are in both files. I am trying to ?match? one file (a large one) with another that only contains the keys a want to select from the first one. The first file is variable length (the record can be as long as 4096). The second one is very short and contains only a portion of the key, which means I am trying to select with a ?generic key? from the first file.
Do yow know if I can do this with the Slice facility?
I can't tell from your description what exactly you want.
What is the RECFM and LRECL of each input file? What RECFM and LRECL do you want for the output file?
Please show an example of the records in each input file and the output records you expect. If input file A can have duplicates, show that in your example. If input file B can have duplicates, show that in your example.
What is the position, length and format of each key?