Hi,
I need some help two compare two datasets (Day 1 / Day 2).
The files are FB and 10300 bytes record length.
The records can be matched by key but I need to extract only those that are in Day 2 but not in Day 1 file and those that have changed in some part of the record.
I have found some ideas in this forum, but the only way that I have found to expand the comparision to the whole record is to declare th JOINKEYS to 10300.
It works with test files of 30 bytes but not with real files.
I receive a message like this "WER271A JOINKEYS STATEMENT: NUMERIC FIELD ERROR2".
If you can help with this or can suggest me a different tool that fit better with the request I will appreciate.
Thanks a lot for the help.
Compare two datasets. Compare the whole record
-
- Posts: 6
- Joined: Fri Jun 12, 2009 2:10 pm
- Skillset: Very Basic JCl
Basic File-Aid - Referer: Looking for help in Internet
-
- Global moderator
- Posts: 369
- Joined: Tue Feb 26, 2008 11:15 pm
- Skillset: Syncsort MFX for z/OS
- Referer: Dick Scherrer
- Location: USA
- Contact:
Re: Compare two datasets. Compare the whole record
Please post the JCL you submitted when you received that error. Thank you.
-
- Posts: 6
- Joined: Fri Jun 12, 2009 2:10 pm
- Skillset: Very Basic JCl
Basic File-Aid - Referer: Looking for help in Internet
Re: Compare two datasets. Compare the whole record
Hi,
First I run a JCL like this to test if the idea could work. Considering the first five numeric characters the real key.
This JCL produce in dataset PRUEBA.TRES the following output
These two records are Ok because the first one is not in Day 1 file and the second one exits in Day 1 but with different information.
Then I tried with a real JCL like this one.
And I got the error
Thanks a lot for your interest.
First I run a JCL like this to test if the idea could work. Considering the first five numeric characters the real key.
Code: Select all
000005 //STEP1 EXEC PGM=SORT
000006 //SORTJNF1 DD *
000007 12345AAAAABBBBBB
000008 67890CCCCCAAAAAA
000009 13579DDDDDEEEEEE
000010 //SORTJNF2 DD *
000011 12345CCCCCBBBBBB
000012 13579DDDDDEEEEEE
000013 08531DDDDDEEEEEE
000014 //SORTOF01 DD DSN=W#H00I.PRUEBA.TRES,
000015 // DISP=(NEW,CATLG),
000016 // UNIT=SYSDA,SPACE=(TRK,(100,100))
000017 //SYSOUT DD SYSOUT=*
000018 //SYSIN DD *
000019 JOINKEYS FILES=F1,FIELDS=(1,16,A)
000020 JOINKEYS FILES=F2,FIELDS=(1,16,A)
000021 REFORMAT FIELDS=(F2:1,16,F1:1,16),FILL=X'FF'
000022 JOIN UNPAIRED,F2
000023 SORT FIELDS=COPY
000024 OUTFIL FILES=01,INCLUDE=(1,1,BI,NE,X'FF',AND,17,1,BI,EQ,X'FF'),
000025 OUTREC=(1,16),FTOV,VLTRIM=X'FF'
This JCL produce in dataset PRUEBA.TRES the following output
Code: Select all
DSLIST W#H00I.PRUEBA.TRES
Command ===>
*****************************
08531DDDDDEEEEEE
12345CCCCCBBBBBB
*****************************
These two records are Ok because the first one is not in Day 1 file and the second one exits in Day 1 but with different information.
Then I tried with a real JCL like this one.
Code: Select all
//STEP1 EXEC PGM=SORT
//SORTJNF1 DD DISP=SHR,DSN=DAY.ONE
//SORTJNF2 DD DISP=SHR,DSN=DAY.TWO
//SORTOF01 DD DSN=W#H00I.PRUEBA.CUATRO,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(100,100))
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,10300,A)
JOINKEYS FILES=F2,FIELDS=(1,10300,A)
REFORMAT FIELDS=(F2:1,10300,F1:1,10300),FILL=X'FF'
JOIN UNPAIRED,F2
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(1,1,BI,NE,X'FF',AND,10301,1,CH,NE,X'FF'),
OUTREC=(1,10300),FTOV,VLTRIM=X'FF'
And I got the error
Code: Select all
JOINKEYS FILES=F1,FIELDS=(1,10300,A)
*
JOINKEYS FILES=F2,FIELDS=(1,10300,A)
*
REFORMAT FIELDS=(F2:1,10300,F1:1,10300),FILL=X'FF'
JOIN UNPAIRED,F2
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(1,1,BI,NE,X'FF',AND,10301,1,CH,NE,X'FF'),
OUTREC=(1,10300),FTOV,VLTRIM=X'FF'
WER271A JOINKEYS STATEMENT: NUMERIC FIELD ERROR
WER271A JOINKEYS STATEMENT: NUMERIC FIELD ERROR
Thanks a lot for your interest.
-
- Global moderator
- Posts: 369
- Joined: Tue Feb 26, 2008 11:15 pm
- Skillset: Syncsort MFX for z/OS
- Referer: Dick Scherrer
- Location: USA
- Contact:
Re: Compare two datasets. Compare the whole record
Try this SyncSort for z/OS job:
Code: Select all
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=DAY.ONE,...
//SORTJNF1 DD DSN=DAY.TWO,...
//SORTOUT DD DSN=NEW.CHANGED.RECORDS,...
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,5,A)
JOINKEYS FILES=F2,FIELDS=(1,5,A)
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,10300,F1:1,10300)
SORT FIELDS=COPY
OUTFIL INCLUDE=(1,256,CH,NE,10301,256,CH,OR,
257,256,CH,NE,10557,256,CH,OR,
513,256,CH,NE,10813,256,CH,OR,
769,256,CH,NE,11069,256,CH,OR,
1025,256,CH,NE,11325,256,CH,OR,
1281,256,CH,NE,11581,256,CH,OR,
1537,256,CH,NE,11837,256,CH,OR,
1793,256,CH,NE,12093,256,CH,OR,
2049,256,CH,NE,12349,256,CH,OR,
2305,256,CH,NE,12605,256,CH,OR,
2561,256,CH,NE,12861,256,CH,OR,
2817,256,CH,NE,13117,256,CH,OR,
3073,256,CH,NE,13373,256,CH,OR,
3329,256,CH,NE,13629,256,CH,OR,
3585,256,CH,NE,13885,256,CH,OR,
3841,256,CH,NE,14141,256,CH,OR,
4097,256,CH,NE,14397,256,CH,OR,
4353,256,CH,NE,14653,256,CH,OR,
4609,256,CH,NE,14909,256,CH,OR,
4865,256,CH,NE,15165,256,CH,OR,
5121,256,CH,NE,15421,256,CH,OR,
5377,256,CH,NE,15677,256,CH,OR,
5633,256,CH,NE,15933,256,CH,OR,
5889,256,CH,NE,16189,256,CH,OR,
6145,256,CH,NE,16445,256,CH,OR,
6401,256,CH,NE,16701,256,CH,OR,
6657,256,CH,NE,16957,256,CH,OR,
6913,256,CH,NE,17213,256,CH,OR,
7169,256,CH,NE,17469,256,CH,OR,
7425,256,CH,NE,17725,256,CH,OR,
7681,256,CH,NE,17981,256,CH,OR,
7937,256,CH,NE,18237,256,CH,OR,
8193,256,CH,NE,18493,256,CH,OR,
8449,256,CH,NE,18749,256,CH,OR,
8705,256,CH,NE,19005,256,CH,OR,
8961,256,CH,NE,19261,256,CH,OR,
9217,256,CH,NE,19517,256,CH,OR,
9473,256,CH,NE,19773,256,CH,OR,
9729,256,CH,NE,20029,256,CH,OR,
9985,256,CH,NE,20285,256,CH,OR,
10241,59,CH,NE,20541,59,CH),
BUILD=(1,10300)
/*
-
- Posts: 6
- Joined: Fri Jun 12, 2009 2:10 pm
- Skillset: Very Basic JCl
Basic File-Aid - Referer: Looking for help in Internet
Re: Compare two datasets. Compare the whole record
yes, it works perfectly.
It was a very good help.
Thanks a lot for your time Alissa.
It was a very good help.
Thanks a lot for your time Alissa.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
compare substring in the same record
by samb01 » Mon Jun 12, 2023 1:08 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 2873
-
by sergeyken
View the latest post
Tue Jun 13, 2023 11:04 pm
-
-
-
compare number lines of two dataset
by samb01 » Wed Nov 13, 2024 8:46 pm » in DFSORT/ICETOOL/ICEGENER - 6
- 2121
-
by sergeyken
View the latest post
Fri Nov 15, 2024 12:41 pm
-
-
- 3
- 1579
-
by sergeyken
View the latest post
Thu May 13, 2021 1:07 am
-
-
Copy partial record after a string in a record using SORT.
by Esmayeelhusen » Thu May 04, 2023 3:03 pm » in DFSORT/ICETOOL/ICEGENER - 16
- 4226
-
by Esmayeelhusen
View the latest post
Mon May 22, 2023 3:50 pm
-
-
- 23
- 8051
-
by Devrana
View the latest post
Wed Jul 27, 2022 5:30 pm