Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SuperCE in sort ?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Vijay Subramaniyan

New User


Joined: 06 Jul 2011
Posts: 15
Location: india

PostPosted: Wed Sep 05, 2012 11:46 am    Post subject: SuperCE in sort ?
Reply with quote

Hi,

I have two PS files in VB format . Each file is of length 27500. I want to
compare the two files record by record . I need to have the matched records in one dataset and the unmatched records in the other. I tried with superCE for this. It is taking more than 1 and half hours and still the job didnt get completed . Is there any way to accomplish this in sort ? I think the maximum number of bytes that we can specify in the control fields is 4082 odd.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Wed Sep 05, 2012 12:46 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

Can you paste from the screen/batch job all the options/control cards that you are using for the SuperCe, please?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 05, 2012 1:35 pm    Post subject:
Reply with quote

other than record count,
blocking factor of files
and bufno parm of dd statements.
Back to top
View user's profile Send private message
Vijay Subramaniyan

New User


Joined: 06 Jul 2011
Posts: 15
Location: india

PostPosted: Wed Sep 05, 2012 1:49 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

This is the code used .
The block size of the file is 27504

//SUPERC EXEC PGM=ISRSUPC,
// PARM=(CHNGL,LINECMP,
// '',
// '')
//NEWDD DD DSN=DATX00D.PB.DXP2.HRDCPY.SCL.NEW1,
// DISP=SHR
//OLDDD DD DSN=DATX00D.GB.DXP2.HRDCPY.SCL.OUT,
// DISP=SHR
//OUTDD DD DSN=DATX00D.COVER.PAGE.TR.WORK1,DISP=(NEW,CATLG,DELETE),
// DATACLAS=JUMBO,DCB=(DATX00D.GB.DXP2.HRDCPY.SCL.OUTFILE)
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Sep 05, 2012 2:04 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

superce is not for application file compare ...
it is for source code compare,

the joinkey process assumes sorted data,
superce does not make any assumptions,

joinkey is record oriented
superce is block oriented
( the update option will generate the update cards to get from source1 to source2)

the conclusion ... You are using the wrong tool

in this case faster to use the two file compare COBOL program that You can find here
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 05, 2012 6:45 pm    Post subject:
Reply with quote

Hello,


Quote:
in this case faster to use the two file compare COBOL program that You can find here
To add to what Enrico mentioned:

There is a "Sticky" at the top of the COBOL part of the forum that is a wporking sample of a 2-file match/merge process. Download and Modify for your needs.
Back to top
View user's profile Send private message
Vijay Subramaniyan

New User


Joined: 06 Jul 2011
Posts: 15
Location: india

PostPosted: Sat Sep 08, 2012 7:41 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

Thanks Dick.

But your code seems to work only if the files are in sequence.

The two input files that I have are of length 27500.

To make these files in sequence, I can not have a sort card like the below

SORT FIELDS=(5,27296,CH,A) . Is it not ?

What would you advise to achieve this( Making both the files in sequence) ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sat Sep 08, 2012 8:07 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

If your files are not in the same sequence as each other, then you'll have a problem using anything to compare them.

Is there anything which makes the records unique? You could sort on that, without having to sort on the whole thing. If you get "nrarly unique" you might have some amount fields you can include in the sort.
Back to top
View user's profile Send private message
Vijay Subramaniyan

New User


Joined: 06 Jul 2011
Posts: 15
Location: india

PostPosted: Sat Sep 08, 2012 8:15 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

Bill .

I dont see anything unique. Both the files are AFP files . No other option in achieving this ? Can we be able to achieve this in Cobol sort ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 08, 2012 8:33 pm    Post subject:
Reply with quote

why don't you explain how you are generating the two files,
and why they would have to be sorted for comparison?
you were not sorting them for the superc,
why now???

this has indeed been a thread meandering everywhere,
because no explanation or direction was given.

a software engineer started this silliness and the train has been derailed.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sat Sep 08, 2012 8:38 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

You are trying to compare reports?

