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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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