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
 
DFSort utility to merge two files

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

New User


Joined: 24 Feb 2005
Posts: 11

PostPosted: Sun Mar 27, 2005 11:34 pm    Post subject: DFSort utility to merge two files
Reply with quote

Hi,

I want to know if there is any option which can be given in DF Sort utility which will merge two files in a particular manner.

Let me explain what I exactly wish to do. I have two files say File A
& File B both of the same length, and I am using DFsort to merge the
two files. Now there is a field A on file A which has all same
values....say 'a'. This file has about 40 million records. Similarly
on File B there is a field B which has all same values .....say 'b'.
Now I want to merge the two files and create a 3rd file say File C
which has the same structure as both 'A' & 'B'. Hence in File 'C' the
Fields A & B will be at the same disposition as the earlier 2 files.

Now on File C this field must have value 'a' all over(ie the value
from File A). Although we can use OUTREC, I have worked with only
hardcoding the values in OUTREC parameter, but what makes this problem
difficult is the the value of 'a' is going to change every month.
Hence it can't be hardcoded. So the solution that will be provided
will need to be as generic as possible.

I will be glad if anyone can help ASAP.

Thanks,
Vaibhav
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: Mon Mar 28, 2005 2:12 am    Post subject:
Reply with quote

Your explanation of what you want to do is not at all clear. When you say "merge", do you mean the MERGE function where the records of each file are already in sorted order and you want the output file to be in the same sorted order. Or do you mean something else, like wanting to join fields from record 1 of file A with record1 of file B, record2 of file A with record2 or file B, etc? (You could use the SPLICE operator of DFSORT's ICETOOL for join and match operations.) Or do you mean something else?

Please show an example of the records in File A and the records in File B and what you want the output records to look like. What is the RECFM and LRECL of File A and File B? What is the starting position, length and format of each relevent field in File A and File B.

Quote:
Hence in File 'C' the Fields A & B will be at the same disposition as the earlier 2 files.


What do you mean by disposition? Do you mean position? Or something else?

Quote:
Now on File C this field must have value 'a' all over(ie the value
from File A).


What do you mean by "all over"?

I'd be happy to help you create the DFSORT or ICETOOL job you need, but I can't do that until you explain clearly what it is you want to do and provide an exampe of input and output.
Back to top
View user's profile Send private message
vaibhavkolhe

New User


Joined: 24 Feb 2005
Posts: 11

PostPosted: Fri Apr 01, 2005 11:18 pm    Post subject: Re: DFSort utility to merge two files
Reply with quote

Hi Frank,

I understand your questions. However, I got the problem resolved. The field 'A' in File A & field 'B' in file B were the dates at the end of the month and since dates keep changing each month, the solution was required to be generic.

However, File A is created from the BMC Unload utility and field 'A' is populated from the table. I used the LAST_DAY function of DB2(LAST_DAY(Current date - 1 month) to get this date as the last day of the processing month & further merged it with field 'B' in file B which always had the last day of the processing month. This way it worked perfectly.

However, thanks for your help & questions.

Vaibhav
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 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 Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm

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