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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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