[Fwd: Re: [U2] [UV] Select Question]

2005-07-27 Thread Moderator
 Original Message 
Subject:Re: [U2] [UV] Select Question
Date:   Mon, 25 Jul 2005 21:23:44 -0400
From:   Moderator <[EMAIL PROTECTED]>
Reply-To:   u2-users@listserver.u2ug.org
To: u2-users@listserver.u2ug.org



THREAD CLOSED.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-27 Thread Charlie Rubeor
If you really want to debate the issue, contact either Ian Sandler or 
Harvey Rodstein.  The syntax came from one of their books.

Personally, I'm looking into the future and seeing a "THREAD CLOSED" 
message from the moderator.

Charlie Rubeor
Unix/Database Admin
The Wiremold Company
800.338.1315 x3498
860.523.3690 fax

[EMAIL PROTECTED] wrote on 07/27/2005 11:48:14 AM:

> In a message dated 7/25/2005 11:38:53 AM Pacific Daylight Time, 
> [EMAIL PROTECTED] writes:
> 
> 
> > The distinction with using an EOF variable is that it is not 
referenced, 
> > until the next READNEXT.  Each new variable that is read into memory 
will 
> > push the EOF variable further to the back.  This definitely caused 
frame 
> > faults (I think that's what they were called) on Advanced Pick.  On 
either 
> > U2 systems or on properly built systems, I doubt it makes a bit of 
> > difference, it might even slow things down.
> 
> Charlie this is not correct.  The map location of the variables is 
determined 
> at compile time and not moved after that point.  You can confirm this 
for 
> yourself by looking at the variable map table.  So if the location 
mapped for 
> your EOF variable is 0080 that will not change no matter what the 
program 
> RUN-time engine does.
> Will Johnson
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-27 Thread FFT2001
In a message dated 7/25/2005 11:38:53 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:


> The distinction with using an EOF variable is that it is not referenced, 
> until the next READNEXT.  Each new variable that is read into memory will 
> push the EOF variable further to the back.  This definitely caused frame 
> faults (I think that's what they were called) on Advanced Pick.  On either 
> U2 systems or on properly built systems, I doubt it makes a bit of 
> difference, it might even slow things down.

Charlie this is not correct.  The map location of the variables is determined 
at compile time and not moved after that point.  You can confirm this for 
yourself by looking at the variable map table.  So if the location mapped for 
your EOF variable is 0080 that will not change no matter what the program 
RUN-time engine does.
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Moderator

THREAD CLOSED.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Stewart Leicester

Is not 'muscle-memory' phrases what makes for being an effecient programmer.
I can knock off a 5 field file maintenance program in around 10 minutes
without even 'thinking'. No 4gl's or other magic programming need apply.
Just pure code.
my 1 cent

 >

 I certainly identify with muscle-memory phrases so if what you do is
 clear and works, more power to you. :-)


 > Stewart


I was agreeing muscle-memory is effective as long as what comes from 
it works and is maintainable.


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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Mark Johnson
Is not 'muscle-memory' phrases what makes for being an effecient programmer.
I can knock off a 5 field file maintenance program in around 10 minutes
without even 'thinking'. No 4gl's or other magic programming need apply.
Just pure code.
my 1 cent

- Original Message -
From: "Stewart Leicester" <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 25, 2005 6:12 PM
Subject: Re: [U2] [UV] Select Question


> >  > I challenge whatever book made this contention.
> >>
> >
> >Knock yourself out.  I think it's in "Pick For Professionals: Advanced
> >Methods & Techniques." by Harvey Rodstein.  All I was trying to do was
> >explain where the syntax ELSE ID = @AM originated from.  We've already
> >spent more time discussing the theory than it's currently worth.
> >
> >Charlie Rubeor
>
> It's wrong about it being any faster. But OTOH it's no slower either.
>
> I certainly identify with muscle-memory phrases so if what you do is
> clear and works, more power to you. :-)
>
> 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
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Mark Johnson
We're beating a dead horse. I offered this method around 200 posts or 10
days ago.
Mark Johnson
- Original Message -
From: <[EMAIL PROTECTED]>
To: 
Sent: Monday, July 25, 2005 12:17 PM
Subject: RE: [U2] [UV] Select Question


