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

Can Syncsort Compare two different layouts


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

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Oct 23, 2008 4:40 am
Reply with quote

If this has been answered before, please forgive me!

I have two files that need to be compared. File 1 is 220 bytes; File 2 656 bytes. File 2 is built off File 1, but the dates are expanded from MMDDYY to CCYY-MM-DD format (yeah, I know - they didn't do Y2K correctly here) and some of the fields are in different order.

I am limited to File Aid, Beyond Compare and Syncsort. I tried to use FIle Aid XREF with no success, so now I am looking to Syncsort.

Sample File 1:
Code:
2 AUDIT-DATA                        90       
  5 AUDIT-DATE                      90 051708
  5 AUDIT-ACCLTR-SEGMENT            96       
    7 AUDIT-ACCLTR-LETTER-DATE               
                                    96 51908 
    7 AUDIT-ACCLTR-LETTER-CODE               
                                   102 S     
    7 AUDIT-ACCLTR-REF-NO          103 16-119
    7 AUDIT-ACCLTR-LETTER-TYPE               
                                   110 DR     
    7 AUDIT-ACCLTR-REFER-ID        112       
    7 AUDIT-ACCLTR-USABLE-FILLER             


Corresponding record from File 2:
Code:
2 DL-AUDIT-DATA                    120           
  5 DL-AUDIT-COMMON-DT             120 2008-05-17
  5 DL-AUDIT-ACCLTR-SEGMENT        130           
    7 DL-AUDIT-ACCLTR-LETTER-DT                 
                                   130 2008-05-19
    7 FILLER                       140           
    7 DL-AUDIT-ACCLTR-LETTER-CD                 
                                   188 S         
    7 DL-AUDIT-ACCLTR-REF-NBR      189 16-119   
    7 FILLER                       196           
    7 DL-AUDIT-ACCLTR-MED-REF-ID                 
                                   257           
    7 FILLER                       263           
    7 DL-AUDIT-ACCLTR-LETTER-TYPE               
                                   271 DR       


The number of records in both files will always be the same, and they will always be in synced order.

Can Syncsort handle this?
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Oct 23, 2008 7:11 pm
Reply with quote

socker_dad,

You did not mention here on which fields you want to do the comparison icon_exclaim.gif icon_confused.gif

Otherwise, the below job may help you to convert your first file date fields to expanded ones. I just considered the data you have shown in screen prints icon_rolleyes.gif

Code:

//SORT0001 EXEC PGM=SORT                                               
//SORTIN   DD *                                                         
05170851908 S 16-119 DR                                                 
/*                                                                     
//SORTOUT  DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
 SORT FIELDS=COPY,CENTWIN=1980                                         
 OUTREC FIELDS=(5,2,Y2C,C'-',1,2,C'-',3,2,10,2,Y2C,C'-0',7,1,C'-',8,2, *
                12,12)                                                 
/*                                                                     


HTH. icon_wink.gif
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Oct 23, 2008 7:12 pm
Reply with quote

socker_dad,

The output looks as given below after conversion.....

Code:

2008-05-172008-05-19 S 16-119 DR


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

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Thu Oct 23, 2008 10:34 pm
Reply with quote

Sorry - my bad.

Each field needs to be compared to its corresponding source field, and we recognize that the date fields will show as differences.

It's just trying to get AUDIT-ACCLTR-REF-NO in positions 103-107 of File 1 to be compared to DL-AUDIT-ACCLTR-REF-NBR in 189-196 of File 2 (as an example - each field is required to be compared to its resulting converted field).

Sigh. I wish they would just purchase Comparex and get it over with.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Oct 24, 2008 10:01 am
Reply with quote

socker_dad,

You have to create an intermediate file from your file2 there by adjusting the fields of file2 to be in line with file1. This way the comparison becomes easier. You can try this method and use ICETOOL SELECT on the fields to be compared to get the final output.

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

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Fri Oct 24, 2008 11:54 am
Reply with quote

Quote:
Sigh. I wish they would just purchase Comparex and get it over with.

Why not EComp? icon_biggrin.gif
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Oct 24, 2008 12:31 pm
Reply with quote

socker_dad,

Here is an untested ICETOOL solution to deal with your requirement..

Code:

//SORT0001 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                             
//SSMSG    DD SYSOUT=*                                             
//SYSOUT   DD SYSOUT=*                                             
//IN1      DD DSN=YOUR.INPUT.FILE1,DISP=SHR                         
//IN2      DD DSN=YOUR.INPUT.FILE2,DISP=SHR                         
//OUT1     DD DSN=&&T1,DISP=(MOD,PASS,DELETE),SPACE=(TRK,(1,1),RLSE)
//OUT2     DD DSN=&&T2,DISP=(MOD,PASS,DELETE),SPACE=(TRK,(1,1),RLSE)
//CON      DD DSN=&&T1,DISP=(MOD,PASS,DELETE)                       
//         DD DSN=&&T2,DISP=(MOD,PASS,DELETE)                       
//OUT3     DD DSN=YOUR.OUTPUT.FILE,DISP=SHR                         
//TOOLIN   DD *                                                     
 COPY FROM(IN1) TO(OUT1) USING(RAM1)                               
 COPY FROM(IN2) TO(OUT2) USING(RAM2)                               
 SELECT FROM(CON) TO(OUT3) ON(90,10,CH) ON(100,10,CH) ON(112,1,CH) -
        ON(113,6,CH) ON(119,2,CH) NODUPS                           
/*                                                                 
//RAM1CNTL DD *                                                         
 SORT FIELDS=COPY,CENTWIN=1980                                         
 OUTREC FIELDS=(89X,94,2,Y2C,C'-',90,2,C'-',92,2,99,2,Y2C,C'-0',96,1,  *
                C'-',97,2,X,102,1,103,6,X,110,2,300:X)                 
/*                                                                     
//RAM2CNTL DD *                                                         
 SORT FIELDS=COPY                                                       
 OUTREC FIELDS=(90:120,10,100:130,10,111:188,1,112:189,6,119:271,2,300:*
                X)                                                     
/*                                                                     


Experts may like to better this job....

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

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Oct 24, 2008 2:59 pm
Reply with quote

Ramsri,

Quote:
Here is an untested ICETOOL solution to deal with your requirement..


Op wanted a solution with SYNCSORT. ICETOOL is shipped with DFSORT.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Oct 29, 2008 7:48 pm
Reply with quote

Quote:
Op wanted a solution with SYNCSORT. ICETOOL is shipped with DFSORT.

I know this has been addressed many times in this forum and in others...
SyncSort ships ICETOOL as an alias to SYNCTOOL, so specifying PGM=ICETOOL in a SyncSort environment is valid.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts How to compare two rows of same table DB2 11
Search our Forums:

Back to Top