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
 

 

Can Syncsort Compare two different layouts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 147
Location: Columbia, MO

PostPosted: Thu Oct 23, 2008 4:40 am    Post subject: Can Syncsort Compare two different layouts
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    Post subject: Reply to: Can Syncsort Compare two different layouts
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    Post subject: Converted Output.
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: 147
Location: Columbia, MO

PostPosted: Thu Oct 23, 2008 10:34 pm    Post subject:
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    Post subject: Reply to: Can Syncsort Compare two different layouts
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: 456
Location: Belgium

PostPosted: Fri Oct 24, 2008 11:54 am    Post subject:
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    Post subject: Reply to: Can Syncsort Compare two different layouts
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: 1288
Location: Chennai, India

PostPosted: Fri Oct 24, 2008 2:59 pm    Post subject: Reply to: Can Syncsort Compare two different layouts
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: 500
Location: USA

PostPosted: Wed Oct 29, 2008 7:48 pm    Post subject: Re: Reply to: Can Syncsort Compare two different layouts
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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