> I can NAME THAT TUNE in *** 2 *** notes:
>
> LOOP WHILE READNEXT ID DO
>blah blah blah
> REPEAT
>
> ;)
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
> Sent: Monday, July 25, 2005 10:59 AM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] [UV] Select Question
>
> > > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > > >But why do you use an odd convention like ID = @AM ?
> > >
> > > because it would be impossible for ID to be an attribute mark via
> > > readnext.
> > > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > > have
> > > happened.
>
> Of course, in most programs it might be clearer to write
>
> LOOP
>READNEXT ID FROM LIST ELSE EXIT
>blah blah blah
> REPEAT
>
> rather than testing a amgic valid of ID.
>
>
> Martin Phillips
> Ladybridge Systems
> 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
> +44-(0)1604-709200
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Stewart Leicester

 > I challenge whatever book made this contention.




Knock yourself out.  I think it's in "Pick For Professionals: Advanced
Methods & Techniques." by Harvey Rodstein.  All I was trying to do was
explain where the syntax ELSE ID = @AM originated from.  We've already
spent more time discussing the theory than it's currently worth.

Charlie Rubeor


It's wrong about it being any faster. But OTOH it's no slower either.

I certainly identify with muscle-memory phrases so if what you do is 
clear and works, more power to you. :-)


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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Allen E. Elwood
At the suggestion of an anonymous source I did, and it compiled, but gives
an unassigned variable error during execution.  Oh well.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 13:50
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


Did you try using DO:

LOOP WHILE READNEXT ID DO



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allen E. Elwood
Sent: Monday, July 25, 2005 4:29 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question

I also work on a PICK system that doesn't have EXIT, and while I had
hoped that this would work there, it doesn't compile saying the LOOP
stmt is invalid

   :(

PERFORM 'SELECT ORDER.BACK'
LOOP WHILE READNEXT ID
  PRINT ID:;INPUT WAIT
REPEAT
STOP

Ah shucks..

It did work nicely on Unidata though :) -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gerry-u2ug
Sent: Monday, July 25, 2005 13:03
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


loop while readnext ID
   blah blah blah
repeat


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 12:18 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


I can NAME THAT TUNE in *** 2 *** notes:

LOOP WHILE READNEXT ID DO
   blah blah blah
REPEAT

;)



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Monday, July 25, 2005 10:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question

> > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > >But why do you use an odd convention like ID = @AM ?
> >
> > because it would be impossible for ID to be an attribute mark via
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Charlie Rubeor
> I challenge whatever book made this contention.
>

Knock yourself out.  I think it's in "Pick For Professionals: Advanced 
Methods & Techniques." by Harvey Rodstein.  All I was trying to do was 
explain where the syntax ELSE ID = @AM originated from.  We've already 
spent more time discussing the theory than it's currently worth.

Charlie Rubeor
Unix/Database Admin
The Wiremold Company
800.338.1315 x3498
860.523.3690 fax
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Karen.BESSEL
Did you try using DO:

LOOP WHILE READNEXT ID DO

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allen E. Elwood
Sent: Monday, July 25, 2005 4:29 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question

I also work on a PICK system that doesn't have EXIT, and while I had
hoped that this would work there, it doesn't compile saying the LOOP
stmt is invalid

   :(

PERFORM 'SELECT ORDER.BACK'
LOOP WHILE READNEXT ID
  PRINT ID:;INPUT WAIT
REPEAT
STOP

Ah shucks..

It did work nicely on Unidata though :) -Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gerry-u2ug
Sent: Monday, July 25, 2005 13:03
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


loop while readnext ID
   blah blah blah
repeat


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 12:18 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


I can NAME THAT TUNE in *** 2 *** notes:

LOOP WHILE READNEXT ID DO
   blah blah blah
REPEAT

;)



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Monday, July 25, 2005 10:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question

> > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > >But why do you use an odd convention like ID = @AM ?
> >
> > because it would be impossible for ID to be an attribute mark via 
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have 
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Allen E. Elwood
I also work on a PICK system that doesn't have EXIT, and while I had hoped
that this would work there, it doesn't compile saying the LOOP stmt is
invalid

   :(

PERFORM 'SELECT ORDER.BACK'
LOOP WHILE READNEXT ID
  PRINT ID:;INPUT WAIT
REPEAT
STOP

Ah shucks..

It did work nicely on Unidata though :)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gerry-u2ug
Sent: Monday, July 25, 2005 13:03
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


loop while readnext ID
   blah blah blah
repeat


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 12:18 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


I can NAME THAT TUNE in *** 2 *** notes:

LOOP WHILE READNEXT ID DO
   blah blah blah
REPEAT

;)



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Monday, July 25, 2005 10:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question

> > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > >But why do you use an odd convention like ID = @AM ?
> >
> > because it would be impossible for ID to be an attribute mark via
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Stewart Leicester

 The more important problem is that the variables are all mapped into a
 contiguous workspace that is referenced so continously that it's
 highly unlikely it
 would ever get paged from memory, while your process is running, except
 perhaps on systems that were so woefully underbuilt that paging
 BASIC variables
 would be the least of your problems.



The distinction with using an EOF variable is that it is not referenced,
until the next READNEXT.  Each new variable that is read into memory will
push the EOF variable further to the back.  This definitely caused frame
faults (I think that's what they were called) on Advanced Pick.  On either
U2 systems or on properly built systems, I doubt it makes a bit of
difference, it might even slow things down.


Charlie Rubeor


I challenge whatever book made this contention. In the original Pick 
architecture variable descriptors are 10 bytes each and live together 
in groups of 50 or more (as was alluded to above). Since the EOF is a 
single character it would fit in the descriptor itself. In order for 
the EOF variable to be "swapped out" of memory for lack of reference, 
all other variables whose descriptors live in the same frame as the 
EOF variable would have to be unreferenced for the same period of 
time -- highly unlikely.


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
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread gerry-u2ug
loop while readnext ID
   blah blah blah
repeat


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 12:18 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


I can NAME THAT TUNE in *** 2 *** notes:

LOOP WHILE READNEXT ID DO
   blah blah blah
REPEAT

;)

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Monday, July 25, 2005 10:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question

> > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > >But why do you use an odd convention like ID = @AM ?
> > 
> > because it would be impossible for ID to be an attribute mark via 
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have 
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Charlie Rubeor
> There are a few problems with this theory.  @AM is only a typical 
component 
> of U2 systems and so would not, most likely, have been included in 
> the Advanced 

@AM might not have been available then, but EQUATE was.  Most programs 
written before @AM was available usually equated the delimiters (FM, AM, 
VM, SVM, etc) whether you used them or not.  Your fingers just typed in 
the EQUATE statements, even if your brain was not working.

> The more important problem is that the variables are all mapped into a 
> contiguous workspace that is referenced so continously that it's 
> highly unlikely it 
> would ever get paged from memory, while your process is running, except 
> perhaps on systems that were so woefully underbuilt that paging 
> BASIC variables 
> would be the least of your problems.
> 

The distinction with using an EOF variable is that it is not referenced, 
until the next READNEXT.  Each new variable that is read into memory will 
push the EOF variable further to the back.  This definitely caused frame 
faults (I think that's what they were called) on Advanced Pick.  On either 
U2 systems or on properly built systems, I doubt it makes a bit of 
difference, it might even slow things down.

Also, I'm not sure which book this was in.  Wasn't there a book called 
"Pick for Professionals", by Harvey Rodstein?  It might have been in that 
one.

Charlie Rubeor
Unix/Database Admin
The Wiremold Company
800.338.1315 x3498
860.523.3690 fax
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread FFT2001
In a message dated 7/25/2005 9:46:28 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:


> Just phrase it as "I do things in a way that is safe, based on long 
> experience, and consistent." Suddenly, it sounds downright conservative.

I like that.
How about also this tact
1) Do it my way, and I can fix your errors.
2) Do it your way, and I'll be calling you at 2am to fix your own errors.

Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread FFT2001
In a message dated 7/25/2005 7:25:53 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:


> I started to use this syntax (ELSE ID = @AM) several years ago.  It 
> originated, I think, from the "Advanced Pick Programming" book, circa 
> 1990.  The theory went that if you used a separate variable, usually EOF, 
> in the ELSE clause, the variable would get forced out of memory and would 
> have to be read back in from disk for each subsequent READNEXT.  The 
> attribute mark, on the other hand, was usually equated.  On the systems of 
> that time, this resulted in a fairly big improvement in larger programs. 
> In small programs, where everything fit into memory, this would not 
> provide any benefit.

There are a few problems with this theory.  @AM is only a typical component 
of U2 systems and so would not, most likely, have been included in the Advanced 
Pick Programming book that was writen using generic code that would run 
acrost all platforms.  I'll have to check my copy later today as I'm not at my 
office just now.

The more important problem is that the variables are all mapped into a 
contiguous workspace that is referenced so continously that it's highly 
unlikely it 
would ever get paged from memory, while your process is running, except 
perhaps on systems that were so woefully underbuilt that paging BASIC variables 
would be the least of your problems.

The main argument against it, is that it's not as clear as using True and 
False, which are nearly universally understood concepts in programming.  Coding 
simply, means less learning curve for your new programmers.  I have headed a 
few programming departments, and in my opinion, in the contest between getting 
programmers up-to-speed, and getting the machine to run as efficient as 
possible; the programmers have to win every time.  

