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
 

 

Adding a column from file1 to another column in file2

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

New User


Joined: 16 Oct 2007
Posts: 15
Location: bangalore

PostPosted: Wed Feb 29, 2012 12:45 pm    Post subject: Adding a column from file1 to another column in file2
Reply with quote

Hi All,

I have a requirement like this.

I have two files and the layout is given below for both the files.

=====================
File 1 layout:

Dealer code X(5)
Amount 9(13).9(2)
================
File 2 layout:

Column1
Column2
.
.
.
Dealer code x(5)
.
.
Amount 9(13).9(2)
=================

When dealer code is similar in both the files, then file1 amount column should be added to File2 amount.

Please let me know, if you need more info on this. Thanks in advance.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Wed Feb 29, 2012 1:00 pm    Post subject: Reply to: Adding a column from file1 to another column in fi
Reply with quote

Quote:
When dealer code is similar in both the files,


just a new approach to key matching icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Feb 29, 2012 1:13 pm    Post subject:
Reply with quote

Enrico,

maybe it is like levels of i/o
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Feb 29, 2012 2:09 pm    Post subject: Reply to: Adding a column from file1 to another column in fi
Reply with quote

Maybe it is the second level of testing? First level, you get no matches at all. Fix the obvious. Then it matches a record "nearby" the one it is supposed to, with a similar key. Three days later everything is fine... until the first of 17 bug-reports arrives.
Back to top
View user's profile Send private message
elango_K

New User


Joined: 18 Aug 2011
Posts: 44
Location: India

PostPosted: Wed Feb 29, 2012 3:59 pm    Post subject:
Reply with quote

What level of DFSORT is present in your site?

It can be done by using JOINKEYS. Have a look at the samples and give it a try.
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: Thu Mar 01, 2012 12:51 am    Post subject:
Reply with quote

Quote:
Please let me know, if you need more info on this. Thanks in advance.


Yes, we do. Your description is not clear. Show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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