View previous topic :: View next topic
|
Author |
Message |
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Hi all..
I read and tried almost all the syncsort tips here to filter out matching and non-matching recordsm but still facing some issues. Can u please help.
This is what i am trying to do.
Compare the list of unique records(input-fil1) with the corresponding field on “input file 2” and write the matching records to one output file and non- matching records to a second output file.
I am using SYNCSORT FOR Z/OS 1.2.3.1R |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
What all you tried??
Did you look at JOINKEYS |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Yes.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Please post the code that you have tried with the results and we might be able to help you.
What are the issues that you are facing. You know, but we do not.
Unfortunately psychic day was Wednesday this week, so you are going to have to give us a whole load more information than you have so far.
DSORG, RECFM and LRECL of both files.
Position, length and format of the keys that you are comparing - from both files.
Are there duplicate key values in either of the files. If yes, what needs to be done to handle this situation. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Also, are ALL the on-matching records to go to the SAME output file? |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Code: |
//SORTJFN1 DD DSN=TEST.SORT.INPUT2,DISP=SHR
//SORTJFN2 DD DSN=TEST.SORT.INPUT3,DISP=SHR
//SORTOF01 DD DSN=TEST.SORT.OUTPUNT,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(TRK,(350,200),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,5,A)
JOINKEYS FILES=F2,FIELDS=(1,5,A)
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,6)
SORT FIELDS=COPY
/* |
here i am trying to write the unmatched records.
However I want to comapre INPUT2 with INPUT3 and write matching data in one file and non-matching in other file.
input files are LRECL 80 record lenthg 5.
--
spool shows :
A SORTJNF1 OR SORTJNF2 DD STATEMENT IS MISSING; BOTH ARE REQUIRED |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Code: |
//SORTJFN1 DD DSN=TEST.SORT.INPUT2,DISP=SHR
//SORTJFN2 DD DSN=TEST.SORT.INPUT3,DISP=SHR |
Typo in DD Name? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You have three possible situations: F1 not on F2; F2 not on F1; Match.
What do you want to do in each situation?
Are their duplicate keys on either/both file(s)?
Are the input files already in key order?
If your LRECL is 5, why do you have 1,6 in your REFORMAT?
For the message, post the JCL from the spool for that step, and all the messages from the sysout for the step. |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
yes, the keys will be ordered.
Input file 1 (of lrecl 80) will a have list of numeric records of length 5
Input file 2 (of lrecl 80) will a have list of numeric records of length 5
(all the records in input file 2 will be unique)
This i am tryng to achieve:
Compare the list of unique records in f1 with the corresponding field on f2. and write the matching records to one output file and non- matching records to a second output file.
SYSOUT MESSAGES:
WER276B SYSDIAG= 103476, 381175, 381175, 463458
WER164B 102,424K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 16K BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER478A A SORTJNF1 OR SORTJNF2 DD STATEMENT IS MISSING; BOTH ARE REQUIRED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
WER478A A SORTJNF1 OR SORTJNF2 DD STATEMENT IS MISSING; BOTH ARE REQUIRED |
Again, the message clearly states that the required DDNAMEs are SORTJNFx and not SORTJFNx |
|
Back to top |
|
|
rikdeb
New User
Joined: 19 Jan 2009 Posts: 63 Location: hyderabad
|
|
|
|
Ya..i saw that.. but then i got this one
WER224A SORTOUT NOT DEFINED |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
So, why do you not have a SORTOUT DD ? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
What does that error message tell you? If you don't apply yourself, nobody here will be able to help you.
If you really need to direct your output to SORTOF01, add this at the bottom of your control card.
Code: |
OUTFIL FILES=01,BUILD=(1,6) |
|
|
Back to top |
|
|
|