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
 

 

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: 1529
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: 1529
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: 7226

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 How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Matching with Key at different postions. rajatbagga DFSORT/ICETOOL 12 Wed Nov 09, 2016 10:58 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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