IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Comparision using superC or File Aid record wise,


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Mon Sep 03, 2007 1:05 pm
Reply with quote

The requirement is to compare two files. The first record of the file (columns to compared 1-83,lRECL 91) has to be compared with all the records of second file (same columns to be compared, LRECL 91). If the record is in second file, but not in first file , then it should be written in to the output file.

Please let me know whether it can be done thru SuperC /File AID . The shop doesn't have comparex.

NB: I have tried SUPERC Line Compare option. It does not give the excepted results as it was Line Compare . Let me know if other option in SUPERC can be used to get the above requirement
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 1:17 pm
Reply with quote

Balaji,

Quote:
If the record is in second file, but not in first file , then it should be written in to the output file.


Quote:
I have tried SUPERC Line Compare option. It does not give the excepted results as it was Line Compare


Are you expecting that the record found in second file but not in first file should ONLY be written to OP file.
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Mon Sep 03, 2007 3:30 pm
Reply with quote

murmohk1,

The requirement with example

first file

8
6
4
2
second file
7
5
3
8


SuperC ( line compare option) compares first record(value 8) of first file with first record (value 7) of second file. Then second record (6) with second record(5). The last compare 2 with 8. 8 is written to final output file ( Using sort step to get only I's(Insert))

But requirement is first record(value 8) of first file should compare with all records so last record (value 8) and 8 should not be written to out put file .7,5,3 to be only written to outputfile as it is not found anywhere in first file.

Let me know whether it is possible thru SuperC
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Sep 03, 2007 3:51 pm
Reply with quote

Balaji,

Did you try all the SUPERC options? Following is the OP with your IP -


Code:
 ID       SOURCE LINES                 
     ----+----1----+----2----+----3----+
 D - 7                                 
 D - 5                                 
 D - 3                                 
                                       
 I - 6                                 
 I - 4                                 
 I - 2                                 
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Mon Sep 03, 2007 5:29 pm
Reply with quote

Murali,

The option used

PGM=ISRSUPC
PARM=('DELTAL','LINECMP',' ')

In sysin,
CMPCOLM 1:2,3:83

Need to compare 1:83 cols, just coded 1:2,3:83(test jcl)aware it same as 1:83
(no difference)

In file 1, 84th record has value 0679045678890765
In file 2, 28th record has value 0679045678890765

But the output has 679045678890765. But should not be.


Please let me know which option I'm going wrong

Thanks,
Balaji.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 03, 2007 7:21 pm
Reply with quote

Hi,

Please post your JCL, input & expected output files, enclose them in 'Code' format while posting. Hopefully, you'll get better suggestions.
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Tue Sep 04, 2007 12:19 pm
Reply with quote

The code

/SUPERC EXEC PGM=ISRSUPC,
// PARM=('DELTAL','LINECMP',
// '')

//NEWDD DD DSN=FILE2,
// DISP=SHR

//OLDDD DD DSN=FILE1,
// DISP=SHR
//SYSIN DD *
CMPCOLM 1:2,3:83
/*
//OUTDD DD DISP=(NEW,CATLG),
// DSN=OUTPUTFILE,
// RECFM=FB,LRECL=91,
//* MGMTCLAS=SHRTBKUP,
// SPACE=(CYL,(500,50),RLSE),
// UNIT=DISK
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Tue Sep 04, 2007 6:32 pm
Reply with quote

I'm getting the below error message

"ISRS078I FALSE MATCHES CORRECTED. RESULTS MAY NOT REFLECT ALL MATCHES. SEE "ADDITIONAL NOTES" IN SUPERC TUTORIAL."


Please let me know how to proceed further.

Regards,
Balaji.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Sep 04, 2007 7:38 pm
Reply with quote

Hello,

Is there some reason that the files are not both sorted in the same sequence?
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Wed Sep 05, 2007 2:22 pm
Reply with quote

Hello,

I'm comparing the previous version and current version of GDG. In test environment, I did copy the GDG versions to flat files.

I did SORT columns 1-83. After that I 'm not getting error message.

But the record with value 0679045678890765 is appearing both as Insert and delete

D - 0679045678890765

I - 0679045678890765

The D and I means its in both Input file(that is compared)

I have checked that value 0679045678890765 is present in both Input files . So it should not appear in the output file.

In file 1, 84th record has value 0679045678890765
In file 2, 28th record has value 0679045678890765

When I have only this record (0679045678890765)in the both input files
and delete all other records SuperC works fine i.e. 0 Insert 0 Delete

So this record 0679045678890765 along with other record does not yield the desired result

Please help.

Thanks,
Bala.
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Wed Sep 05, 2007 2:37 pm
Reply with quote

Hi,

Try below JCL, which compare using COMPAREX utility

Code:
//COMP EXEC COMPAREX,IN1='TEST.xxxx.inp1,                   
//             IN2='TEST.xxxx.inp2'                           
MAXDIFF=50,CONTINUE     /* REPORT 50 DIFFERENCES BUT COMPARE ALL       
FORMAT=23               /* FULL ALPHA SYSUT1, DIFF LINES ON SYSUT2     
PAGE=72                 /* 72 LINES PER PAGE                           
CASE=MIXED              /* PRINT LOWER CASE CHARACTERS                 
MLC=1                   /* IN SYNC AGAIN AFTER MATCHING 1 LINE         
DATA                    /* INTER-RECORD RELATIONSHIP                   
MBRHDR=COND             /* PERFORM A PAGE EJECT ONLY WHEN A DIFFERENCE


Regards,
Mani
Back to top
View user's profile Send private message
ashokm

New User


Joined: 28 Feb 2006
Posts: 11
Location: Chennai,India

PostPosted: Wed Sep 05, 2007 3:02 pm
Reply with quote

Hi ,
You can easily achieve this in ICETOOL

Ashok M
Back to top
View user's profile Send private message
itsbalaji

New User


Joined: 12 Jun 2007
Posts: 7
Location: India

PostPosted: Wed Sep 05, 2007 3:24 pm
Reply with quote

Hi Mani,

There is no CompareX here.

Thanks for your reply.

Regards,
Balaji.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top