Page 1 of 1

DFSORT JOINKEY Compare 2FB files with different key length

PostPosted: Mon Jun 01, 2015 2:56 am
by sucho
Hello,

I have two input files

File 1 is FB, LRECL 1000, Key can be of any length(max 150 chars)

File 2 is a reject file. It contains only the key of rejected records. Key length is 150 chars. It can contain duplicates.

My requirement is to compare F1 and F2 and write to F3 only the unpaired records from F1(that is, write only successful records that are not present in reject file).

I read up on JOINKEYS - ftp://ftp.software.ibm.com/storage/dfso ... rtugpg.pdf

But the doc mentions that the Keys must be of same length for JOINKEYS to work.

Can I use INREC for formatting the file F1 so that I pad the key with zeroes to the left(so that it becomes 150 chars) and then use it for comparing with the key of F2.

Thanks,
Sucho

Re: DFSORT JOINKEY Compare 2FB files with different key leng

PostPosted: Mon Jun 01, 2015 3:02 am
by BillyBoyo
Can you show some sample data from each of your files, as it pertains to the key (doesn't need to be full-length, but needs to be representative)?