
If I understand your question, you need a partial field to represent the scanned in data and that data would be sufficient to uniquely identify the record desired.
I believe one of the following should workd. If you can modify the scanning pgm, then you could build a logical like this:
R RECFMT PFILE(PFNAME)
PFLD19 I SST(KEY 2 19)
KEY
NXTFLD
ETC
K PFLD19
(define whatever fields or all fields - depending on how you want to change the code)
Since the original KEY will still be in the record, you don’t have to concatenate anything - and the new key represents the scanned in data.
If you have to have the record length/layout exactly the same for some reason, then another possible approach is to create a logical that substrings the key field into two fields, doing the concatenation in the pgm itself.
PFLD1 I SST(KEY 1 1)
PFLD2 I SST(KEY 2 19)
NXTFLD
ETC
K PFLD2










