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

Mutualy exclusive files from a master file


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

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Wed Mar 07, 2007 10:05 pm
Reply with quote

Hi,

I have One file

Code:

Pos 1-3        pos 20-23      pos 35-39
Employee id    Employee Key   Employee data
123            ABCD           DATA1
345            ABCD           DATA1
433            ABCD           DATA5
456            EFGH           DATA2
678            HIJK           DATA2
890            JKLM           DATA3
123            LMNO           DATA4
345            IJKL           DATA4


I have to create 3 files from this file in such a way

File 1 --> same as master file but with all (duplicate employee key and employee data).

Code:

Employee id    Employee Key   Employee data
123            ABCD           DATA1
345            ABCD           DATA1


File 2 --> same as master file but with Unique and First record of duplicate Employee data.(FIRSTDUP)

Code:

Employee id    Employee Key   Employee data
433            ABCD           DATA5
456            EFGH           DATA2
890            JKLM           DATA3
123            LMNOP          DATA4


File 3 --> all remaining records.

Code:

678            HIJK           DATA2
345            IJKL           DATA4


Note --> File 1 2 & 3 should be mutualy exclusive i.e no record should be copied twice.

Thanks
Back to top
View user's profile Send private message
hernikiten

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Wed Mar 07, 2007 10:07 pm
Reply with quote

One correction -> File2 would be using FIRST option instead of FIRSTDUP
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 Mar 07, 2007 11:17 pm
Reply with quote

Here's a DFSORT/ICETOOL job that I think will do what you want. But it will have the output records in sorted order by employee data and employee key as follows:

OUT1

Code:

123                ABCD           DATA1
345                ABCD           DATA1


OUT2

Code:

456                EFGH           DATA2
890                JKLM           DATA3
345                IJKL           DATA4
433                ABCD           DATA5


OUT3

Code:

678                HIJK           DATA2 
123                LMNO           DATA4 


Will that do?
Back to top
View user's profile Send private message
hernikiten

New User


Joined: 08 Apr 2005
Posts: 23
Location: india

PostPosted: Thu Mar 08, 2007 4:03 pm
Reply with quote

Hi,

Even better if the data would be sorted.

Cheers.
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