RE: [U2] Is there a better way?

2004-05-10 Thread rlsmith
No, testing it for myself is actually a good idea.

Of course there are always a large number of factors to be considered.

The only way a particular person will know how any method will work for
them on the system they are using is to test it for themselves.

The fact is I really don't have the time to do it right now.

I just thought if there was a definite answer out there someone on the
list might know it.

" I used to be an Optimist until I knocked over the glass. "

Randy Smith Programmer/Analyst
[EMAIL PROTECTED]
http://users.adelphia.net/~lee_crystal/
http://www.sopranoboy.com

Zaner Bloser
http://www.zaner-bloser.com






"Ross Ferris" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
05/09/2004 07:26 PM
Please respond to u2-users


To: <[EMAIL PROTECTED]>
        cc:
    Subject:    RE: [U2] Is there a better way?


This is where I would actually write a little test program myself &
measure which one is faster  loop for 100,000 with a timed loop. Has
the "art" of experimentation & testing been lost ?!?

Ross Ferris
Stamina Software
Visage  an Evolution in Software Development
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


RE: [U2] Is there a better way?

2004-05-09 Thread Ross Ferris
This is where I would actually write a little test program myself & measure which one 
is faster  loop for 100,000 with a timed loop. Has the "art" of experimentation & 
testing been lost ?!?

Ross Ferris
Stamina Software
Visage  an Evolution in Software Development


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:owner-u2-
>[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
>Sent: Friday, 7 May 2004 11:30 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [U2] Is there a better way?
>
>Since we are on this subject (Famous last words.)
>
>I was using a double loop to solve this problem before. (Using an until to
>stop once I find what I'm looking for.)
>
>My question is now is about speed?
>
>What is faster?
>
>A loop method or using FIND or FINDSTR?
>
>Do they both loop through an array to find a match?
>
>Is the only advantage using the FIND or FINDSTR is saving myself
>keystrokes?
>
>I'm just curious about this, it's not really a requirement.
>
>Thanks for all the info and help!!!
>
>" I used to be an Optimist until I knocked over the glass. "
>
>Randy Smith Programmer/Analyst
>[EMAIL PROTECTED]
>http://users.adelphia.net/~lee_crystal/
>http://www.sopranoboy.com
>
>Zaner Bloser
>http://www.zaner-bloser.com
>---
>u2-users mailing list
>[EMAIL PROTECTED]
>http://www.u2ug.org/listinfo/u2-users
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.678 / Virus Database: 440 - Release Date: 6/05/2004
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.678 / Virus Database: 440 - Release Date: 6/05/2004
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


Re: [U2] Is there a better way?

2004-05-09 Thread CWNoah2
Randy,

An optimist says the glass is half full, a pessimist says it is half empty. 
The good Scotsman, however, seeing that the glass contains a particularly good 
scotch, picks it up, drains it, and says "Aye, lad, th' glass is empty! Fill 
it again, would you?"

I know, Jerry, move it to U2-community.  ;^)

Regards from a member of clan MacGregor,
Charlie Noah

[EMAIL PROTECTED] writes:

Thanks for all the info and help!!!

" I used to be an Optimist until I knocked over the glass. "

Randy Smith Programmer/Analyst
[EMAIL PROTECTED]
http://users.adelphia.net/~lee_crystal/
http://www.sopranoboy.com
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


Re: [U2] Is there a better way?

2004-05-07 Thread Stewart Leicester
I was using a double loop to solve this problem before. (Using an until to
stop once I find what I'm looking for.)
My question is now is about speed?

What is faster?

A loop method or using FIND or FINDSTR?

Do they both loop through an array to find a match?

Is the only advantage using the FIND or FINDSTR is saving myself
keystrokes?
I'm just curious about this, it's not really a requirement.

Thanks for all the info and help!!!

" I used to be an Optimist until I knocked over the glass. "

Randy Smith Programmer/Analyst


FIND and FINDSTR were designed to be much faster: they make a single 
pass across the string rather than performing an extract on the 
string once for each inner loop.

Assuming of course the Universe/Unidata implementations are roughly 
equivalent to the original implementation...

Suggestion: time it yourself and see :-)

Stewart
--
Stewart Leicester| http://www.ThreatFocus.com
V.P. Engineering | mailto:[EMAIL PROTECTED]
Threat Focus, Inc.   | 925-551-0130 Voice
"Knowledge is your best defense" | 509-695-1373 Fax
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


Re: [U2] Is there a better way?

2004-05-07 Thread rlsmith
Since we are on this subject (Famous last words.)

I was using a double loop to solve this problem before. (Using an until to 
stop once I find what I'm looking for.)

My question is now is about speed?

What is faster?

A loop method or using FIND or FINDSTR?

Do they both loop through an array to find a match?

Is the only advantage using the FIND or FINDSTR is saving myself 
keystrokes?

I'm just curious about this, it's not really a requirement.

Thanks for all the info and help!!!

" I used to be an Optimist until I knocked over the glass. "

Randy Smith Programmer/Analyst
[EMAIL PROTECTED]
http://users.adelphia.net/~lee_crystal/
http://www.sopranoboy.com

Zaner Bloser
http://www.zaner-bloser.com
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


Re: [U2] Is there a better way?

2004-05-06 Thread Ray Wurlod
Use FIND rather than LOCATE for a whole-of-element search, or FINDSTR for a 
partial-element search.

- Original Message -
From: [EMAIL PROTECTED]
Date: Thu, 6 May 2004 09:26:10 -0400
To: [EMAIL PROTECTED]
Subject: [U2] Is there a better way?

> I've got an attribute with value marks and sub-value marks.
> 
> Is there a way that I can do a locate for a value that will give me both 
> the value mark and sub-value make values in universe basic code.
> 
> LIST<1> = "A":@SVM:"B":@SVM:"C":@VM:"D":@SVM:"E":@SVM:"F"
> 
> If I want to find "D" I would like something to tell me it's location can 
> be found at LIST<1,2,1> ( VM = 2, SVM = 1) so I can quickly reference it.
> 
> Is this possible?
> 
> Thanks for any pointers. :)
> 
> " I used to be an Optimist until I knocked over the glass. "
> 
> Randy Smith Programmer/Analyst
> [EMAIL PROTECTED]
> http://users.adelphia.net/~lee_crystal/
> http://www.sopranoboy.com
> 
> Zaner Bloser
> http://www.zaner-bloser.com
> ---
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.u2ug.org/listinfo/u2-users
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


Re: [U2] Is there a better way?

2004-05-06 Thread Mark Johnson
If I read the original post correctly it indicates that it is looking for
both the VM position and the SVM position.

I don't believe a single LOCATE can produce this as how would it represent
the 2 resulting values (VM position and the SVM position)?

Thus, knowing that the user is looking for a unique "D" in this multi-level
field, then the logic may be:

C=DCOUNT(LINE,CHAR(253))
SVM.POS=0
FOR MV.POS = 1 TO C
  LOCATE "D" IN LINE<1,MV.POS> SETTING SVM.POS THEN EXIT
NEXT MV.POS
IF SVM.POS=0 THEN STOP "VALUE NOT FOUND"

my 1 cent

- Original Message -
From: "Piers Angliss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 06, 2004 10:23 AM
Subject: RE: [U2] Is there a better way?


> > I've got an attribute with value marks and sub-value marks.
>
> > Is there a way that I can do a locate for a value that will give me both
> > the value mark and sub-value make values in universe basic code.
>
> Use FINDSTR (see on-line HELP, both UV and UD)
>
> hth
>
> Piers
> ---
> u2-users mailing list
> [EMAIL PROTECTED]
> http://www.u2ug.org/listinfo/u2-users
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


RE: [U2] Is there a better way?

2004-05-06 Thread Piers Angliss
> I've got an attribute with value marks and sub-value marks.

> Is there a way that I can do a locate for a value that will give me both
> the value mark and sub-value make values in universe basic code.

Use FINDSTR (see on-line HELP, both UV and UD)

hth

Piers
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


RE: [U2] Is there a better way?

2004-05-06 Thread Dean.Armbruster
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> [EMAIL PROTECTED]
> Sent: Thursday, May 06, 2004 9:26 AM
> To: [EMAIL PROTECTED]
> Subject: [U2] Is there a better way?
> 
> 
> I've got an attribute with value marks and sub-value marks.
> 
> Is there a way that I can do a locate for a value that will 
> give me both 
> the value mark and sub-value make values in universe basic code.
> 
> LIST<1> = "A":@SVM:"B":@SVM:"C":@VM:"D":@SVM:"E":@SVM:"F"
> 
> If I want to find "D" I would like something to tell me it's 
> location can 
> be found at LIST<1,2,1> ( VM = 2, SVM = 1) so I can quickly 
> reference it.
> 
> Is this possible?
> 
> Thanks for any pointers. :)