That's my three cents.
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Key Ally

Marilyn,
   Just phrase it as "I do things in a way that is safe, based on long 
experience, and consistent." Suddenly, it sounds downright conservative.


   - Chuck "Talk Like a Radical, Think Like a Liberal, Act like a 
Conservative" Barouch


Marilyn Hilb wrote:


Quote: "These days, I still use the syntax because I my fingers can type it from 
memory, without my brain actually working."

I Love that statement. A non-programmer just wouldn't understand and would likely cause fear in them .. especially the bosses.. to know this is part of a programmers inner workings. 

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Karen.BESSEL
I can NAME THAT TUNE in *** 2 *** notes:

LOOP WHILE READNEXT ID DO
   blah blah blah
REPEAT

;)

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin Phillips
Sent: Monday, July 25, 2005 10:59 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question

> > > >> READNEXT ID FROM LIST ELSE ID = @AM
> > > >But why do you use an odd convention like ID = @AM ?
> > 
> > because it would be impossible for ID to be an attribute mark via 
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have 
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Marilyn Hilb
Quote: "These days, I still use the syntax because I my fingers can type it 
from memory, without my brain actually working."

I Love that statement. A non-programmer just wouldn't understand and would 
likely cause fear in them .. especially the bosses.. to know this is part of a 
programmers inner workings. 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-25 Thread Martin Phillips
> > > >> READNEXT ID FROM LIST ELSE ID = @AM 
> > > >But why do you use an odd convention like ID = @AM ?
> > 
> > because it would be impossible for ID to be an attribute mark via
> > readnext.
> > If you later test for ([EMAIL PROTECTED]) there's only one way that could 
> > have
> > happened.

Of course, in most programs it might be clearer to write

LOOP
   READNEXT ID FROM LIST ELSE EXIT
   blah blah blah
REPEAT

rather than testing a amgic valid of ID.


Martin Phillips
Ladybridge Systems
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB
+44-(0)1604-709200
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-25 Thread Charlie Rubeor
[EMAIL PROTECTED] wrote on 07/22/2005 10:08:02 PM:

> > >> READNEXT ID FROM LIST ELSE ID = @AM 
> > >But why do you use an odd convention like ID = @AM ?
> 
> because it would be impossible for ID to be an attribute mark via
> readnext.
> If you later test for ([EMAIL PROTECTED]) there's only one way that could have
> happened.
> 

I started to use this syntax (ELSE ID = @AM) several years ago.  It 
originated, I think, from the "Advanced Pick Programming" book, circa 
1990.  The theory went that if you used a separate variable, usually EOF, 
in the ELSE clause, the variable would get forced out of memory and would 
have to be read back in from disk for each subsequent READNEXT.  The 
attribute mark, on the other hand, was usually equated.  On the systems of 
that time, this resulted in a fairly big improvement in larger programs. 
In small programs, where everything fit into memory, this would not 
provide any benefit.

These days, I still use the syntax because I my fingers can type it from 
memory, without my brain actually working.

Charlie Rubeor
Unix/Database Admin
The Wiremold Company
800.338.1315 x3498
860.523.3690 fax
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-22 Thread Stevenson, Charles
> >> READNEXT ID FROM LIST ELSE ID = @AM 
> >But why do you use an odd convention like ID = @AM ?

because it would be impossible for ID to be an attribute mark via
readnext.
If you later test for ([EMAIL PROTECTED]) there's only one way that could have
happened.

I'll admit to occasionally doing similar things:

   READ REC ... ELSE REC = @IM  ;* something impossible.

or
   LAST.BREAKDAT = @AM ; * init to something impossible
   LOOP
 ...
 BREAKDAT = REC< 10 >
 IF BREAKDAT = LAST.BREAKAT THEN
GOSUB INCREMENT.TOTALS
 END ELSE
GOSUB BREAKPOINT
LAST.BREAKDAT = BREAKDAT
 END
 ...
   REPEAT


But with readnext I do prefer to dispense with flags and extra coding
   LOOP WHILE READNEXT ID
  . . .
   REPEAT

I believe any statement that has THEN & ELSE clauses can be used this
way.
E.g.:
   LOOP WHILE READSEQ LINE FROM F
 . . .
   REPEAT

cds
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-22 Thread Allen E. Elwood
Cute!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gerry-u2ug
Sent: Friday, July 22, 2005 15:11
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


