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
 

 

Comparision on first 15 char from two files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
atulxp

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Sun Mar 18, 2007 6:52 am    Post subject: Comparision on first 15 char from two files
Reply with quote

I have two file Old File O & new file N
I need comparision on first 15 char & in output file F unique records from file O & N should be retained however matching records should be taken from file N.

File O
X(15) X(53)
111111111111111 AAAAAA BBBBB AAAAAAA
222222222222222 BBBBBB AAAAA BBBBBBB

File N

222222222222222 AAAAAA BBBBB AAAAAAA
333333333333333 CCCCCC DDDDD CCCCCCC

File F
111111111111111 AAAAAA BBBBB AAAAAAA
222222222222222 AAAAAA BBBBB AAAAAAA
333333333333333 CCCCCC DDDDD CCCCCCC

Please suggest how this could be done via sort
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Mar 18, 2007 7:10 am    Post subject:
Reply with quote

Hello,

Please see the following - this request is asked regularly. Searching the forum would help you also.

Quote:

I suspect you can use some variation of the technique shown in the "Create files with matching and non-matching records" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/


If after reviewing the material, you have questions, please let us know.
Back to top
View user's profile Send private message
atulxp

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Sun Mar 18, 2007 7:50 am    Post subject:
Reply with quote

Hi

I have checked that but that is not resolving my problem fully. Please see problem statement.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sun Mar 18, 2007 10:01 pm    Post subject:
Reply with quote

atulxp,

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed, as shown in your example, that there are no duplicates within file O and no duplicates within file N.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//CON DD DSN=...  input file O
//    DD DSN=...  input file N
//OUT DD DSN=,,,  output file
//TOOLIN   DD    *
SELECT FROM(CON) TO(OUT) ON(1,15,CH) LAST
/*
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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm


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