View previous topic :: View next topic
|
Author |
Message |
lee_issc
New User
Joined: 11 Dec 2008 Posts: 33 Location: China
|
|
|
|
Hi Guys,
I have a QSAM file like below: 9 bytes field1 + other fileds
111111111+rec1
111111111+rec2
111111111+rec3
222222222+rec21
333333333+rec31
333333333+rec32
333333333+rec33
333333333+rec34
333333333+rec35
Now I want to select all records whose fields 1 occurs more than two times. for example, records 1 and 2 and 3 occurs 3 times on the fileds 1, so it will be output.
111111111+rec1
111111111+rec2
111111111+rec3
333333333+rec31
333333333+rec32
333333333+rec33
333333333+rec34
333333333+rec35
may I know can we use ICETOOL for this purpose? thanks! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes, please feel free to use ICETOOL fo this and any other purpose to which it is well-suited. You don't need to ask permission.
How do you find out what it is useful for? There is a manual, and each of the ICETOOL operators is listed. At the very least know where to find what is available. Then read the first few paragraphs. Then look at the examples at the end of each operator. Also look at the Smart DFSORT Tricks publication.
Then, when you get stuck with something difficult, you know the types of places to come to. |
|
Back to top |
|
|
lee_issc
New User
Joined: 11 Dec 2008 Posts: 33 Location: China
|
|
|
|
Bill Woodger wrote: |
Yes, please feel free to use ICETOOL fo this and any other purpose to which it is well-suited. You don't need to ask permission.
How do you find out what it is useful for? There is a manual, and each of the ICETOOL operators is listed. At the very least know where to find what is available. Then read the first few paragraphs. Then look at the examples at the end of each operator. Also look at the Smart DFSORT Tricks publication.
Then, when you get stuck with something difficult, you know the types of places to come to. |
may I have any key words or operator of ICETOOL to use?OCCURS or COUNT? but they use to generate a report I think |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Mmmm.... language barrier maybe.
Look at OCCURS in the documentation. Look at COUNT. Do they do what you want? Then you can stop thinking what they are used for and know.
Then continue your reading.
I know you want everything just here, but you'll pick up more this way.
Quote: |
Now I want to select all records whose fields 1 occurs more than two times. for example, records 1 and 2 and 3 occurs 3 times on the fileds 1, so it will be output. |
So, bear what you want in mind, and do what I suggested previously. Say to yourself "I want to select, I want to select, I want to select" whilst going through the list of operators. It'll help. |
|
Back to top |
|
|
|