LOOP while READNEXT ID
  GOSUB DO.STUFF
REPEAT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Allen E. Elwood
Sent: Friday, July 22, 2005 05:34 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


Why even have an exit variable, when EXIT works great?

LOOP
  READNEXT ID ELSE EXIT
  GOSUB DO.STUFF
REPEAT

Nice and clean and simple.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Anthony W.
Youngman
Sent: Friday, July 22, 2005 13:37
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes
>In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time,
>[EMAIL PROTECTED] writes:
>
>
>> SELECT FILE TO LIST
>> LOOP
>> READNEXT ID FROM LIST ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>>
>> SELECT FILE
>> LOOP
>> READNEXT ID ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>
>I agree that I don't see any extra overhead.
>But why do you use an odd convention like ID = @AM ?
>In this small loop it's probably apparent what you're doing but if the
>distance between the LOOP and the UNTIL were large enough I dare say you'd
be adding
>confusion to the mix for any future programmer.
>
>What I do is
>DONE = @FALSE
>LOOP
>   READNEXT ID ELSE DONE = @TRUE
>UNTIL DONE DO REPEAT
>
>I think DONE is a more clear-cut variable usage rather than setting ID to
@AM
>personally.  Just my opinion.

Until someone puts a GOSUB in and corrupts your DONE variable. You're
far less likely to corrupt ID because you're more likely to be using it.

Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source
Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-22 Thread gerry-u2ug
LOOP while READNEXT ID
  GOSUB DO.STUFF
REPEAT

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Allen E. Elwood
Sent: Friday, July 22, 2005 05:34 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] [UV] Select Question


Why even have an exit variable, when EXIT works great?

LOOP
  READNEXT ID ELSE EXIT
  GOSUB DO.STUFF
REPEAT

Nice and clean and simple.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Anthony W.
Youngman
Sent: Friday, July 22, 2005 13:37
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes
>In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time,
>[EMAIL PROTECTED] writes:
>
>
>> SELECT FILE TO LIST
>> LOOP
>> READNEXT ID FROM LIST ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>>
>> SELECT FILE
>> LOOP
>> READNEXT ID ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>
>I agree that I don't see any extra overhead.
>But why do you use an odd convention like ID = @AM ?
>In this small loop it's probably apparent what you're doing but if the
>distance between the LOOP and the UNTIL were large enough I dare say you'd
be adding
>confusion to the mix for any future programmer.
>
>What I do is
>DONE = @FALSE
>LOOP
>   READNEXT ID ELSE DONE = @TRUE
>UNTIL DONE DO REPEAT
>
>I think DONE is a more clear-cut variable usage rather than setting ID to
@AM
>personally.  Just my opinion.

Until someone puts a GOSUB in and corrupts your DONE variable. You're
far less likely to corrupt ID because you're more likely to be using it.

Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source
Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-22 Thread Allen E. Elwood
Why even have an exit variable, when EXIT works great?

LOOP
  READNEXT ID ELSE EXIT
  GOSUB DO.STUFF
REPEAT

Nice and clean and simple.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Anthony W.
Youngman
Sent: Friday, July 22, 2005 13:37
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes
>In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time,
>[EMAIL PROTECTED] writes:
>
>
>> SELECT FILE TO LIST
>> LOOP
>> READNEXT ID FROM LIST ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>>
>> SELECT FILE
>> LOOP
>> READNEXT ID ELSE ID = @AM
>> UNTIL ID = @AM DO
>> REPEAT
>
>I agree that I don't see any extra overhead.
>But why do you use an odd convention like ID = @AM ?
>In this small loop it's probably apparent what you're doing but if the
>distance between the LOOP and the UNTIL were large enough I dare say you'd
be adding
>confusion to the mix for any future programmer.
>
>What I do is
>DONE = @FALSE
>LOOP
>   READNEXT ID ELSE DONE = @TRUE
>UNTIL DONE DO REPEAT
>
>I think DONE is a more clear-cut variable usage rather than setting ID to
@AM
>personally.  Just my opinion.

Until someone puts a GOSUB in and corrupts your DONE variable. You're
far less likely to corrupt ID because you're more likely to be using it.

Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source
Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-22 Thread Anthony W. Youngman

In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes

In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time,
[EMAIL PROTECTED] writes:



SELECT FILE TO LIST
LOOP
READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT


I agree that I don't see any extra overhead.
But why do you use an odd convention like ID = @AM ?
In this small loop it's probably apparent what you're doing but if the
distance between the LOOP and the UNTIL were large enough I dare say you'd be 
adding
confusion to the mix for any future programmer.

