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
 

 

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: 7315

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 compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm


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