Hi,
I have got a requirement to retrieve selective block of data from a file. Like to know if anyone have got an idea in doing this using SORT.
Input file format. Consists of one main Header(0000)
and another common header(0010) for all accounts(ABC, XYZ,IJK,YUI).
0000
0010
1000 ABC
1000
3000
3000
|
|
0010
1000 XYZ
2000
2000
3000
3000
|
|
0010
1000 IJK
2000
3000
3000
|
|
0010
1000 YUI
2000
3000
My other input file has keys XYZ and YUI. This is present in record with sub-header(1000)
So my end file should only copy blocks have XYZ and YUI. I tried WHEN=GROUP, but could not
get resultant output. Any help
OUTPUT FILE
-------------------
0010
1000 XYZ
2000
2000
3000
3000
|
|
0010
1000 YUI
2000
3000
Thanks in advance