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
 

 

A question on search and finding matched and unmatched rec.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Jan 25, 2010 3:56 pm    Post subject: A question on search and finding matched and unmatched rec.
Reply with quote

Hi all,

i have two files File1 that has 1 million records and File2 that has 10 thousand records.

Requirement : File3 shall contain matched records from File1 & File2.
File4 shall contain unmatched records from File1 & File2.

Since the records are in million please let me know the most optimized way to achieve this.

Please note : both the files File1 and File2 are sorted in acending key order.

Thank you.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jan 25, 2010 4:07 pm    Post subject:
Reply with quote

Yes, this can be done using a sort product and has already been asked very frequently, so you should be able to search the forum to find some really good examples on how to do this.

This is a link to the DFSORT smart tricks documentation which has many examples of matching records.
Please click HERE to access it.

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY


You also need to provide more detail than you already have.

What is the DSORG, RECFM & LRECL of both File 1 and File 2
Where are the keys located in each file, their length and format
Are there any duplicates in either file
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Mon Jan 25, 2010 4:10 pm    Post subject: Reply to: A question on search and finding matched and unmat
Reply with quote

when posting DFSORT related questions You should have lurked a bit
and You should already know what info Frank/Skolusu need in order to provide You a solution

record format/lrecl key position/length/format for the first input dataset
record format/lrecl key position/length/format for the second input dataset

if there are duplicates in any of the datasets

output datasets format/lrecl/content ( for each needed dataset )

reread the info posted and try to understand if what you provided is enough to give a suggestion/solution

if the explanation is well done You might not need to post sample data,
but let' s Frank/Skolusu be the judges
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Jan 25, 2010 4:23 pm    Post subject:
Reply with quote

EXTRA INFO..

Both the input files have been sorted and in acending key sequence.
LRECL is 80 bytes for both files.
record key starts at position1 having lenght 6. ... FORMAT is FB.

please let me know the concept. as this is related to 1 million records need to know optimized way of achieving the result.

Please let me know if more info is required.

Thanks....
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: Mon Jan 25, 2010 11:22 pm    Post subject:
Reply with quote

Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.

Also, please run this job and show the //SYSOUT messages you receive so I can determine what level of DFSORT you have:

Code:

//S1    EXEC  PGM=SORT           
//SYSOUT    DD  SYSOUT=*         
//SORTIN DD *                   
RECORD                           
//SORTOUT DD DUMMY               
//SYSIN    DD    *               
  OPTION COPY                   
/*                               
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 Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm


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