View previous topic :: View next topic
Author
Message
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
I was providing an OMIT that I thought you could then generate...
However...
As you do not know the P/G, except on FILE A, I don't think ANY single OMIT is going to do what you want (as you show in your data, that an incident number could be in either place on FILE B or C).
I think you would need to pass each of the two files twice, with different OMITs.
It is either that or "program time", or try to work out what Kolusu had in mind :-), bearing in mind also that there are things like JNFnCNTL files which DFSORT has and your SyncSort may not.
Back to top
Anbarasan D New User Joined: 20 Apr 2010Posts: 21 Location: USA
You can try this.
Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
0000000091 P B
0000000095 G B
0000000072 P C
0000000051 G C
//FILEB DD DSN=&&FILEP,
// DISP=(,PASS,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE)
//FILEC DD DSN=&&FILEG,
// DISP=(,PASS,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=FILEB,INCLUDE=(12,1,CH,EQ,C'P'),
BUILD=(1,80)
OUTFIL FNAMES=FILEC,INCLUDE=(12,1,CH,EQ,C'G'),
BUILD=(1,80)
/*
//S2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=&&FILEP,
// DISP=SHR
//SORTJNF2 DD *
123456789123456789AA00000000A1AAAAAAAAA0000000095
123456789123456789AA0000000021AAAAAAAAA0000000051
123456789123456789AA0000000091AAAAAAAAA0000000004
123456789123456789AA0000000072AAAAAAAAA0000000001
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(01,10,A),SORTED
JOINKEYS FILE=F2,FIELDS=(21,10,A),SORTED
JOIN UNPAIRED,F2
REFORMAT FIELDS=(F2:1,80)
SORT FIELDS=COPY
/*
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
Mmmm.... are you sure that that is going to satisfy the requirement?
How are you distinguishing between TS's FILEB and FILEC for your, er, one final output file?
Back to top
Anbarasan D New User Joined: 20 Apr 2010Posts: 21 Location: USA
Sorry, I coded only for one output file(FILEB). Need to have the third step to get the output for FILEC(similar like S2 step)
Back to top
daveporcelan Active Member Joined: 01 Dec 2006Posts: 792 Location: Pennsylvania
I think you also need the output from step S2 to be reprocessed a second time to ensure it doesn't match Type G with File B.
I see this is many sort steps before your done.
Or one small Rexx program.
I think we have lost the TS however. Maybe wait to see if they are still with us.
Back to top
mfchnuser New User Joined: 21 Sep 2012Posts: 12 Location: India
Thanks for your replies..i ran the sort step suggested by Anbarasan
..getting an abend U0016
this is the sysout log
Code:
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER486A ERROR IN JNF1 PROCESSING
WER482I JNF1 STATISTICS
WER483B 1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,288,960 BYTES USED
WER108I SORTJNF1 : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER073I SORTJNF1 : DSNAME=SYS12352.T064932.RA000.F0091CVT.FILEP.H04
WER483B 748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER483B 0 BYTES RESERVE REQUESTED, 268K BYTES USED
WER485A SORTJNF1 OUT OF SEQUENCE, RECORD NUMBER = 2
WER482I JNF2 STATISTICS
WER483B 1,780K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,302,464 BYTES USED
WER108I SORTJNF2 : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER073I SORTJNF2 : DSNAME=Z1225DJ.F0091CVT.JOB25150.D0000103.?
WER483B 748K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER483B 0 BYTES RESERVE REQUESTED, 268K BYTES USED
WER416B BSAM WAS USED FOR SORTJNF2
Can you please help why this is coming.. used exactly same jcl to test
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
Code:
WER486A ERROR IN JNF1 PROCESSING
[...]
WER485A SORTJNF1 OUT OF SEQUENCE, RECORD NUMBER = 2
Looks like your data is not in sequence. Remove the SORTED for the file 1 JOINKEYS.
Back to top
Anbarasan D New User Joined: 20 Apr 2010Posts: 21 Location: USA
Use the Step2 sort card like below.
Code:
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(01,10,A)
JOINKEYS FILE=F2,FIELDS=(21,10,A)
JOIN UNPAIRED,F2,ONLY
REFORMAT FIELDS=(F2:1,80)
SORT FIELDS=COPY
/*
Back to top
Please enable JavaScript!