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

Need a replacement to Comparex


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
Reply with quote

Chirag Dhull,

I answered a similar question of yours here

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
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

Moderator Emeritus


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

PostPosted: Tue Sep 09, 2008 7:37 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SFTP replacement for LOCSITE ASA in FTP All Other Mainframe Topics 7
No new posts Comparex utility to Syncsort conversion SYNCSORT 11
No new posts Replacement FTP to SFTP All Other Mainframe Topics 1
No new posts Need Comparex Study Material JCL & VSAM 3
No new posts DFHEMTA replacement CICS 8
Search our Forums:

Back to Top