Are the input data the same?

Are the reports supposed to be different, or the same?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 08, 2012 8:58 pm    Post subject:
Reply with quote

Quote:
length 27500

Quote:
Both the files are AFP files

Quote:
You are trying to compare reports?


pretty broad report icon_lol.gif

does your printer do photos?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sat Sep 08, 2012 10:11 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

Well, for the picky...

You are trying to compare "documents"?

Are the input data the same?

Are the "documents" supposed to be different, or the same?

Reason being, if they (whatever they are as represented by your records) are supposed to be the same, then you do a one-to-one match on a "record number".

If the inputs are "different but equivalent" and the document definitions are unchanged, compare the inputs.

If everything is changed and the outputs are supposed to be different, then go whistle.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 08, 2012 10:31 pm    Post subject:
Reply with quote

Quote:
Are the "documents" supposed to be different, or the same?


TS doesn't know, he is only following the requirement.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Sep 09, 2012 1:03 am    Post subject:
Reply with quote

Hello,

Yes, matching 2 files requires they be in sequence.

If all you want to know if there is a difference, change the sample code to just read a record from each file and compare them. If they are equal, read the next. If there is a not equal, show the difference and stop because there would be no way for this code to determine which file was "different". Show the record number to makt it easier to look at the files to see why the difference.

The program would run to end of job if they all match and terminate when an unequal is found.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Sun Sep 09, 2012 1:18 am    Post subject: Reply to: SuperCE in sort ?
Reply with quote

The attempt to match with SuperCE might(!) imply that the files do not match very well.

You really need to tell us what you are trying to match. We can assume "documents" as you mentioned AFP. Should they be the same? Identical, or logical, for instance if there is a "time" anywhere in the document pages? Does AFP put in control information of some sort, specific to the job?

I'm suspecting you're going to have to rethink it. However, try to answer everything and we'll get a clearer picture of what you have.

If they are "documents" there seems little point in sorting the records.

If not documents you might test sorting seven times on chunks of 4000, with EQUALS. However, you seem to have variable-length records which would throw additional spanners.

Do you have the same, exactly, number of records on each? If not....

If so, you could extract the first 4000 bytes, including the RDW, sort on the whole thing and compare that using JOINKEYS.

I think you'll end up rethinking, no matter what the requirement says...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Sep 09, 2012 12:02 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

Quote:
Both the files are AFP files .


as in Advanced Function Printing print files ?

in this case it is a pretty silly requirement and approach

the ratio data to control is pretty unfavorable

better to compare the originating data

and extracting random data fro AFP streams will just result in useless jung
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Sep 09, 2012 1:15 pm    Post subject: Reply to: SuperCE in sort ?
Reply with quote

and in general to simply check if two files match the most effective approach it to use

BYTE compare
FMSTOP ==> stop at first mismatch
Back to top
View user's profile Send private message
Vijay Subramaniyan

New User


Joined: 06 Jul 2011
Posts: 15
Location: india

PostPosted: Mon Sep 10, 2012 2:00 pm    Post subject:
Reply with quote

Bill,

I would respond to your question with the following case

An input file having 1000 records is processed/formatted through a COBOL program giving an output file that has the same number of records .

The same input file having 1000 records is now processed/formatted through another COBOL program giving an output file that has 1010 records ( i. e 10 records have been inserted somewhere, the formatting of the remaining 1000 records are the same as the first COBOL program)

Now I would want to compare both the output files and the resultant that I I expect is the 10 records which were inserted.

Pls say me if I am not clear
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Sep 10, 2012 2:22 pm    Post subject:
Reply with quote

let me see if i have it correctly:

file-A goes into pgm-1 creating file-B

file-A goes into pgm-2 creating file-B with additional records.

unless the goal is
to prove that pgm-2 creates the same stuff as pgm1 with the addition of new records
so that pgm-1 can be removed from the system,
why have both pgm-1 and pgm-2?

why not test both old-file-B and new-file-B
by inputing them to pgm-3 and insuring that the results are correct?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us