|
View previous topic :: View next topic
|
| Author |
Message |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi,
I have a requirement as follows:
File A has following recs:
AAAA XXXXXXXXXXXX
BBBB YYYYYYYYYYYY
CCCC ZZZZZZZZZZZZ
DDDD 111111111111
EEEE 111111111111
File B has following recs:
AAAA
1111
CCCC
2222
EEEE
Now the requirement wants to omit/eliminate the records from FILE A that are present in FILE B. So the output file will have:
BBBB YYYYYYYYYYYY
DDDD 111111111111
Below is the JCL that I have used and it is working fine.
| Code: |
//ICETOOL EXEC PGM=ICETOOL
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
AAAA XXXXXXXXXXXX
BBBB YYYYYYYYYYYY
CCCC ZZZZZZZZZZZZ
DDDD 111111111111
EEEE 111111111111
/*
//IN2 DD *
AAAA
1111
CCCC
2222
EEEE
/*
//OUT1 DD DSN=&&TEMP01,DISP=(MOD,PASS,DELETE),
// RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)
//OUT2 DD DSN=&&TEMP02,DISP=(MOD,PASS,DELETE),
// RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)
//OUT3 DD DSN=&&TEMP03,DISP=(MOD,PASS,DELETE),
// RECFM=FB,LRECL=80,SPACE=(TRK,(5,5),RLSE)
//OUT4 DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(OUT1) USING(CTL1)
COPY FROM(IN1) TO(OUT3) USING(CTL1)
COPY FROM(IN2) TO(OUT1) USING(CTL1)
SELECT FROM(OUT1) TO(OUT2) ON(1,4,CH) NODUPS
COPY FROM(OUT2) TO(OUT3) USING(CTL1)
SELECT FROM(OUT3) TO(OUT4) ON(1,4,CH) FIRSTDUP
/*
//CTL1CNTL DD *
SORT FIELDS=COPY
/*
|
BUT actually my FILE A is of 1340 Bytes and FILE B is of 19 bytes.
FILE A is having 4 million recs and FILE B is having 10 million recs and the above JCL (with LRECL changed) stops working stating that "SORT CAPACITY EXCEEDED".
Can anyone suggest an alternative solution?
Thanks,
Mohit |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Give more space in the existing jcl. Also add some larger sortwknn dd statements.
Somewhere there is a message that there was a space problem (possibly an x37 error). |
|
| Back to top |
|
 |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Thanks for replying.
I am going to try that out. Will let you know if it works or not.
Also I have a doubt in my mind that is this an optimal way to do this?
Thanks,
Mohit |
|
| Back to top |
|
 |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
by assigning larger sortwk dd statements .... it is working fine ... Thanks
However, it is taking a lot of time.
If possible, can you please suggest some idea to improve the performance of the JCL. My improved JCL is as follows:
| Code: |
//S01S1T EXEC PGM=ICETOOL
// ALL SORTWKnns here
//IN1 DD DISP=SHR,DSN=BFYMS1.A1CCSEQ.FALCON.FALF0031
//OUT1 DD DSN=BFYMS1.A1CCSEQ.FALCON.OUT1,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=1341,BLKSIZE=26820),
// SPACE=(CYL,(500,50),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT1) USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=COPY
INREC FIELDS=(1:1,1340,
1341:C'A')
//*************************************
//S02SRT EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
// ALL SORTWKnns here
//IN1 DD DISP=SHR,DSN=BFYMS1.A1CCSEQ.FALCON.OUT1
//IN2 DD DISP=SHR,DSN=BFYMS1.A1CC.FP.TEST1.LEFT.NODUPS
//OUT1 DD DSN=&&TEMP01,DISP=(MOD,PASS,DELETE),
// RECFM=FB,LRECL=1341,SPACE=(CYL,(100,50),RLSE)
//OUT2 DD DSN=&&TEMP02,DISP=(MOD,PASS,DELETE),
// RECFM=FB,LRECL=1341,SPACE=(CYL,(100,50),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT1) USING(CTL1)
COPY FROM(IN2) TO(OUT1) USING(CTL1)
SELECT FROM(OUT1) TO(OUT2) ON(1,19,CH) NODUPS
/*
//CTL1CNTL DD *
SORT FIELDS=COPY
/*
//SYNCS1 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
// ALL SORTWKnns here
//SORTIN DD DSN=&&TEMP02,DISP=SHR
//SORTOUT DD DSN=BFYMS1.A1CCSEQ.FALCON.DUPS,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=1340,BLKSIZE=26800),
// SPACE=(CYL,(500,50),RLSE)
//SYSIN DD *
SORT FIELDS=(1,19,CH,A)
INCLUDE COND=(1341,1,CH,EQ,C'A')
OUTREC FIELDS=(1,1340)
//
|
Any futher improvement will be really appreciated.
Thanks,
Mohit |
|
| Back to top |
|
 |
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Here is an alternate solution using SyncSort's JOIN feature:
| Code: |
//SORT1 EXEC PGM=SORT
//SORTJNF1 DD *
AAAA XXXXXXXXXXXX
BBBB YYYYYYYYYYYY
CCCC ZZZZZZZZZZZZ
DDDD 111111111111
EEEE 111111111111
//SORTJNF2 DD *
AAAA
1111
CCCC
2222
EEEE
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILES=F1,FIELDS=(1,4,A)
JOINKEYS FILES=F2,FIELDS=(1,4,A)
JOIN UNPAIRED,F1,ONLY
SORT FIELDS=COPY
/* |
If SORTJNF2 has many duplicates, then I would recommend swapping the SORTJNF1 and SORTJNF2 DD specifications. You will also need to change your JOIN UNPAIRED statement to reflect F2 instead of F1. |
|
| Back to top |
|
 |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi Alissa,
Thanks for providing an optimal solution. However, it is throwing the following errors:
1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R10 - 04:43 ON FRI A
0 JOINKEYS FILES=F1,FIELDS=(1,19,A)
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
JOINKEYS FILES=F2,FIELDS=(1,19,A)
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
JOIN UNPAIRED,F1,ONLY
£
ICE005A 0 BLANK NEEDED IN COLUMN 1 OR OPERATION NOT DEFINED CORRECTLY
SORT FIELDS=COPY
ICE056A 0 SORTIN NOT DEFINED
ICE751I 0 C5-K48846 C6-K90014 C7-K45047 C8-K46331 E7-K48846
ICE052I 3 END OF DFSORT
Can you please advise on this. It looks that SORT utility doesn't work on my system. Or may be there is something else?
Thanks again,
Mohit |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You are using a Syncsort solution for a DFSORT execution.
Suggest you look in the DFSORT documentation or search in the forum for the proper syntax for the product you are using (this time). |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| Mohit, looking over previous topics, you've jumped back and forth between Syncsort and DFSORT. Are you in one of those rare companies that actually uses both products? If so, I think you're going to have to find a way to be more specific about which product you're referring to. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Mohit,
You can use JOINKEYS with DFSORT if you have your System Programmer install z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009).
Without that PTF, you can't use JOINKEYS with DFSORT.
For complete details on that DFSORT PTF, see:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174 |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|