Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
extract the records for the repeating value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
murugan_mf

New User


Joined: 31 Jan 2008
Posts: 38
Location: Chennai, India

PostPosted: Wed Aug 20, 2008 9:48 pm    Post subject: extract the records for the repeating value
Reply with quote

Hi,
I have 2 element (First field Second field) in a file which are as below

Code:
A1  B
A2  B
A3  B
H1  C
F1  D
F2  D
F3  D
F4  D


I need the output as

Code:
A1
A2
A3
F1
F2
F3
F4

I need the output only if the second value/records is repeated more than 1 time.
The file is sorted by the second field.
RECFM = FB
LRECL = 17
First Field length is 5 which is followed by single space
Second Field length is 11
Back to top
View user's profile Send private message
References
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 706
Location: Chennai, India

PostPosted: Wed Aug 20, 2008 10:43 pm    Post subject:
Reply with quote

Murugan,

Can you try the below ICETOOL job?

Code:
//STEP00   EXEC PGM=ICETOOL                           
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//IN       DD *                                       
A1    B                                               
A2    B                                               
A3    B                                               
H1    C                                               
F1    D                                               
F2    D                                               
F3    D                                               
F4    D                                               
//OUT      DD SYSOUT=*                                 
//TOOLIN   DD *                                       
SELECT FROM(IN) TO(OUT) ON(7,11,CH) ALLDUPS USING(CTL1)
//CTL1CNTL DD *                                       
  OUTFIL FNAMES=OUT,BUILD=(1,5)                                   


OUT
Code:
A1
A2
A3
F1
F2
F3
F4


Thanks,
Arun
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1