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
 

 

Comparex utility to Syncsort conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Jul 22, 2016 1:53 pm    Post subject: Comparex utility to Syncsort conversion
Reply with quote

Hi,

Currently I have a job which is using comparex utility for file comparison.

Code:
//STEP01  EXEC PGM=COMPAREX
//SYSUT1   DD  *                                     
AAA                                                 
BBB                                                 
CCC                                                 
DDD                                                 
EEE                                                 
//SYSUT2   DD  *                                     
AAA                                                 
BBB                                                 
XXX                                                 
DDD                                                 
YYY                                                 
//SYSUT3   DD  SYSOUT=*,DCB=(RECFM=FB,LRECL=3,BLKSIZE=0)
//SYSPRINT DD  SYSOUT=*                             
//SYSIN    DD  *                                     
   COPYDIFF                                         
   KEY=(1,3)                                         
   FIELD=(1,3)                                       
   MASK=(4,END)                                     
//*                                                 


The output from this job is:
Code:
XXX
DDD
YYY


I'm not able to understand how the DDD record is coming into output. I want to convert it to Syncsort. The version of Syncsort taht we have supports JOIN statements. Could you please help me to understand the comparex functionality.

PS: I have raised a request for the Comparex Manual, meanwhile I thought I will post here.

PPS: By mistake, I posted it in JCL section. Could you please move it into Syncsort section.

Thanks.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Jul 22, 2016 3:13 pm    Post subject: Reply to: Comparex utility to Syncsort conversion
Reply with quote

It is doing read-ahead. The options used should be visible or listed
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Jul 22, 2016 3:42 pm    Post subject:
Reply with quote

This is what i'm getting in sysprint:
Code:

 MAXDIFF=999999999999                                                   
 PRINT=(MATCH,MISMATCH),MBRHDR=YES,HALT=COND,KILLRC=NO                 
 WILDCARD=C'.',MODE=APPLICATIONS (ALL DISPLACEMENTS RELATIVE TO ONE)   
 SYNCHRONIZATION KEY(S):                                               
 KEY=(1,3,C,A)                                                         
 DECIMAL,EBCDIC,CASE=MIXED,LINE=(32,HORIZONTAL),PAGE=58                 
 DASH=C'-',PLUS=C'+'                                                   
 IDENTITIES, DESENSITIZING, FIELDS, AND MASKS:                         
 FIELD=(1,3,C)                 1  FIELD=(1,3,C)                         
 MASK=(4,END)                                                           
 COPYDIFF                                                               
 DATA,FORMAT=02                                                         
 (FORMAT EXPLANATION: FULL SYSUT1 FOLLOWED BY DIFFERING LINES OF SYSUT2)

 KEY SYNCHRONIZATION MISMATCH - RECORD 3 ON FILE SYSUT1                 
 KEY SYNCHRONIZATION MISMATCH - RECORD 4 ON FILE SYSUT1                 
 KEY SYNCHRONIZATION MISMATCH - RECORD 5 ON FILE SYSUT1                 
 END OF DATA ON FILE SYSUT1                                             

 KEY SYNCHRONIZATION MISMATCH - RECORD 3 ON FILE SYSUT2                 
 KEY OUT OF SPECIFIED SEQUENCE - RECORD 4 ON FILE SYSUT2               
 KEY SYNCHRONIZATION MISMATCH - RECORD 4 ON FILE SYSUT2                 
 KEY SYNCHRONIZATION MISMATCH - RECORD 5 ON FILE SYSUT2

 END OF DATA ON FILE SYSUT2                                     
 RECORDS PROCESSED: SYSUT1(5)/SYSUT2(5)/SYSUT3(3),DIFFERENCES(0,3,3)           
                    EXPLANATION - 0 RECORDS DIFFER THAT SYNCHRONIZED TOGETHER 
                                  3 RECORDS WERE CONSIDERED INSERTED ON SYSUT1
                                  3 RECORDS WERE CONSIDERED INSERTED ON SYSUT2
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Jul 22, 2016 5:44 pm    Post subject:
Reply with quote

