Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Get duplicate records for selected position

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu Dec 02, 2010 2:21 pm    Post subject: Get duplicate records for selected position
Reply with quote

file1 is :

BG00 2010-11-01-00:00:00 AAAAAAAA
BG00 2010-11-01-00:30:00 BBBBBBBB
BG00 2010-11-01-01:00:00 CCCCCCC

file2 is:

BG00 2010-11-01-00:00:00 DDDDDDD
BG00 2010-11-01-00:29:00 EEEEEEEE
BG00 2010-11-01-01:00:00 FFFFFFFFF

I want to get the output is:

BG00 2010-11-01-00:00:00 AAAAAAAA
BG00 2010-11-01-01:00:00 CCCCCCC

for output file,the pisition 20 & 21 must be 30's integral multiple,and pisition 23 & 24 must be zero.

so 'BG00 2010-11-01-02:30:00 EEEEEEE' is valid,
'BG00 2010-11-01-02:29:00 EEEEEEE' is invalid.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Dec 02, 2010 11:14 pm    Post subject:
Reply with quote

victor niu,

Assuming both input files are of the same length, the following DFSORT/ICETOOL JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                       
//DFSMSG   DD SYSOUT=*                                       
//IN       DD *                                             
BG00 2010-11-01-00:00:00 AAAAAAAA                           
BG00 2010-11-01-00:30:00 BBBBBBBB                           
BG00 2010-11-01-01:00:00 CCCCCCC                             
//         DD *                                             
BG00 2010-11-01-00:00:00 DDDDDDD                             
BG00 2010-11-01-00:29:00 EEEEEEEE                           
BG00 2010-11-01-01:00:00 FFFFFFFFF                           
//OUT      DD SYSOUT=*                                       
//TOOLIN   DD *                                             
  SELECT FROM(IN) TO(OUT) HIGHER(1) ON(1,24,CH) USING(CTL1) 
//CTL1CNTL DD *                                             
  INCLUDE COND=(20,2,SS,EQ,C'00,30',AND,23,2,ZD,EQ,0)       
  OUTFIL REMOVECC,NODETAIL,                                 
  SECTIONS=(1,24,HEADER3=(1,80))                             
//*
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Sun Dec 05, 2010 9:35 am    Post subject:
Reply with quote

thank you,Skolusu,it's great icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us