|
View previous topic :: View next topic
|
| Author |
Message |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Hi to all.
I'd like to know if there is a way to define the separator using the SS format.
I mean: with a simple "search" as:
| Code: |
| INCLUDE COND=(1,30,SS,EQ,C'AAA') |
dfsort work fine but with two item in the constant field as:
| Code: |
| INCLUDE COND=(1,30,SS,EQ,C'AAA,BBB') |
it will not work as expected because comma(for what I've understood) is part of the string and not properly a separator.
Is there a solution? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I think you're misunderstanding how SS works.
When the field length is larger than the string length, as in your example, DFSORT looks for the string within the field, so it will look for C'AAA,BBB'. If you want to look for AAA or BBB in a larger field, then you have to use:
| Code: |
1,30,SS,EQ,C'AAA',OR,1,30,SS,EQ,C'BBB'
|
When the field length is smaller than the string, as in this example:
| Code: |
1,3,SS,EQ,C'AAA,BBB'
|
DFSORT will check each constant of the specified length against the field. So in this case, DFSORT would check 1-3 for 'AAA', 'AA,', 'A,B', and so on.
You can use any separator or separators you like. Just pick one that won't be found in combination with the strings you're looking for.
For example, if C'AAA,BBB' is a problem because you might have 'AA,' or 'A,B' or ',BB' in 1-3, then you could use C'AAA.BBB' or C'AAA/BBB' or whatever character won't be found. |
|
| Back to top |
|
 |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
First of all, happy new year Mr. Frank.
Then, I want to specify that I read much about SS but as usual I'm not able to explain my concept.
What you say is right but I don't know if my concept is only a my need or general because what I'm trying to say is that the SS format in DFSORT is a really powerful solution but not implemented at its top(it's only a my opinion) because the comma may be a separator that allow OR logic operator for the same fields. I mean: these are two sample of what I'm trying to say:
| Code: |
| 1,10,SS,EQ,C'AAA',1,10,SS,EQ,C'BBB' |
may be the same of:
| Code: |
| 1,10,SS,EQ,C'AAA,BBB' *with comma(or custom char) as separator |
For what I know, if this scenario is true:
| Code: |
| 1,3.SS,EQ,C'AAA,BBB' = 1,3,SS,EQ,C'AAA',OR,1,3,SS,EQ,C'BBB' |
the above may be true too(but it's only a my opinion).
I hope in your patience to interpret my idea. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| I'm not able to explain my concept |
I'm not sure I understand what you're saying or asking. I've explained how SS currently works for the two cases, and the book explains it in more detail.
Are you asking to be able to do the equivalent of:
1,10,SS,EQ,C'ABC',OR,1,10,SS,EQ,C'DEF',OR,1,10,SS,EQ,C'GHI'
with a new construct like:
1,10,NW,EQ,C'ABC,DEF,GHI'
where comma would be considered a separator and we would search for ABC or DEF or GHI within 1-10? In that case, the actual separator character would be important and would have to be user controlled. But what I'm saying is the separator character doesn't matter with the SS construct using ORs which is currently available and works fine. |
|
| Back to top |
|
 |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Thanks.
I hope you understand that my question was not a critic, I'm doing many works faster only thanks to the power of Sort and my custom and I we are really,really happy.
But yes, I suppose that finally I'm looking for a way to have a new construct that allow "separator" controlled externally. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Ok, I'll add that to the list of candidates for future enhancements to DFSORT. But it's a long list.  |
|
| Back to top |
|
 |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
If it's only a my need I suppose that will be inserted at the end of that list.
Anyway, thanks for your effort. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|