Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us