What I do is
DONE = @FALSE
LOOP
  READNEXT ID ELSE DONE = @TRUE
UNTIL DONE DO REPEAT

I think DONE is a more clear-cut variable usage rather than setting ID to @AM
personally.  Just my opinion.


Until someone puts a GOSUB in and corrupts your DONE variable. You're 
far less likely to corrupt ID because you're more likely to be using it.


Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site -  Open Source Pick
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-21 Thread Richard Taylor
Well,  I will admit that I have rarely used the SELECT filevar TO LIST
syntax so I can not pull out a specific example.  

However, I have seen several occurrences where SELECT filevar missed
records and when the syntax was changed to EXECUTE "SELECT filename" it
worked perfectly.  This has occurred on both Universe and UniData.

Rich Taylor | Senior Programmer/Analyst| VERTIS
250 W. Pratt Street | Baltimore, MD 21201
P 410.361.8688 | F 410.528.0319 
[EMAIL PROTECTED] | http://www.vertisinc.com
 
Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.
 
"The more they complicate the plumbing
  the easier it is to stop up the drain"
 
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] writes:
> 
> << There can be a major problem with the second syntax depending on what
> you
>  are doing to the file.  The SELECT filevar syntax does not create a
> select
>  list even in memory.  It traverses each group in order as you perform
the
>  readnext command keeping a pointer to where it left off.  >>
> 
> It's my belief that both methods work the same way in this regard.
> Did you test to see that it actually traverses the entire file once to
> build
> LIST ?
> I'm not sure that's the case, but I might be wrong.
> Will Johnson
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-15 Thread FFT2001
In a message dated 7/14/05 11:21:14 AM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:

<< There can be a major problem with the second syntax depending on what you
 are doing to the file.  The SELECT filevar syntax does not create a select
 list even in memory.  It traverses each group in order as you perform the
 readnext command keeping a pointer to where it left off.  >>

It's my belief that both methods work the same way in this regard.
Did you test to see that it actually traverses the entire file once to build 
LIST ?
I'm not sure that's the case, but I might be wrong.
Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-15 Thread iggchamp
Agreed.  I only do this only very small utility routines that I need to get 
done in 10 minutes or so.

-- Original message -- 

> In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time, 
> [EMAIL PROTECTED] writes: 
> 
> 
> > SELECT FILE TO LIST 
> > LOOP 
> > READNEXT ID FROM LIST ELSE ID = @AM 
> > UNTIL ID = @AM DO 
> > REPEAT 
> > 
> > SELECT FILE 
> > LOOP 
> > READNEXT ID ELSE ID = @AM 
> > UNTIL ID = @AM DO 
> > REPEAT 
> 
> I agree that I don't see any extra overhead. 
> But why do you use an odd convention like ID = @AM ? 
> In this small loop it's probably apparent what you're doing but if the 
> distance between the LOOP and the UNTIL were large enough I dare say you'd be 
> adding 
> confusion to the mix for any future programmer. 
> 
> What I do is 
> DONE = @FALSE 
> LOOP 
> READNEXT ID ELSE DONE = @TRUE 
> UNTIL DONE DO REPEAT 
> 
> I think DONE is a more clear-cut variable usage rather than setting ID to @AM 
> personally. Just my opinion. 
> 
> Will Johnson 
> --- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-15 Thread Don Kibbey
I'm the "captive" programmer for a system that is just full of the
"infidel EOF" type logic.  Said system runs on UniVerse but started
life as an Ultimate application.  Since that is all I've ever seen in
the system, that's what I've always used.  I'll have to experiment
with the other examples when I get the chance.

