Comapring two Sequential files



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Comapring two Sequential files

Postby nm992 » Thu Nov 25, 2010 4:39 pm

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.
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comapring two Sequential files

Postby NicC » Fri Nov 26, 2010 12:47 am

Superc, Comparex, SORT, bespoke program etc etc. What are you really wanting to do?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Comapring two Sequential files

Postby dick scherrer » Fri Nov 26, 2010 9:48 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Comapring two Sequential files

Postby nm992 » Fri Nov 26, 2010 11:23 am

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
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comapring two Sequential files

Postby NicC » Fri Nov 26, 2010 5:08 pm

Try SUPERC - ISPF option 3.12 - just put in the 2 dataset names and go.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Comapring two Sequential files

Postby dick scherrer » Sat Nov 27, 2010 9:41 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Comapring two Sequential files

Postby NicC » Sat Nov 27, 2010 10:43 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Comapring two Sequential files

Postby dick scherrer » Sun Nov 28, 2010 9:08 am

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
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Comapring two Sequential files

Postby nm992 » Sun Nov 28, 2010 8:15 pm

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.
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Comapring two Sequential files

Postby Anuj Dhawan » Fri Dec 03, 2010 5:07 pm

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?
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post