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
 

 

Compare two VB Files to get unmatched where Fields > 4080

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

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 5:37 pm    Post subject: Compare two VB Files to get unmatched where Fields > 4080
Reply with quote

Hi! This is my First post in this Forum. Here is my requirement:

2 Input Files with each of length - VB/Lrecl : 4504
2 Output Files needed each of length - VB/Lrecl = 4504

1st output file contains: Records present in File1 and missed in File2
2nd output file contains: Records present in File2 and missed in File1

Could someone pls suggest the solution using Sort Utility...

Here one more condition is there is no key field to compare . My requirement is to check byte by byte of the records. All the data in Record1 of File1 should be matching with corresponding record1 of File2.

For Example:

Input File1:

02323ABCDEFG
02323ABCDEFG
0454545BCDEFG
023243334EFG
02323ABCDEFG

Input File2:
02323ABCDEFG
02323ABCDEFG
0454545BCDEFG
03453535334EFG
02323ABCDEFG
00000000123131

Output File1:
023243334EFG

Output File2:
03453535334EFG
00000000123131
Back to top
View user's profile Send private message

Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 7:04 pm    Post subject:
Reply with quote

Hello again... Actually i have tried using the below code for Input File FB/lrecl = 80 and it worked well...

SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(1,80,A)
JOINKEYS FILE=F2,FIELDS=(1,80,A)
REFORMAT FIELDS=(F1:1,80,F2:1,80),FILL=X'FF'
JOIN UNPAIRED
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(81,1,BI,EQ,X'FF'),OUTREC=(1,80)
OUTFIL FILES=02,INCLUDE=(1,1,BI,EQ,X'FF'),OUTREC=(81,80)
/*

But when Am trying the similar code for Input files VB/Lrecl = 4504, Am getting the numeric filed error at: JOINKEYS FILE=F1,FIELDS=(1,4504,A)

Could someone please suggest me on this ..

Thank You.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 22, 2009 7:06 pm    Post subject:
Reply with quote

Quote:
Could someone please suggest me on this ..
Could you please post all the sysout?
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 7:15 pm    Post subject:
Reply with quote

Sorry , i do not have access to copy/paste the sysout from my mainframe screen to this forum ... anyways i will provide the sysout
it goes like this:

SYSIN:
Code:
JOINKEYS FILE=F1,FIELDS=(1,4504,A)
*
JOINKEYS FILE=F2,FIELDS=(1,4504,A)
*
REFORMAT FIELDS=(F1:1,4504,F2:1,4504),FILL=X'FF'
JOIN UNPAIRED
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(4505,1,BI,EQ,X'FF'),OUTREC=(1,4504)
OUTFIL FILES=02,INCLUDE=(1,1,BI,EQ,X'FF'),OUTREC=(4505,4504)

WER271A JOINKEYS STATEMENT : NUMERIC FIELD ERROR
WER271A JOINKEYS STATEMENT : NUMERIC FIELD ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Apr 22, 2009 7:26 pm    Post subject:
Reply with quote

CICS Guy wrote:
Quote:
Could someone please suggest me on this ..
Could you please post all the sysout?
All the sysout?

Are those JOINKEYS starting incorrectly in cc1 or correctly in cc2?
Back to top
View user's profile Send private message
Chinnadu

New User


Joined: 05 Mar 2009
Posts: 42
Location: Hyderabad

PostPosted: Wed Apr 22, 2009 7:30 pm    Post subject:
Reply with quote

Hima,

Try with ICETOOL. Change the compare field position before you submit it.

Code:
//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//FILEA DD DSN=FILEA,DISP=SHR (FB/80)
//FILEB DD DSN=FILEB,DISP=SHR (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//FILEC DD DSN=FILEC,DISP=(NEW,CATLG,DELETE)   (FB/80)
//FILED DD DSN=FILED,DISP=(NEW,CATLG,DELETE)   (FB/80)
//TOOLIN DD *
COPY FROM(FILEA) TO(T1) USING(CTL1)
COPY FROM(FILEB) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(FILEC) ON(1,9,ZD) KEEPNODUPS -
  WITH(81,1) USING(CTL3)
SPLICE FROM(T1) TO(FILED) ON(1,9,ZD) KEEPNODUPS -
  WITH(81,1) USING(CTL4)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(81:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=FILEC,INCLUDE=(81,2,CH,EQ,C'BB'),
    BUILD=(1,80)
//CTL4CNTL DD *
  OUTFIL FNAMES=FILEC,INCLUDE=(81,2,CH,EQ,C'VV'),
    BUILD=(1,80)
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 7:36 pm    Post subject:
Reply with quote

Hi Chinnadu ,

Thanks for this solution, but here we wont be using ICETOOL . So Im jus looking for a solution using SORT utility only...

Thank You.
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 7:46 pm    Post subject:
Reply with quote

Quote:
Are those JOINKEYS starting incorrectly in cc1 or correctly in cc2?


It is starting from 2nd column only ...
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 22, 2009 7:51 pm    Post subject:
Reply with quote

Hima1985 wrote:
Quote:
Are those JOINKEYS starting incorrectly in cc1 or correctly in cc2?


It is starting from 2nd column only ...
Well it didn't look like it......
William Thompson wrote:
CICS Guy wrote:
Quote:
Could someone please suggest me on this ..
Could you please post all the sysout?
All the sysout?
All the sysout?
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 8:01 pm    Post subject:
Reply with quote

Well, Complete SYSOUT:

Code:

SYSIN:
    JOINKEYS FILE=F1,FIELDS=(1,4504,A)
                               *
    JOINKEYS FILE=F2,FIELDS=(1,4504,A)
                               *
     REFORMAT FIELDS=(F1:1,4504,F2:1,4504),FILL=X'FF'
     JOIN UNPAIRED
     SORT FIELDS=COPY
     OUTFIL FILES=01,INCLUDE=(4505,1,BI,EQ,X'FF'),OUTREC=(1,4504)
     OUTFIL FILES=02,INCLUDE=(1,1,BI,EQ,X'FF'),OUTREC=(4505,4504)
   END

WER271A JOINKEYS STATEMENT : NUMERIC FIELD ERROR
WER271A JOINKEYS STATEMENT : NUMERIC FIELD ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


This is all the SYSOUT displayed apart from License information of SYNCSORT
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 22, 2009 8:04 pm    Post subject:
Reply with quote

Hima1985 wrote:
This is all the SYSOUT displayed apart from License information of SYNCSORT
Ha Ha.....
That is exactly what I was looking for, please post it.
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 8:13 pm    Post subject:
Reply with quote

icon_smile.gif

Code:
1 SYNCSORT FOR Z/OS  1.3.2.0R  U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSORT INC.  DATE 2009/112  TIME=09.40.32

      Z/OS  1.9.0

SYNCSORT LICENSED FOR CPU SERIAL NUMBER XXXXX, MODEL XXXX   LICENSE /PRODUCT EXPIRATION DATE: 02 OCT 2010


"encrypted"..icon_smile.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 22, 2009 8:15 pm    Post subject:
Reply with quote

SyncSort for z/OS 1.3 Programmer’s Guide wrote:
WER271A statement STATEMENT: NUMERIC FIELD ERROR
EXPLANATION: A numeric field has been improperly specified on the indicated SyncSort control statement.

And wrote:
Each JOINKEYS field may be anywhere within the record through column 32750, the maximum length of a field is 4080 bytes, and the sum of all fields on a JOINKEYS statement cannot exceed 4080 bytes.
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Wed Apr 22, 2009 8:25 pm    Post subject:
Reply with quote

Then how could I compare the whole record (byte by byte) in two files in this case as my file length itself is exceeding 4080 length ... Do i have to choose some key to compare or any other solution ?? Please suggest ...
Back to top
View user's profile Send private message
subinraj

New User


Joined: 04 Sep 2007
Posts: 16
Location: Bangalore

PostPosted: Wed Apr 22, 2009 9:32 pm    Post subject:
Reply with quote

Since you are using VB input file the first 4 bytes should be used for the RDW (Record Descriptor word). So the compare fields should start from 5th byte. Try using following sort card. Here i have used input files with VB/LRECL=80

Code:
JOINKEYS FILE=F1,FIELDS=(5,76,A)                         
JOINKEYS FILE=F2,FIELDS=(5,76,A)                         
REFORMAT FIELDS=(F1:1,80,F2:1,80),FILL=X'FF'             
JOIN UNPAIRED,ONLY                                       
SORT FIELDS=COPY                                         
OUTFIL FILES=01,INCLUDE=(85,1,BI,EQ,X'FF'),OUTREC=(5,76)
OUTFIL FILES=02,INCLUDE=(5,1,BI,EQ,X'FF'),OUTREC=(85,76)
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: Wed Apr 22, 2009 10:01 pm    Post subject:
Reply with quote

Hello,

How does this accomplish comparing 4500+ bytes when the limit is 4080?
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Thu Apr 23, 2009 8:33 am    Post subject: Reply to: Compare two VB Files to get unmatched where Fields
Reply with quote

Hi Subinraj,

Quote:
Here i have used input files with VB/LRECL=80


But my input file length itself is exceeding 4080 length.. though this code may work for VB/LRECL=80 , it would not be working for VB/LRECL=4504 ..
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


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