FIND, or FINDSTR if you only need a partial match.

You're welcome.
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


RE: [U2] Is there a better way?

2004-05-06 Thread Grant.Boice
Randy,

If you are using UniBasic, there is a UniBasic command call FIND, that will do this 
job.  If I remember correctly, I believe UniVerse has the same command, also.

FIND is very similar to LOCATE.

Hope this helps!

Grant W. Boice, Jr.
Systems Administrator
Benchmark Electronics, Inc.
Manassas Division
8500 Phoenix Drive
Manassas, VA  20110
 
Phone:  (703) 334-0156
Email:   [EMAIL PROTECTED]  
Web:www.bench.com  
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 06, 2004 9:26 AM
To: [EMAIL PROTECTED]
Subject: [U2] Is there a better way?


I've got an attribute with value marks and sub-value marks.

Is there a way that I can do a locate for a value that will give me both 
the value mark and sub-value make values in universe basic code.

LIST<1> = "A":@SVM:"B":@SVM:"C":@VM:"D":@SVM:"E":@SVM:"F"

If I want to find "D" I would like something to tell me it's location can 
be found at LIST<1,2,1> ( VM = 2, SVM = 1) so I can quickly reference it.

Is this possible?

Thanks for any pointers. :)

" I used to be an Optimist until I knocked over the glass. "

Randy Smith Programmer/Analyst
[EMAIL PROTECTED]
http://users.adelphia.net/~lee_crystal/
http://www.sopranoboy.com

Zaner Bloser
http://www.zaner-bloser.com
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users
---
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users