|
View previous topic :: View next topic
|
| Author |
Message |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| Quote: |
| Could someone please suggest me on this .. |
Could you please post all the sysout? |
|
| Back to top |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
| 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 |
|
 |
Chinnadu
New User
.jpg)
Joined: 05 Mar 2009 Posts: 46 Location: Hyderabad
|
|
|
|
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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
| Quote: |
| Are those JOINKEYS starting incorrectly in cc1 or correctly in cc2? |
It is starting from 2nd column only ... |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| 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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| 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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
| 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".. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| 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 |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
| 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 |
|
 |
subinraj
New User
Joined: 04 Sep 2007 Posts: 16 Location: Bangalore
|
|
|
|
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 |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
How does this accomplish comparing 4500+ bytes when the limit is 4080? |
|
| Back to top |
|
 |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|