Compare two account numbers



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

Compare two account numbers

Postby Naveen@Uppi » Wed Aug 12, 2009 10:26 pm

Hi All,

Is it possible to compare account number in two files and if the account number in the two files are equal, move the account number and few fields of file1 to the output file.

File1 : Record format FB and record lenght 400 Account number start: 43 lenght 20 alpha numeric. the account number is only 10 digit with initial spaces ex SSSSSSSSSSSZ121236547, S is spaces and Z- zero

File 2: Record format FB and record lenght 28656 Account number start: 13 lenght 10 numeric, The account number is 9 digit for ex S123456789 where S is space

Please suggest if this is possible through the Sort utility.

Thanks and regards,
Naveen N
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare two account numbers

 

Re: Compare two account numbers

Postby Frank Yaeger » Wed Aug 12, 2009 10:48 pm

Yes, it is possible. Take a look at the methods described in the "Create files with matching and non-matching records" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss? ... g3T7000094

If you need more specific help, please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Compare two account numbers

Postby Naveen@Uppi » Fri Aug 14, 2009 10:57 am

Thanks Frank.

I was able to code JCl and JCl ran file.

Thanks and Regards,
Naveen N
Naveen@Uppi
 
Posts: 36
Joined: Wed Jul 23, 2008 6:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare two account numbers

Postby MARTIN » Fri Sep 11, 2009 3:18 pm

Hi Naveen,

Could you please post your code.
I too have a similar requirement.

I need to compare two files to create an output file with mismatching fields.

Assume Emp No is the key field.

Output file should contain the key field and mismatching fields.



File1

Emp No Name IBU Proj Code

45832 Yogananda IHLD CISEDS

65123 Rajesh BCMD BOFA

116216 Rohan EUSD BCHN



File2

Emp No Name IBU Proj Code

45832 Yogananda IHLD CISEDS

65123 Rajesh BCMD BOFA

116216 Rohan EUSD SDFV




Output

116216 BCHN SDFV.


This is just a sample.
I will be given with 2 input files and their copybook layout.
The files can be FB or VB.
If it is FB i need to convert it to vb.
For LRECL max. record length should be assumed.
Assume key position is at starting.
It has to just pick up the non-matching fields and display it.
I wouldnt be knowing the positions of the non-matching fields.
Could you please help me on the same.

Thanks,
Marina.
MARTIN
 
Posts: 1
Joined: Fri Sep 11, 2009 3:02 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare two account numbers

Postby dick scherrer » Sat Sep 12, 2009 12:26 am

Hello,

Do not post the same topic in multiple forums. . .

Thank you.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post