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
 

 

Need a replacement to Comparex

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Chirag Dhull

New User


Joined: 29 Aug 2008
Posts: 8
Location: Bangalore

PostPosted: Mon Sep 08, 2008 4:36 pm    Post subject: Need a replacement to Comparex
Reply with quote

Hi ,

I have a File A with LRECL of 5300, First my program Takes that File and sorts it on (487,17,CH,A) and removes all Duplicate Record Entries , Lets Call this O/P File : File AwithoutDups.

Now it Picks the File A again and Just sorts it with (487,17,CH,A) and does not remove duplicate record entries . Lets Call the O/p File :
File AwithDups

Now it Does a comparex of files AwithoutDups and AwithDups to catch all the Duplicate records in the O/p file (Lrecl 5300) . Sysin for Comparex is "COPYDIFF
KEY=(487,17,,A)
FORMAT=13
PRINT=(MATCH,MISMATCH)"


To make it more Clear .

E.g - File A has Records

xyz 345678
abc 234567
def 123456
xyz 345678
abc 234567
xyz 345678

so after sortin on (5,6) and removin dups it is :
File Awithoutdups :-

def 123456
abc 234567
xyz 345678

and File AwithDups is :-

def 123456
abc 234567
abc 234567
xyz 345678
xyz 345678
xyz 345678

Now doin a Comparex on (5,6) on these two gives me the duplicate entries

abc 234567
xyz 345678
xyz 345678


Please tell me how to acheive this widout comparex
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Sep 08, 2008 8:55 pm    Post subject:
Reply with quote

Chirag Dhull,

I answered a similar question of yours here

http://www.ibmmainframes.com/viewtopic.php?t=33947
Back to top
View user's profile Send private message
Chirag Dhull

New User


Joined: 29 Aug 2008
Posts: 8
Location: Bangalore

PostPosted: Tue Sep 09, 2008 3:59 pm    Post subject:
Reply with quote

Hi

Actually i tried implementing that but it throws maxcc=16 with

MODE IN EFFECT: STOP

SORT FROM(SYSUT1) USING(CTL1)
DFSORT CALL 0001 FOR SORT FROM SYSUT1 TO OUTFIL USING CTL1CNTL
OPERATION RETURN CODE: 16

MODE IN EFFECT: SCAN

SORT FROM(SYSUT2) USING(CTL1)
NO ERRORS FOUND IN STATEMENT

SELECT FROM(TEMP) TO(SYSUT3) ON(1,5308,CH) NODUPS USING(CTL2)

INVALID LENGTH, FORMAT, OR COMBINATION FOR SELECT OPERATION


DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE: 16


Could you please let me know for the key (487,17) and lrecl 5300 .
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: Tue Sep 09, 2008 7:37 pm    Post subject:
Reply with quote

Hello,

You need to post the jcl/control statements you used that failed.

When you post error info, you should also include the message numbers (ICExxx).

All of this is best posted using the "Code" tag for readability. Use Preview to see your post the way the forum will se it rather than how it appears n the Reply editor.

Why do you specify 5308 for a record with lrecl of 5300?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 09, 2008 9:36 pm    Post subject:
Reply with quote

Chirag Dhull,

You comparex job is comparing only 17 bytes which start at pos 487. why are you are comparing the entire 5308 bytes in DFSORT? The maximum length you can use for ON fields for character data is 1500.

I re-read your initial post once again and I see that you ONLY have 1 file and all you want is to find duplicates. But your description is completely off.

First you eliminate duplicated records based on the key at pos 487 for a length of 17 bytes and now you want to compare those records against field at pos 5 for 6 bytes? It does not even make sense.

Based on my assumption here is a DFSORT JCL which will give you the desired results


Code:

//STEP0100 EXEC PGM=ICEMAN                       
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD DSN=YOUR INPUT FILE,DISP=SHR
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *     
  OPTION EQUALS                             
  SORT FIELDS=(487,17,CH,A)                         
  OUTREC OVERLAY=(5301:SEQNUM,8,ZD,RESTART=(487,17))
  OUTFIL INCLUDE=(5301,8,ZD,GT,1),BUILD=(1,5300) 
/*


Hope this helps....

Cheers
Back to top
View user's profile Send private message
Chirag Dhull

New User


Joined: 29 Aug 2008
Posts: 8
Location: Bangalore

PostPosted: Wed Sep 10, 2008 11:12 am    Post subject:
Reply with quote

This works !!! thanks mate icon_biggrin.gif
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts Replacement FTP to SFTP Vasili Koipish All Other Mainframe Topics 1 Wed May 11, 2016 3:10 pm
No new posts Need Comparex Study Material daga.aditya JCL & VSAM 3 Mon Dec 02, 2013 11:59 pm
No new posts DFHEMTA replacement Praveenkumar Natarajan CICS 8 Thu Feb 28, 2013 3:08 pm
No new posts SERENA TOOL COMPAREX Kamlesh Kamal All Other Mainframe Topics 6 Tue Oct 16, 2012 9:22 pm


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