Remove records according to a list



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Remove records according to a list

Postby olivermf » Tue Feb 08, 2011 4:54 pm

Hello,

I want to omit all records in a PS-File according to a list of chars in another file and do this using DFSort/Icetool.

Example:

File:

abcdef1234567ghijklmn
abcdef2345678ghijklmn
abcdef3456789ghijklmn
abcdef4567890ghijklmn

File2:
2345678
3456789


I want to omit all records that include the chars in File2 on column 6 length 7. There can be more than one entry in the first file that includes the char in file2. All of them have to be deleted.

The last PTF-Packages has been installed on the mainframe system.

Thank you in advance,

regards,

Oliver
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Remove records according to a list

Postby skolusu » Tue Feb 08, 2011 10:12 pm

olivermf,

The following DFSORT JCL will give you the desired results

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//INA      DD *                           
----+----1----+----2----+----3----+----4---
ABCDEF1234567GHIJKLMN                     
ABCDEF2345678GHIJKLMN                     
ABCDEF3456789GHIJKLMN                     
ABCDEF4567890GHIJKLMN                     
//INB      DD *                           
2345678                                   
3456789                                   
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
  OPTION COPY                             
  JOINKEYS F1=INA,FIELDS=(7,7,A)           
  JOINKEYS F2=INB,FIELDS=(1,7,A)           
  JOIN UNPAIRED,F1,ONLY                   
//*


The output from this job is
ABCDEF1234567GHIJKLMN
ABCDEF4567890GHIJKLMN
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Remove records according to a list

Postby olivermf » Wed Feb 09, 2011 1:14 pm

Thank you very much for your fast reply!
This was exactly what I wanted to do.
olivermf
 
Posts: 53
Joined: Tue Feb 08, 2011 4:28 pm
Has thanked: 3 times
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post