Page 1 of 1

Comapring two Sequential files

PostPosted: Thu Nov 25, 2010 4:39 pm
by nm992
I want to compare two sequential files for a specific column say 700to 709.

Can someone explain me how do i go about it.

In column 700 to 709,one of file has spaces and other has data.I want to compare.

Re: Comapring two Sequential files

PostPosted: Fri Nov 26, 2010 12:47 am
by NicC
Superc, Comparex, SORT, bespoke program etc etc. What are you really wanting to do?

Re: Comapring two Sequential files

PostPosted: Fri Nov 26, 2010 9:48 am
by dick scherrer
Hello,

Suggest you posr some sample input data for both files and the output you want when this sample data is processed.

Post the rules for getting from the input to the output.

Re: Comapring two Sequential files

PostPosted: Fri Nov 26, 2010 11:23 am
by nm992
My FIle a had data say Crdit card number at columns 700 to 709.
Now I copied file A to FIle B and replaced columns 700 to 709 with spaces.

Now I want to cpmpare these two files and confirm that nothing else has been changed apart from this value in file 3.

Can you plx explain how it can be achieved theu SORT or comaprex

Re: Comapring two Sequential files

PostPosted: Fri Nov 26, 2010 5:08 pm
by NicC
Try SUPERC - ISPF option 3.12 - just put in the 2 dataset names and go.

Re: Comapring two Sequential files

PostPosted: Sat Nov 27, 2010 9:41 am
by dick scherrer
Hello,

If one file has spaces and the other has values they will all compare unequal with a basic superc. . .

What is needed is some custom code or utility code to compare specific data positions.

One possibility is the sort product - whichnsort product is used on the system?

Re: Comapring two Sequential files

PostPosted: Sat Nov 27, 2010 10:43 am
by NicC
My understanding is that the 2 files should be identical apart from cols 700-709. These cols can be excluded in the compare and the files should compare equal. If they do not then there was an error getting from file A to file B. Using SORT and JOINKEYS or whatever is overkill for such a simple comparsion.

Re: Comapring two Sequential files

PostPosted: Sun Nov 28, 2010 9:08 am
by dick scherrer
Hi Nic,

My understanding is that the 2 files should be identical apart from cols 700-709.
This i smy understanding also.

just put in the 2 dataset names and go.

Yes, if positions 700-709 are excluded, the compare would work, but this requires more than only dataset names.

I won't fall on my sword over which utility might be used, but if the files are very large, the sort product will perform better than superc. . .

Have good one :)

d

Re: Comapring two Sequential files

PostPosted: Sun Nov 28, 2010 8:15 pm
by nm992
Hi Thanks a lot all,

I think option of excluding columns is best..

Can someone guide me to write a SORT card in which I exclude column 700 to 709.

Thanks in advance.

Re: Comapring two Sequential files

PostPosted: Fri Dec 03, 2010 5:07 pm
by Anuj Dhawan
If I read your first post, nm992 and then the last post - nothing make sense. The fields you wanted to compare on, you want to exclude them now?