-- Always learning something here...
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-15 Thread u2
I love that "LOOP WHILE READNEXT" syntax. I know it works in
jbase/UD/Pick OA/Sequoia--surprised it doesn't work for D3.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson
> Sent: Thursday, July 14, 2005 11:26 PM
> To: u2-users@listserver.u2ug.org
> Subject: Re: [U2] [UV] Select Question
> 
> 
> At the risk of starting another debate, I'll toss out my 
> preference on internal (or external) READNEXTS.
> 
> UD:
> LOOP WHILE READNEXT ID DO
> BLAH
> REPEAT
> 
> D3:
> LOOP READNEXT ID ELSE EXIT UNTIL 0 DO
> BLAH
> REPEAT
> 
> MCD and others I use the infidel EOF=0 logic
> EOF=0
> LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO
> BLAH
> REPEAT
> 
> I have been stung when using the value of the incoming ID as 
> a test value. Thus I leave it alone. my 1 cent.
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "u2-Users" 
> Sent: Thursday, July 14, 2005 12:04 AM
> Subject: [U2] [UV] Select Question
> 
> 
> > Hi all,
> >
> > Can someone tell me the diference between the following two 
> examples 
> > of
> executing an external select?
> >
> > SELECT FILE TO LIST
> > LOOP
> > READNEXT ID FROM LIST ELSE ID = @AM
> > UNTIL ID = @AM DO
> > REPEAT
> >
> > SELECT FILE
> > LOOP
> > READNEXT ID ELSE ID = @AM
> > UNTIL ID = @AM DO
> > REPEAT
> >
> > Someone pointed out to me that there is overhead in selecting to a 
> > list
> that I need not be exposing myself to.  Aren't they both kind 
> of reading from a list somewhere anyways?
> >
> > Thanks
> > ---
> > u2-users mailing list
> > u2-users@listserver.u2ug.org
> > To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-14 Thread Mark Johnson
At the risk of starting another debate, I'll toss out my preference on
internal (or external) READNEXTS.

UD:
LOOP WHILE READNEXT ID DO
BLAH
REPEAT

D3:
LOOP READNEXT ID ELSE EXIT UNTIL 0 DO
BLAH
REPEAT

MCD and others I use the infidel EOF=0 logic
EOF=0
LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO
BLAH
REPEAT

I have been stung when using the value of the incoming ID as a test value.
Thus I leave it alone.
my 1 cent.

- Original Message -
From: <[EMAIL PROTECTED]>
To: "u2-Users" 
Sent: Thursday, July 14, 2005 12:04 AM
Subject: [U2] [UV] Select Question


> Hi all,
>
> Can someone tell me the diference between the following two examples of
executing an external select?
>
> SELECT FILE TO LIST
> LOOP
> READNEXT ID FROM LIST ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT
>
> SELECT FILE
> LOOP
> READNEXT ID ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT
>
> Someone pointed out to me that there is overhead in selecting to a list
that I need not be exposing myself to.  Aren't they both kind of reading
from a list somewhere anyways?
>
> Thanks
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-14 Thread Richard Taylor
There can be a major problem with the second syntax depending on what you
are doing to the file.  The SELECT filevar syntax does not create a select
list even in memory.  It traverses each group in order as you perform the
readnext command keeping a pointer to where it left off.  This is why is
can be so much faster/more efficient than a select to a list which must:
a) traverse the file to create the list and b) hold that list somewhere.

The problem comes in if you write back to the file you are traversing.
This will reorganize the group moving where records are located.  You can
end up records not being processed that you believed were going to be.  

You are much safer either Executing an Retrieve select or selecting to a
list.


Rich Taylor | Senior Programmer/Analyst| VERTIS
250 W. Pratt Street | Baltimore, MD 21201
P 410.361.8688 | F 410.528.0319 
[EMAIL PROTECTED] | http://www.vertisinc.com
 
Vertis is the premier provider of targeted advertising, media, and
marketing services that drive consumers to marketers more effectively.
 
"The more they complicate the plumbing
  the easier it is to stop up the drain"
 
- Montgomery Scott NCC-1701

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, July 14, 2005 12:05 AM
> To: u2-users@listserver.u2ug.org (u2-Users)
> Subject: [U2] [UV] Select Question
> 
> Hi all,
> 
> Can someone tell me the diference between the following two examples of
> executing an external select?
> 
> SELECT FILE TO LIST
> LOOP
> READNEXT ID FROM LIST ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT
> 
> SELECT FILE
> LOOP
> READNEXT ID ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT
> 
> Someone pointed out to me that there is overhead in selecting to a list
> that I need not be exposing myself to.  Aren't they both kind of reading
> from a list somewhere anyways?
> 
> Thanks
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-14 Thread FFT2001
In a message dated 7/13/2005 9:11:23 PM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:


> SELECT FILE TO LIST
> LOOP
> READNEXT ID FROM LIST ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT
> 
> SELECT FILE
> LOOP
> READNEXT ID ELSE ID = @AM
> UNTIL ID = @AM DO
> REPEAT

I agree that I don't see any extra overhead.
But why do you use an odd convention like ID = @AM ?
In this small loop it's probably apparent what you're doing but if the 
distance between the LOOP and the UNTIL were large enough I dare say you'd be 
adding 
confusion to the mix for any future programmer.

What I do is
DONE = @FALSE
LOOP
   READNEXT ID ELSE DONE = @TRUE
