IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to code the following requirement?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed May 14, 2008 12:29 pm
Reply with quote

INPUT:
Code:
WDCP TR   WDCP   WDCP ID
 ID SSN   NOD ID GUAR AGCY
C 9       N 3    C 3     
15------- 24---- 27-------
310789954 004    836     
312520249 002    836     
312929875 002    836     
325807809 003    836     
325807809 002    836     
242293732 001    836     
242293732 001    836           
242293732 001    836     
242293732 001    836     
346685284 001    836     
378920533 001    836     
378920533 001    836     
413963981 003    836     
413963981 003    836     
433679765 004    836     

REQUIRED OUTPUT:
Code:
 WDCP TR   WDCP   WDCP ID
 ID SSN   NOD ID GUAR AGCY
C 9       N 3    C 3     
15------- 24---- 27-------
242293732 001    836         
242293732 001    836     
242293732 001    836     
242293732 001    836         
378920533 001    836     
378920533 001    836     
413963981 003    836     
413963981 003    836     

I want only the records where the SSN and NOD ID field combinely occurs
more than one times.

I tried the XSUM option, but the output i got was,
Code:
 WDCP TR   WDCP   WDCP ID
 ID SSN   NOD ID GUAR AGCY
C 9       N 3    C 3     
15------- 24---- 27-------     
242293732 001    836           
242293732 001    836     
242293732 001    836         
378920533 001    836     
413963981 003    836


Anybody please help me how to get the required output.

Regards
R KARTHIK
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed May 14, 2008 12:38 pm
Reply with quote

You can use the below SYNCTOOL solution for your problem:

Code:
//**********************************************
//GETMATCH EXEC PGM=SYNCTOOL                   
//TOOLMSG  DD SYSOUT=*                         
//DFSMSG   DD SYSOUT=*                         
//IN       DD *                                 
310789954 004 836                               
312520249 002 836                               
312929875 002 836                               
325807809 003 836                               
325807809 002 836                               
242293732 001 836                               
242293732 001 836                               
242293732 001 836                               
242293732 001 836                               
346685284 001 836                               
378920533 001 836                               
378920533 001 836                               
413963981 003 836                               
413963981 003 836                               
433679765 004 836                           
/*                                           
//OUT      DD SYSOUT=*                                     
//TOOLIN   DD *                             
  SELECT FROM(IN) TO(OUT) ON(1,13,CH) ALLDUPS
/*                                           
//*                                         


OUT will contain the req o/p
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed May 14, 2008 1:03 pm
Reply with quote

Hi krisprems,

Thanks for ur immediate help.

It's working now.

Regards
R KARTHIK.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top