IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Get duplicate records for selected position


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Sort SMF records? SYNCSORT 6
No new posts To Discard record with 0 entry if Dup... SYNCSORT 7
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts Identify and write records containing... SYNCSORT 11
Search our Forums:


Back to Top