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
 
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

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