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
 
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 Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 2 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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