UNTIL DONE DO REPEAT

I think DONE is a more clear-cut variable usage rather than setting ID to @AM 
personally.  Just my opinion.

Will Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-14 Thread Mats Carlid

gerry-u2ug wrote:


is this true ?  I have never experienced the slowdown of the initial 
"traversal" and can't see the need for it - this statement just uses a 
different select list other than zero.  now if the question had been regarding SELECTV 
rather than SELECT, then I would agree.

Gerry


 


Mea culpa!

As  there's no way you can assign the resulting select list to a 
variable without
first  'traverse' the file -  that is without at least read the  list of 
record-id
in each page ( or hash point ) I jumped to the conclusion that there 
would be..


But evidently the implementation is such as the variable is not assigned 
to/with/as

the full list before the program continues with the loop.

That also explains why you can't do much else than readnext with
a list variable -  dcount it for example.


Took a large file  used both methods and printed the first
readnext'ed id   and timed it for proof - both ways printed
emediately.

(But I had to SELECTV  for the list variable case )

-- mats


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mats Carlid
Sent: Thursday, July 14, 2005 06:22 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:

 


Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
  READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
  READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

Thanks
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
   


---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-14 Thread gerry-u2ug
is this true ?  I have never experienced the slowdown of the initial 
"traversal" and can't see the need for it - this statement just uses a 
different select list other than zero.  now if the question had been regarding 
SELECTV rather than SELECT, then I would agree.

Gerry



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mats Carlid
Sent: Thursday, July 14, 2005 06:22 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:

>Hi all,
>
>Can someone tell me the diference between the following two examples of 
>executing an external select?
>
>SELECT FILE TO LIST
>LOOP
>READNEXT ID FROM LIST ELSE ID = @AM
>UNTIL ID = @AM DO
>REPEAT
>
>SELECT FILE
>LOOP
>READNEXT ID ELSE ID = @AM
>UNTIL ID = @AM DO
>REPEAT
>
>Someone pointed out to me that there is overhead in selecting to a list that I 
>need not be exposing myself to.  Aren't they both kind of reading from a list 
>somewhere anyways?
>
>Thanks
>---
>u2-users mailing list
>u2-users@listserver.u2ug.org
>To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-14 Thread Geoffrey Mitchell
Selecting to a list variable is a VERY good idea.  Personally, I regard 
selecting to the default select list in a program as very bad form, and 
using a numbered select list as only marginally better.  Brian Leach's 
response has a good explanation of why, so I won't go into details.


I'm not aware of any additional overhead, and can't imagine why there 
would be any, but I am not familiar with the implementation details, so 
I can't say authoritatively that there is none.  I guess that some 
memory would need to be allocated to manage a list stored in a list 
variable, whereas it would already be allocated for the default list, 
but we're talking about clock cycles here.  In practice, I know of no 
viable reason not to use list variables.


[EMAIL PROTECTED] wrote:


Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
   READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
   READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

Thanks
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
[This E-mail scanned for viruses by Declude Virus]



 


---
[This E-mail scanned for viruses by Declude Virus]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Select Question

2005-07-14 Thread Mats Carlid

I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:


Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
   READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
   READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

Thanks
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] Select Question

2005-07-14 Thread Brian Leach
The first syntax is used to ensure isolation of select lists.

It is a good practice to get into, in case someone later on modifies the
code processing whatever you are handling in your selection, especially if
that processing involves calling an external subroutine. Personally I prefer
to use select variables rather than list numbers for certain isolation.

Just in case that isn't clear, consider an example selecting and processing
some files.

If you were to do the following:

Open "VOC" To VOC Else STOP
Execute 'SELECT VOC WITH F1 LIKE F...'
Fin = @False
Loop
  ReadNext FileName Else Fin = @True
Until Fin Do
  GoSub DoFile
Repeat
(etc)

DoFile:
  Open FileName To FL Else Return
  Select FL
  Fin2 = @False
  Loop
ReadNext Id Else Fin2 = @True
  (etc)

The second select in DoFile will overwrite the contents the active select
list of files.

Using redirection this would be handled safely as the outer select is
isolated from the inner one:

Open "VOC" To VOC Else STOP
Execute 'SELECT VOC WITH F1 LIKE F...', SELECT. > FILELIST
Fin = @False
Loop
  ReadNext FileName FROM FILELIST Else Fin = @True
Until Fin Do
  GoSub DoFile
Repeat
(etc)

Brian
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] [UV] Select Question

2005-07-13 Thread iggchamp
Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

Thanks
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/