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
 
find matching entries from SORTOUT for entries from SORTXSUM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Thu Dec 12, 2013 4:33 pm    Post subject: find matching entries from SORTOUT for entries from SORTXSUM
Reply with quote

Hi,

Can you please help me to find matching entries written to SORTOUT for all the duplicates written to SORTXSUM.

INPUT FILE - LRECL=30, RECFM=FB
Code:

----+----1----+----2----+----3
RECORD1 FROM FILE1 OF 20-10-13
RECORD1 FROM FILE1 OF 20-10-13
RECORD1 FROM FILE1 OF 20-10-13
RECORD6 FROM FILE8 OF 10-01-13
RECORD8 FROM FILE4 OF 16-06-13
RECORD8 FROM FILE4 OF 16-06-13
RECORD2 FROM FILE5 OF 08-09-13


SORTOUT:-
Code:

RECORD1 FROM FILE1 OF 20-10-13
RECORD8 FROM FILE4 OF 16-06-13
RECORD2 FROM FILE5 OF 08-09-13
RECORD6 FROM FILE8 OF 10-01-13


SORTXSUM:-
Code:

RECORD1 FROM FILE1 OF 20-10-13
RECORD1 FROM FILE1 OF 20-10-13
RECORD8 FROM FILE4 OF 16-06-13


Expected SORTOF1:- This should have matching entries from SORTOUT for match found from SORTXSUM
Code:

RECORD1 FROM FILE1 OF 20-10-13
RECORD8 FROM FILE4 OF 16-06-13


Expected SORTOF2:- This should have remaining entries from SORTOUT
Code:

RECORD2 FROM FILE5 OF 08-09-13
RECORD6 FROM FILE8 OF 10-01-13


My SORT job:-
Code:

//SORT01   EXEC PGM=SORT                   
//SORTIN   DD *                           
RECORD1 FROM FILE1 OF 20-10-13             
RECORD1 FROM FILE1 OF 20-10-13             
RECORD1 FROM FILE1 OF 20-10-13             
RECORD6 FROM FILE8 OF 10-01-13             
RECORD8 FROM FILE4 OF 16-06-13             
RECORD8 FROM FILE4 OF 16-06-13             
RECORD2 FROM FILE5 OF 08-09-13             
//SORTOUT  DD SYSOUT=*                     
//SORTXSUM DD SYSOUT=*                     
//SYSOUT   DD SYSOUT=*                     
//SYSIN    DD *                           
 SORT FIELDS=(1,6,CH,A,14,5,CH,A,23,8,CH,A)
 SUM FIELDS=NONE,XSUM                     


Please help.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1567
Location: Andromeda Galaxy

PostPosted: Thu Dec 12, 2013 4:50 pm    Post subject:
Reply with quote

What kind of requirement is this?

and what have you tried and what is stopping you?

and All you need is just another step with JOINKEYS to achieve the result needed

Edit: You might also eed unique data in SORTXSUM dataset
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Dec 13, 2013 3:31 am    Post subject:
Reply with quote

Hi,

try this

Code:
//STEP0001  EXEC PGM=ICETOOL                                     
//TOOLMSG   DD SYSOUT=*                                           
//DFSMSG    DD SYSOUT=*                                           
//IN        DD *                                                 
RECORD1 FROM FILE1 OF 20-10-13                                   
RECORD1 FROM FILE1 OF 20-10-13                                   
RECORD1 FROM FILE1 OF 20-10-13                                   
RECORD6 FROM FILE8 OF 10-01-13                                   
RECORD8 FROM FILE4 OF 16-06-13                                   
RECORD8 FROM FILE4 OF 16-06-13                                   
RECORD2 FROM FILE5 OF 08-09-13                                   
//T1        DD DSN=&&T1,DISP=(,PASS,DELETE),UNIT=SYSDA,           
//             SPACE=(TRK,(10,5),RLSE)                           
//OUT1      DD SYSOUT=*                                           
//OUT2      DD SYSOUT=*                                           
//TOOLIN    DD *                                                 
SELECT FROM(IN) TO(OUT1) ON(1,7,CH) ON(14,5,CH) ON(23,8,CH) -     
       NODUPS DISCARD(T1)                                         
SELECT FROM(T1) TO(OUT2) ON(1,7,CH) ON(14,5,CH) ON(23,8,CH) -     
       FIRSTDUP                                                   


Gerry
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Sun Dec 15, 2013 11:07 am    Post subject:
Reply with quote

Pandora, thanks for the idea.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1567
Location: Andromeda Galaxy

PostPosted: Sun Dec 15, 2013 11:12 am    Post subject:
Reply with quote

Ramsri,

You should look at Gicchet's post aswell
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Sun Dec 15, 2013 9:41 pm    Post subject: Reply to: find matching entries from SORTOUT for entries fro
Reply with quote

Ramsri,

New avatar, but not much else changes.

Have you looked at using DUPKEYS instead of SUM, if your SyncSort has it?

If you don't have DUPKEYS, tell us what you want to achieve and show your existing step. Don't just ask us how to implement the method that you think should be used. Without DUPKEYS, it is likely that SyncTool will be a better shot at what you want, be we can't really tell.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Mon Dec 16, 2013 9:21 am    Post subject: Reply to: find matching entries from SORTOUT for entries fro
Reply with quote

Haven't tried DUPKEYS......will try and post it here.

Thanks.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Find out which PSB is currently sched... Andi1982 IMS DB/DC 0 Mon Sep 24, 2018 3:16 pm
No new posts How to find if segment is read in any... Priyanka AR IMS DB/DC 12 Thu Sep 20, 2018 1:34 pm
No new posts Sort card to find duplicates, without... anand1204 DFSORT/ICETOOL 15 Fri Aug 31, 2018 12:13 am
No new posts USS: Find and replace string within a... vasanthz All Other Mainframe Topics 5 Thu Aug 02, 2018 4:01 am
No new posts Add Comma to each record until find t... naveensrimf DFSORT/ICETOOL 6 Sat Jul 28, 2018 12:25 am

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