Selecting Records based on a condition
Posted: Tue Oct 13, 2009 12:35 am
Hi,
Need help in DFSORT.
I/P File :- RECFM=VB and LRECL=5230. The following is the sample input file
col1 is an 10 char fixed length. This will be randomly generated.
col2 is a single char fixed length. The values for this field are either 1 or 2.
col1********* col2******
123456abcd 1
123456abcd 1
123456abcd 2
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 2
Now i am trying to generate a o/p file as suggested below. The condition is that i would need all those records who have both 1 and 2 in col2 in the file i.e.
col1********* col2******
123456abcd 1
123456abcd 1
123456abcd 2
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 2
The file paramters will remain the same i.e RECFM=VB and LRECL=5230
Need help in DFSORT.
I/P File :- RECFM=VB and LRECL=5230. The following is the sample input file
col1 is an 10 char fixed length. This will be randomly generated.
col2 is a single char fixed length. The values for this field are either 1 or 2.
col1********* col2******
123456abcd 1
123456abcd 1
123456abcd 2
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123456acde 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 2
Now i am trying to generate a o/p file as suggested below. The condition is that i would need all those records who have both 1 and 2 in col2 in the file i.e.
col1********* col2******
123456abcd 1
123456abcd 1
123456abcd 2
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 1
123789abcf 2
The file paramters will remain the same i.e RECFM=VB and LRECL=5230