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
 
Compare two files of different lengths using Icetool.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Compare two files of different lengths using Icetool.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Apr 13, 2012 6:13 pm    Post subject: Reply to: Compare two files of different lengths using Iceto
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    Post subject:
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    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 Comparing two sequential files Mohan Kothakota COBOL Programming 14 Mon Apr 16, 2018 6:35 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm

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