DFSORT JOINKEY Compare 2FB files with different key length



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

DFSORT JOINKEY Compare 2FB files with different key length

Postby sucho » Mon Jun 01, 2015 2:56 am

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
sucho
 
Posts: 1
Joined: Mon Jun 01, 2015 2:41 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby BillyBoyo » Mon Jun 01, 2015 3:02 am

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)?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post