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

Compare two files of different lengths using Icetool.


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

New User


Joined: 12 Apr 2012
Posts: 23
Location: Singapore

PostPosted: Fri Apr 13, 2012 6:01 pm
Reply with quote

Hi,

I need to compare two files of different lengths and key fields are at same positions. Please find the details as below:

INPUT FILES:

FILE-1, LRECL=35 & FB, Key field position - 7 to 14 (X(8)).

FILE-1, LRECL=38 & FB, Key field position - 7 to 14 (x(8)).

OUTPUT FILES:

OUTPUT, Same layout as of File-1.


Sample data:

File-1:

Code:
ABCDEF11111111WWW
ADGSHF22222222DGH
HGHDJK33333333DJD
JHDIII44444444UUO
HIHRIO55555555FHI
KHSFKL66666666RIU
UOWIWW77777777WPW


File-2:

Code:
RURUIO11111111EYE
OTUEYE44444444TYR
IOUIRU66666666ROE


OUTPUT:

Code:
ABCDEF11111111WWW
JHDIII44444444UUO
KHSFKL66666666RIU



I want the solution using ICETOOL only, i know it with SORT.
Also i am new to ICETOOL.
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: Fri Apr 13, 2012 6:13 pm
Reply with quote

Show us what you have with SORT please.

Can you explain this insistence on ICETOOL? Is it just for learning?
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri Apr 13, 2012 9:22 pm
Reply with quote

Saini19,

Use the following DFSORT/ICETOOL JCL which will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL       
//TOOLMSG  DD SYSOUT=*             
//SYMNOUT  DD SYSOUT=*             
//DFSMSG   DD SYSOUT=*             
//IN1      DD *                   
ABCDEF11111111WWW                 
ADGSHF22222222DGH                 
HGHDJK33333333DJD                 
JHDIII44444444UUO                 
HIHRIO55555555FHI                 
KHSFKL66666666RIU                 
UOWIWW77777777WPW                 
//IN2      DD *                   
RURUIO11111111EYE                 
OTUEYE44444444TYR                 
IOUIRU66666666ROE                 
//OUT      DD SYSOUT=*             
//TOOLIN   DD *                   
  COPY JKFROM TO(OUT) USING(CTL1)
//*
//CTL1CNTL DD *                   
  JOINKEYS F1=IN1,FIELDS=(7,8,A)   
  JOINKEYS F2=IN2,FIELDS=(7,8,A)   
  REFORMAT FIELDS=(F1:1,35)       
//*
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 and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top