murugan_mf
New User
Joined: 31 Jan 2008 Posts: 38 Location: Chennai, India
|
|
|
|
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 |
|
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 706 Location: Chennai, India
|
|
|
|
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 |
|