Posted: Fri Aug 29, 2003 5:20 pm Post subject: Can this be done using dfsort ?
The scenario
I have two files
first file has account details ,it includes account no field
second file has only account no
I want to delete all the records from the first file which has the account no same as in the second file ..there are few constraints for doing it..they are
the first file shouldnot be sorted
with out sorting the first file can we achieve the deletion...
is there a way to bring the acct no from the second file into the sysin statements..and achieve using OMIT condition
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat Aug 30, 2003 10:04 am Post subject:
Manu,
If the "first file should not be sorted", then the ONLY way to do it would be to generate OMIT control conditions which you can certainly do with DFSORT. But there is a limit to the number of OMIT conditions you can use in one pass.
If you can sort the first file, then you can do this kind of thing with the SPLICE operator of DFSORT's ICETOOL and there's no limit to the number of records you can handle that way.
I'd need to know the following to tell you whether/how you can do this with DFSORT OMIT conditions:
How many records do you have in the second file?
What is the position, length and format of the account numbers in the second file? What is the position, length and format of the account numbers in the first file?
What is the RECFM and LRECL of the first file?
What is the RECFM and LRECL of the second file? _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
How many records do you have in the second file?
36,000
What is the position, length and format of the account numbers in the second file? What is the position, length and format of the account numbers in the first file?
The second file is of LRECL 12 and it contains only Acct number which is twelve bytes
In the first file the acct number (12 bytes) starts at 56th position,this file is of LRECL 765,Both files are FB
What is the RECFM and LRECL of the first file?
What is the RECFM and LRECL of the second file?
the output file should be like this
1------ 56---------67-------------------------------------755
******xxxxxxxxx*****************************
******yyyyyyyyy*****************************
****** yyyyyyyyy*****************************
Manu,
You need PTF UQ90053 to execute this jcl.
I reduced the lrecl to 80 to give you the possibility to submit it 'as is' at your shop.
There is no constraint of 'OMIT' but perhaps of time : 7 passes are not efficient...
RECORD NUMBER 4 ***************************************YYYYYYYYYYYY*************
RECORD NUMBER 6 ***************************************YYYYYYYYYYYY*************
RECORD NUMBER 9 ***************************************XXXXXXXXXXXX*************
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Sep 04, 2003 9:21 am Post subject:
Manu,
Generating the omit cards will work only if the no: records are less than 5000( for a key length of 12 bytes).But your second input file has about 36,000 records which is way too much for generating omit cards.If you have DFSORT'S latest PTF installed then may be you can do it with splice operator as shown by alan. I wouldn't recommend that also it makes 7 passes of data. If you have easytrieve at your shop then it is very easy and simple. The following JCL will give you the desired results.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum