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

Compare Files and extract matching records using ICETOOL.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vimalravi83

New User


Joined: 28 Feb 2010
Posts: 21
Location: Bloomington, IL

PostPosted: Wed Jan 06, 2016 2:42 pm
Reply with quote

Hello All,
I have a requirement to compare two files and extract records from File1.Details are below;

I have two files; File1 and File2.

File1, 80 length, FB
--------------------
Code:
HDR111
0112345P88888888 XXXA
02DGG839
02KHH452
TLR111

HDR222
0183344G77777777 TTTA
02FFK839
02LPW452
TLR222

HDR333
0183921B44444444 KKKN
02GFF839
02RER452
TLR333


File2(Report format), 133 length,FBA
-------------------------------------------
Code:
******************REPORT-ID**********************
*************************************************
    EMP-ID       DEPT-ID      STATUS
    ------       -------      ------
    77777777     83344        A


File1 contains blocks of data, where each block has its own header and trailer records. After comparing File1 and File2, I need to extract block of records from File1.
For eg: in this case, EMP-ID(77777777, starting at 5th position, Len=8) DEPT-ID(83344, starting at 20th position, Len=5) and STATUS(A,starting at 30th position, Len=1) is matching with second set of block data in File1(01 format data). So output file should be as below(same format as File1)

Output
-------
Code:
HDR222
0183344 77777777 TTTA
02FFK839
02LPW452
TLR222


We don't have SORT JOINKEY facility installed and I tried with ICETOOL by putting them together after proper formatting and then using FIRSTDUP but didn't work since it's a block of records I need to extract. Could anyone help me?

Code'd
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jan 06, 2016 3:06 pm
Reply with quote

Can you check here ibmmainframes.com/viewtopic.php?t=33389 and let us know the product and release you use?
Back to top
View user's profile Send private message
vimalravi83

New User


Joined: 28 Feb 2010
Posts: 21
Location: Bloomington, IL

PostPosted: Wed Jan 06, 2016 3:17 pm
Reply with quote

In one of my ICETOOL joblog, I see below message ;

ICE201I 0 RECORD TYPE IS F.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 06, 2016 3:40 pm
Reply with quote

Unfortunately that either means you are up-to-date or extremely old.

Since JOINKEYS does not work for you (are you sure? please post what you tried, the entire sysout) it would look like you are way out of date. And, if so, out of luck. Write a program.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top