IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sequential File matching requirement by using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manikanth_e

New User


Joined: 27 Mar 2007
Posts: 13
Location: chennai

PostPosted: Wed Apr 18, 2007 10:02 pm
Reply with quote

hello,
I have two sequential files for matching. The following is the requirement by using DFSORT:

Code:

File A      File B
FieldA      FieldA FieldB
A           A      1
B           A      2
C           B      3
            B      4
            C      5


When i match the above two files based on the field A. I need the Sequential file C in the below format.

Code:

File C
A           1      2
B           3      4
C           5


Can anyone please help me out?

Thanks.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Apr 18, 2007 11:35 pm
Reply with quote

You need to give more information about what you want to do.

What is the RECFM and LRECL of fileA and fileB?

What is the starting position, length and format of fieldA in fileA and fields A and B in fileB?

Is field A unique in fileA (only one A, one B, etc). Are there only two records maximum with each field A value (e.g. A or A, A but not A, A, A)?

What do you want to do with fieldA values in fileA that have no match in fileB? What do you want to do with fieldA values in fileB that have no match in fileA?

A better example showing the actual fields in each file and all of the different variations would help.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Apr 18, 2007 11:38 pm
Reply with quote

Hello,

Please start over. Your file "defiinitions" are not at all clear. Some may understand what you've said, but many will not.

Post the info as "Code" using the tab at the top of the reply panel and make sure that the files are separated. This will make your post more readable.
This
Quote:
File A File B
FieldA FieldA FieldB
A A 1
B A 2
C B 3
B 4
C 5
provides no consistancy. How many fields are really in each file (1, or 2 or ?)?
Back to top
View user's profile Send private message
manikanth_e

New User


Joined: 27 Mar 2007
Posts: 13
Location: chennai

PostPosted: Thu Apr 19, 2007 12:23 am
Reply with quote

Frank,
The below is the info you need:
RECFM and LRECL of FILE A and FILE B are same.
FieldA in FileA starts at position1 and ends at position9.
FieldA in FileB starts at position1 and ends at position9.
FieldB in FileB starts at position11 and ends at position20.
and,
FieldA in FileA is not unique (multiple As and multipe Bs can occur). There is nothing like two records maximum with each fieldA value. It may vary.

The below is the example:
Code:

FileA              FileB
FieldA            FieldA  FieldB
A                   A        1
A                   A        2
B                   A        3
B                   B        4 
B                     
C


FileA (lrecl - 50) can consists multiple rows with same value for fieldA.
FileB (lrecl - 50) can consists multiple rows with same value foe fieldA.
When FileA is matched on FileB based on the FieldA for retrieving FieldB of FileB. The below should be the output.
Code:

A    1     2     3
A    1     2     3
B    4
B    4
B    4
C

As C doesnt have the match on file B, no corresponding values are seen.

please let me know in case you need furthur details.


Thanks.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Apr 19, 2007 12:32 am
Reply with quote

I don't know of any way to do this with DFSORT/ICETOOL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top