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
 

 

Mutualy exclusive files from a master file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Mutualy exclusive files from a master file
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    Post subject: Mutualy exclusive files from a master file
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 Moderator


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

PostPosted: Wed Mar 07, 2007 11:17 pm    Post subject:
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    Post subject: Re: Mutualy exclusive files from a master file
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    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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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