Hi Bill,

I'm using the following control card in Syncsort and it is working as expected (equivalent to Comparex).

Code:

  OPTION   COPY                                     
  JOINKEYS FILES=F1,FIELDS=(1,3,A),SORTED,NOSEQCK   
  JOINKEYS FILES=F2,FIELDS=(1,3,A),SORTED,NOSEQCK   
  JOIN UNPAIRED,F2,ONLY                             


Thanks!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jul 22, 2016 6:29 pm    Post subject:
Reply with quote

Quote:
I'm not able to understand how the DDD record is coming into output
Your output explains why:
Code:
 KEY OUT OF SPECIFIED SEQUENCE - RECORD 4 ON FILE SYSUT2
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Jul 22, 2016 8:00 pm    Post subject:
Reply with quote

Thanks Robert. I'm new to Comparex. Its extensively used at our shop, but I feel more comfortable with DFSORT/Syncsort, so I was searching for a sort based solution.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jul 22, 2016 8:07 pm    Post subject: Reply to: Comparex utility to Syncsort conversion
Reply with quote

Quote:
but I feel more comfortable with DFSORT/Syncsort, so I was searching for a sort based solution.


most organisations will not care about Your comfort

and will just TELL You to do things according to their common standards and practices
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jul 22, 2016 8:45 pm    Post subject: Re: Reply to: Comparex utility to Syncsort conversion
Reply with quote

enrico-sorichetti wrote:
Quote:
but I feel more comfortable with DFSORT/Syncsort, so I was searching for a sort based solution.


most organisations will not care about Your comfort

and will just TELL You to do things according to their common standards and practices

At least this is a refreshing change from "I have to write this program in RPG II because that is the REQUIREMENT1!!1' icon_biggrin.gif
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Jul 22, 2016 8:47 pm    Post subject:
Reply with quote

Quote:
most organisations will not care about Your comfort


Yes I understand that. But at our shop, we have COMPAREX as well as SYNCSORT and they are ok with either of it.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Sat Jul 23, 2016 1:07 am    Post subject: Reply to: Comparex utility to Syncsort conversion
Reply with quote

Comparex is a comparison product. SyncSORT is a sorting product, which can do basic compares.

Be very aware that if you use unsorted data for a JOINKEYS you may get unexpected results.
Back to top
View user's profile Send private message
sergeyken

New User


Joined: 29 Apr 2008
Posts: 37
Location: Maryland

PostPosted: Wed Aug 10, 2016 10:47 pm    Post subject: Re: Reply to: Comparex utility to Syncsort conversion
Reply with quote

Bill Woodger wrote:
Be very aware that if you use unsorted data for a JOINKEYS you may get unexpected results.

When using surely unsorted input file just do not use SORTED option in your JOINKEYS statement.

If you expect the input file must be sorted, then use SORTED option to improve performance, but don't use NOSEQCK. In case the input key order is wrong you'll get an error message. NOSEQCK bypasses verification of input key sequence, and it MAY give unpredictable results without notification.

The performance improvement provided by NOSEQCK is miserable; there is no need to use it, ever.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 11, 2016 1:49 am    Post subject: Reply to: Comparex utility to Syncsort conversion
Reply with quote

Obviously if the data is known to be in sequence it is entirely appropriate to use NOSEQCK. For instance, if you build the keys for JOINKEYS in the JNFnCNTL files in a known sequence, then sequence-checking is pointless. If the data has been through a SORT, the sequence checking is pointless. If the sequence has been checked already and the file has not been updated, the sequence checking is pointless.

Obviously if you have bad systems when data which should be in sequence is not, then sequence-checking is a good way to establish that, but do it at the time the file is being updated (the time the out-of-sequenceness is being established) not just for the heck of it when you happen to be using JOINKEYS.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am


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