I want to find identical records out of 2 files, and save result.
Each of these 2 files has a common key with different format :
Inputfile1 (I1) key is a 6 positions numeric (eq Pic 9(6))
Inputfile2 (I2) key is a 4 positions hexadecimal
how can i compare those 2 keys, match records and save result ?
Please show an example of the input records in each file, and what you expect the output records to look like. Can input file1 have duplicates? Can input file2 have duplicates? What is the RECFM and LRECL of each file?
I can't match up the keys you describe with the input data you show. What do you mean by NUM (ZD? Something else)? What do you mean by HEX (BI? Something else?).
This will probably go faster for both of us if you show me what the actual data in the first few records of each file looks like, so run this job and post the OUT1 and OUT2 output, or send it to me offline (email@example.com):
Also, you say the second key in file1 has a different length and format than the second key in file2 (6,NUM vs 4,HEX), so it's unclear how you would want to compare them. Please explain (preferably with examples).