Re: [U2] Speeding up processing through large dynamic table

2008-11-25 Thread Keith Johnson [DATACOM]
REMOVE is the fastest way I've found to do this.  You must remember not
to re-assign or change the array while you are processing it.  Assuming
the array is THAT, even a THAT = THAT will reset the array processing
pointer and give you grief.


The following code will break the array up into attributes.

 LOOP
THIS = ''
LOOP
   REMOVE PART FROM THAT SETTING MARK
   THIS := PART
WHILE MARK GT 2 DO
   THIS := CHAR(256-MARK)
REPEAT
GOSUB PROCESS.THIS
 WHILE MARK DO
 REPEAT

The penultimate line perhaps should be WHILE MARK GT 1 DO - I have never
seen the char(255) delimiter in a real situation, so it's never been an
issue.


The following code is what I used in the past.  It's not quite so fast,
but it was always good enough.  This is the mechanism I used to process
associated multivalues.  In the 80's an invoice with lots of lines could
cause an excruciatingly long delay without this technique.  From memory,
I saw this first in an article by Jim Cronin.

$OPTIONS INFORMATION
   DIM PART(100)
   MAXMATTR = DCOUNT(THAT,@AM)
   MATPARSE PART FROM THAT, @AM
   FOR ATTR = 1 TO MAXMATTR
   HERE = REM(ATTR,100)
   IF HERE THEN THIS = PART(HERE) ELSE
 THIS = PART(100)
 MATPARSE PART FROM PART(0), @AM
  END
  GOSUB PROCESS.THIS
NEXT ATTR


Note that the above method needs to be written differently if you use
PICK style (static dimensioned arrays) because there is no zeroth array
element.

$OPTIONS PICK
   DIM PART(101)
   MAXMATTR = DCOUNT(THAT,@AM)
   MATPARSE PART FROM THAT, @AM
   FOR ATTR = 1 TO MAXMATTR
   HERE = REM(ATTR,100)
   IF HERE THEN THIS = PART(HERE) ELSE
 THIS = PART(100)
 MATPARSE PART FROM PART(101), @AM
  END
  GOSUB PROCESS.THIS
NEXT ATTR

Lastly, I have a vague memory that somewhere I may have been forced to
use a temporary variable like this

TEMP = PART(101)
MATPARSE PART FROM TEMP, @AM

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


RE: [U2] Speeding up processing through large dynamic table

2008-11-18 Thread Boydell, Stuart
That behaviour could be fixed by converting VM to SM which
select/readnext leaves alone... Still pretty quick. I just did a test
using the code below on an 85000 att array and it took .086 seconds on a
low spec dev machine.

   convert @vm to @sm in IN.TAB
   select IN.TAB
   loop while readnext IN.LINE do
 CUST.NUM  = IN.LINE<1,1,1>
 CUST.DESC = IN.LINE<1,1,2>
   repeat

Stuart Boydell

>-Original Message-
>My first test did not have @vm's and it looked like it worked
>but when I put in @vm's, anything after them is ignored.
>>READNEXT could be an option

 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-18 Thread Charles_Shaffer
I still like the SELECT approach.  It can be used on dynamic arrays and 
doesn't even need to wait to finish to make elements available.  I tried 
using dynamic arrays one time and the speed was awful.  Ever since, I use 
SELECT lists whenever possible.  A MAT array might be faster since it is 
more like a "traditional" array, but SELECT is easy and fast.

Here is the first part of the UniBasic HELP.


*
Help Information For: "UNIBASIC SELECT" Page: 1/7

SELECT

Syntax

SELECT file.var [TO {list.num.expr | list.var.expr}] [ON ERROR statements]
SELECT dyn.array [TO {list.num.expr | list.var.expr}] [ON ERROR 
statements]

Description

The UniBasic SELECT command creates an active select list of all
record IDs in a file. Records appear in the list in the order in
which they are stored in the file.
You can access the select list with a READNEXT statement.
The UniBasic SELECT command differs from EXECUTE "SELECT ...", which
executes the UniQuery SELECT command. The UniBasic SELECT command
immediately makes available to READNEXT one group of IDs at a time.
The program does not have to wait for the entire ID list to be 
constructed.
.
.
.***

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-18 Thread George Gallen
But is it much faster than what you had to start with? Since both
methods work, one might not be any better than the other. Although
if your planning on using the HUB.REMOVE from multiple programs,
then that course if most likely the best for your need.

George

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Dave Laansma
> Sent: Tuesday, November 18, 2008 11:04 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> 
> All right!  Well, after evaluating the overwhelming response to this
> seemingly simple question, I have experimented and decided on the
> following approach.
> 
> Embracing the risk of opening myself up to scrutiny of fellow
> professionals with both greater and lesser wisdom than myself, this is
> the path I have chosen.  Feel free to provide constructive criticism
> and/or blatant flaws in logic and reason, and I'll take it into
> consideration.
> 
> First, write a subroutine (I supposed it could have been a FUNCTION)
> that performs the REMOVE for me.  This subroutine looks like this:
> 
> SUBROUTINE HUB.REMOVE (IN.TAB,OUT.LINE,MARK)
> 
> OUT.LINE = ""
> MARK = ""
> 
> LOOP
>   REMOVE IN.FIELD FROM IN.TAB SETTING MARK
> 
>   BEGIN CASE
> CASE MARK = 0
>   EXIT
> 
> CASE MARK = 2 ; * @AM
>   OUT.LINE := IN.FIELD
>   EXIT
> 
> CASE MARK = 3 ; * @VM
>   OUT.LINE := IN.FIELD : @VM
> 
> CASE MARK = 4 ; * @SM
>   OUT.LINE := IN.FIELD : @SM
> 
>   END CASE
> REPEAT
> 
> 
> 
> RETURN
> 
> END
> 
> * IN.TAB is the whole table
> * OUT.LINE is the attribute with all VM and SM in tact
> * MARK = 0 is the flag to the CALLING program that we are finished.
> 
> The calling program looks like this:
> 
> LOOP
>   CALL HUB.REMOVE (IN.TAB,IN.REC,MARK)
>   IF MARK = 0 THEN EXIT
>   (do my thing with IN.REC)
> REPEAT
> 
> Conclusions I have arrived at:
> 
> 1. LOOP/REMOVE/REPEAT is absolutely faster than FOR/NEXT loop,
> especially as the size of the table grows into the 10's of thousands
> 2. SWAP is a non-issue in regards to performance.
> 3. It appears as though nesting REMOVEs would be bad.
> 4. The 'pointer' the OS keeps track of is indeed maintained 
> to and from
> the CALL to my subroutine.  This is good.
> 5. This virtual users group is an EXCELLENT source for U2 Software
> Engineers to learn more about the toolbox provided by the UNIBASIC
> commands, theories and especially techniques for 
> accomplishing specific,
> targeted objectives.
> 6. U2UG in Atlanta was very good.  Still room for 
> improvement, but that
> will come as it evolves.
> 
> Thank you ALL for your input.  It certainly has been an eye-opening
> exercise.  There certainly are some 'interesting' ideas out there.
> 
> So, have it folks!  I'll be watching!
> 
> David Laansma
> IT Manager
> Hubbard Supply Co. 
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
> Sent: Monday, November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> Is there a way to speed up spinning through a very large 
> dynamic table?
> Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get really slow.
> Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-18 Thread Israel, John R.
My 2 cents:
I only use FOR/NEXT loops if I am dealing with data that I know is small. 
Technically, LOOP/REMOVE are faster, but for something small I just keep it 
simple.

I would think the LOOP/REMOVE or basic SELECT would both be very fast. The 
SELECT has the advantage of not needing to test the delimiter, so it might 
actually be faster depending on what you are doing.

In your snippet of code, I do not see it doing anything (I'm sure for 
simplicity sake), but based on the size of data you are dealing with, I would 
not want the overhead of an external subroutine.  You will get better 
performance if you keep all the code in a single piece of code.

I also thought about using DIM array (MATPARSE) as was previously mentioned.  
This takes extra time to set up, but will move fastest once it is set up.  The 
more work you do with the data, the better it is to use DIM arrays.  Again, 
because I do not know exactly what you are doing, I can only give loose advise. 
 In this case, I would guess it would not be the way to go, but you might want 
to play with the following options to get the best results:
LOOP/REMOVE
SELECT
DIM array

Again, keep it all in one piece of code unless you want the overhead of passing 
huge data back and forth and the overhead of the 2nd subroutine.


John Israel
Sr. Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Dayton, OH  45342
937-866-0711 x44380

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
Sent: Tuesday, November 18, 2008 11:04 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

All right!  Well, after evaluating the overwhelming response to this
seemingly simple question, I have experimented and decided on the
following approach.

Embracing the risk of opening myself up to scrutiny of fellow
professionals with both greater and lesser wisdom than myself, this is
the path I have chosen.  Feel free to provide constructive criticism
and/or blatant flaws in logic and reason, and I'll take it into
consideration.

First, write a subroutine (I supposed it could have been a FUNCTION)
that performs the REMOVE for me.  This subroutine looks like this:

SUBROUTINE HUB.REMOVE (IN.TAB,OUT.LINE,MARK)

OUT.LINE = ""
MARK = ""

LOOP
  REMOVE IN.FIELD FROM IN.TAB SETTING MARK

  BEGIN CASE
CASE MARK = 0
  EXIT

CASE MARK = 2 ; * @AM
  OUT.LINE := IN.FIELD
  EXIT

CASE MARK = 3 ; * @VM
  OUT.LINE := IN.FIELD : @VM

CASE MARK = 4 ; * @SM
  OUT.LINE := IN.FIELD : @SM

  END CASE
REPEAT



RETURN

END

* IN.TAB is the whole table
* OUT.LINE is the attribute with all VM and SM in tact
* MARK = 0 is the flag to the CALLING program that we are finished.

The calling program looks like this:

LOOP
  CALL HUB.REMOVE (IN.TAB,IN.REC,MARK)
  IF MARK = 0 THEN EXIT
  (do my thing with IN.REC)
REPEAT

Conclusions I have arrived at:

1. LOOP/REMOVE/REPEAT is absolutely faster than FOR/NEXT loop,
especially as the size of the table grows into the 10's of thousands
2. SWAP is a non-issue in regards to performance.
3. It appears as though nesting REMOVEs would be bad.
4. The 'pointer' the OS keeps track of is indeed maintained to and from
the CALL to my subroutine.  This is good.
5. This virtual users group is an EXCELLENT source for U2 Software
Engineers to learn more about the toolbox provided by the UNIBASIC
commands, theories and especially techniques for accomplishing specific,
targeted objectives.
6. U2UG in Atlanta was very good.  Still room for improvement, but that
will come as it evolves.

Thank you ALL for your input.  It certainly has been an eye-opening
exercise.  There certainly are some 'interesting' ideas out there.

So, have it folks!  I'll be watching!

David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-18 Thread David Wolverton
As I recall, you will get IN.FIELD when MARK is set to '0' - showing it is
the 'last item' in the group.

You will want to add that on I think -- I don't have a way to confirm this
-- but I thought if you got a 0 or 1, the 'remove' still had something in it
to 'share' -- See my example from yesterday... I think you'll miss the last
segment with this version of the logic -- you need to treat 0 or 1 the same
as a "2", except knowing it's the last iteration...

DW

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
> Sent: Tuesday, November 18, 2008 10:04 AM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> All right!  Well, after evaluating the overwhelming response 
> to this seemingly simple question, I have experimented and 
> decided on the following approach.
> 
> Embracing the risk of opening myself up to scrutiny of fellow 
> professionals with both greater and lesser wisdom than 
> myself, this is the path I have chosen.  Feel free to provide 
> constructive criticism and/or blatant flaws in logic and 
> reason, and I'll take it into consideration.
> 
> First, write a subroutine (I supposed it could have been a 
> FUNCTION) that performs the REMOVE for me.  This subroutine 
> looks like this:
> 
> SUBROUTINE HUB.REMOVE (IN.TAB,OUT.LINE,MARK)
> 
> OUT.LINE = ""
> MARK = ""
> 
> LOOP
>   REMOVE IN.FIELD FROM IN.TAB SETTING MARK
> 
>   BEGIN CASE
> CASE MARK = 0
>   EXIT
> 
> CASE MARK = 2 ; * @AM
>   OUT.LINE := IN.FIELD
>   EXIT
> 
> CASE MARK = 3 ; * @VM
>   OUT.LINE := IN.FIELD : @VM
> 
> CASE MARK = 4 ; * @SM
>   OUT.LINE := IN.FIELD : @SM
> 
>   END CASE
> REPEAT
> 
> 
> 
> RETURN
> 
> END
> 
> * IN.TAB is the whole table
> * OUT.LINE is the attribute with all VM and SM in tact
> * MARK = 0 is the flag to the CALLING program that we are finished.
> 
> The calling program looks like this:
> 
> LOOP
>   CALL HUB.REMOVE (IN.TAB,IN.REC,MARK)
>   IF MARK = 0 THEN EXIT
>   (do my thing with IN.REC)
> REPEAT
> 
> Conclusions I have arrived at:
> 
> 1. LOOP/REMOVE/REPEAT is absolutely faster than FOR/NEXT 
> loop, especially as the size of the table grows into the 10's 
> of thousands 2. SWAP is a non-issue in regards to performance.
> 3. It appears as though nesting REMOVEs would be bad.
> 4. The 'pointer' the OS keeps track of is indeed maintained 
> to and from the CALL to my subroutine.  This is good.
> 5. This virtual users group is an EXCELLENT source for U2 
> Software Engineers to learn more about the toolbox provided 
> by the UNIBASIC commands, theories and especially techniques 
> for accomplishing specific, targeted objectives.
> 6. U2UG in Atlanta was very good.  Still room for 
> improvement, but that will come as it evolves.
> 
> Thank you ALL for your input.  It certainly has been an 
> eye-opening exercise.  There certainly are some 'interesting' 
> ideas out there.
> 
> So, have it folks!  I'll be watching!
> 
> David Laansma
> IT Manager
> Hubbard Supply Co. 
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
> Sent: Monday, November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> Is there a way to speed up spinning through a very large 
> dynamic table?
> Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get really slow.
> Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-18 Thread Dave Laansma
All right!  Well, after evaluating the overwhelming response to this
seemingly simple question, I have experimented and decided on the
following approach.

Embracing the risk of opening myself up to scrutiny of fellow
professionals with both greater and lesser wisdom than myself, this is
the path I have chosen.  Feel free to provide constructive criticism
and/or blatant flaws in logic and reason, and I'll take it into
consideration.

First, write a subroutine (I supposed it could have been a FUNCTION)
that performs the REMOVE for me.  This subroutine looks like this:

SUBROUTINE HUB.REMOVE (IN.TAB,OUT.LINE,MARK)

OUT.LINE = ""
MARK = ""

LOOP
  REMOVE IN.FIELD FROM IN.TAB SETTING MARK

  BEGIN CASE
CASE MARK = 0
  EXIT

CASE MARK = 2 ; * @AM
  OUT.LINE := IN.FIELD
  EXIT

CASE MARK = 3 ; * @VM
  OUT.LINE := IN.FIELD : @VM

CASE MARK = 4 ; * @SM
  OUT.LINE := IN.FIELD : @SM

  END CASE
REPEAT



RETURN

END

* IN.TAB is the whole table
* OUT.LINE is the attribute with all VM and SM in tact
* MARK = 0 is the flag to the CALLING program that we are finished.

The calling program looks like this:

LOOP
  CALL HUB.REMOVE (IN.TAB,IN.REC,MARK)
  IF MARK = 0 THEN EXIT
  (do my thing with IN.REC)
REPEAT

Conclusions I have arrived at:

1. LOOP/REMOVE/REPEAT is absolutely faster than FOR/NEXT loop,
especially as the size of the table grows into the 10's of thousands
2. SWAP is a non-issue in regards to performance.
3. It appears as though nesting REMOVEs would be bad.
4. The 'pointer' the OS keeps track of is indeed maintained to and from
the CALL to my subroutine.  This is good.
5. This virtual users group is an EXCELLENT source for U2 Software
Engineers to learn more about the toolbox provided by the UNIBASIC
commands, theories and especially techniques for accomplishing specific,
targeted objectives.
6. U2UG in Atlanta was very good.  Still room for improvement, but that
will come as it evolves.

Thank you ALL for your input.  It certainly has been an eye-opening
exercise.  There certainly are some 'interesting' ideas out there.

So, have it folks!  I'll be watching!

David Laansma
IT Manager
Hubbard Supply Co. 
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-18 Thread Andy Baum
Look at MATPARSE

A11 = DCOUNT(IN.TAB,@AM)
DIM RECS(A11)
MATPARSE RECS FROM IN.TAB, @AM

FOR A1 = 1 TO A11
  CUST.NUM  = RECS(A1)<1,1>
  CUST.DESC = RECS(A1)<1,2>
NEXT A1

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: 17 November 2008 18:10
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?  Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
on speeding this up?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/



-
**
The contents of this e-mail are subject to contract in all cases
and
William Hill PLC, its subsidiaries or affiliates make no
contractual
commitment save where confirmed by hard copy.

The contents of this e-mail do not necessarily represent the views
of William Hill PLC, its subsidiaries or affiliates. We accept no
liability, including liability for negligence, in respect of any
statement in this e-mail.

This e-mail and any files transmitted with it are confidential,
may
be subject to legal privilege and intended solely for the use of
the
individual or entity to which they are addressed. If you are not
the
intended recipient, you are hereby notified that any use or
dissemination of this communication is strictly prohibited. If you
have received this e-mail in error, please notify us immediately,
then delete this e-mail.

Please note that William Hill can accept no responsibility for
viruses and it is your responsibility to scan any emails and their
attachments.

This message was from William Hill PLC whose registered office is
Greenside House, 50 Station Road, Wood Green, London N22 7TP.
Company Registration Number: 4212563 England.
*
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Speeding up processing through large dynamic table

2008-11-18 Thread MAJ Programming
This may have been offered but I didn't see it in the replies:

If you have half an idea on the max num of atts, try using DIM X(30) or
some large number and simply FOR.NEXT your way thru until you get to a
logical end like a null value.

I digest EDI records often in the neighborhood of 200,000 rows or more this
way.

Mark Johnson
- Original Message -
From: "Colin Alfke" <[EMAIL PROTECTED]>
To: 
Sent: Monday, November 17, 2008 4:24 PM
Subject: RE: [U2] Speeding up processing through large dynamic table


> Oh my - I'm not sure with all that swapping that you'll come out much
ahead.
>
> You're missing the "point" of remove. If your array is well built your
code
> simply becomes:
>
> LOOP
> REMOVE CUST.NUM FROM IN.TAB SETTING MARK
> REMOVE CUST.DESC FROM IN.TAB SETTING MARK
> (do your thing)
> WHILE MARK DO REPEAT
>
> If you do have to worry about having more attributes or sub-values in the
> array then you need to test the "MARK" variable after each remove and keep
> removing until the line is exhausted. Here is how "MARK" (delimiter) is
set:
> Delimiter Code Description ASCII Value*
> 0 array end
> 1 record mark 255
> 2 attribute mark  254
> 3 value mark  253
> 4 subvalue mark   252
> 5 text mark   251
> 6 not used; nonprinting   250
> 7 not used; nonprinting   249
>
> Someone else sent an example of how to keep checking "MARK" so I won't
> bother. You could even throw it in a subroutine to keep your processing
> "clean."
>
> Hth
> Colin Alfke
> Calgary, Canada
>
> > -Original Message-
> > From: Dave Laansma
> >
> > That is what I was afraid of.  Okay.  So after listening to all of your
> > comments (thus far since there is an annoying delay in these messages),
> > here is what I like the best:
> >
> > SWAP CHAR(9) WITH "" IN IN.TAB
> > SWAP CHAR(10) WITH "" IN IN.TAB
> >
> > SWAP @VM WITH CHAR(9) IN IN.TAB
> > SWAP @SM WITH CHAR(10) IN IN.TAB
> >
> > REPEAT
> >   REMOVE IN.LINE FROM IN.TAB SETTING MARK
> >   SWAP CHAR(9) WITH @VM IN IN.LINE
> >   SWAP CHAR(10) WITH @SM IN IN.LINE
> >   (do my thing with IN.LINE)
> > UNTIL MARK DO
> > REPEAT
> >
> > Any objections, concerns or better suggestions for using CHAR(10) as
> > the
> > temporary substitute for the @SM?  I just picked it because it came
> > right after CHAR(9) on my handy-dandy ASCII chart!  Been using it since
> > the 70's.  Some things just never go out of style!
> >
> > David Laansma
> >
> > -Original Message-
> > From: David Wolverton
> >
> > If you don't want to 'swap' all the other markers with 'strings' (SWAP
> > @VM
> > WITH "<>" IN RECORD) then you have to 'build' the line item up --
> > keep
> > removing until you see the remove hit the @AM and then process the
> > line...
> >
> > DW
> ---
> 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] Speeding up processing through large dynamic table

2008-11-18 Thread Mecki Foerthmann
Well, in that case you will have to convert the VMs first to something 
else like suggested in other posts.

CONVERT or SWAP are fast even on large arrays.
I've actually never tried SELECT and READNEXT with multi-valued 
attributes before.


And isn't there another syntax of the REMOVE command like IN.LINE = 
REMOVE(IN.TABLE,1,0,0) that would return a multi-valued array?



Mecki

George Gallen wrote:

0001: TESTDYN=""
0002: TESTDYN<-1>="HELLO":CHAR(253):"THERE"
0003: TESTDYN<-1>="UNTIL":CHAR(253):"ANOTHER"
0004: SELECT TESTDYN
0005: LOOP
0006: READNEXT ID ELSE EXIT
0007: PRINT ID
0008: REPEAT
0009: STOP
0010: END

This only returns
HELLO
UNTIL

My first test did not have @vm's and it looked like it worked
but when I put in @vm's, anything after them is ignored.

George

  

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of 
Marvin R. Fisher

Sent: Monday, November 17, 2008 3:00 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table


But it is not a file - it's an array.

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is 
confidential and may be legally privileged. The contents 
contained within, including any attached files, are intended 
solely for the addressee(s). Access by anyone other than the 
addressee(s) is unauthorized. If you are not the intended 
recipient, any disclosure, copying, distribution or any 
action, taken or not taken, in reliance on it, is prohibited 
and may be unlawful. If you believe that you have received 
this email message in error, please contact the sender. Any 
views expressed within are those of the individual sender, 
except where the sender specifies and with authority, states 
them to be the views of Pipeline-Software, Inc., Santa Ana, CA.


(The contents of this email message have been scanned for the 
presence of computer viruses.)



-Original Message-
From: [EMAIL PROTECTED] 


[mailto:[EMAIL PROTECTED] On Behalf Of Mecki Foerthmann
Sent: Monday, November 17, 2008 11:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Speeding up processing through large dynamic table

READNEXT could be an option

SELECT IN.TAB
LOOP WHILE READNEXT IN.LINE DO
   CUST.NUM=IN.LINE<1,1>
   CUST.DESC=IN.LINE<1,2>
REPEAT

this should be lightning-fast regardless how big IN.TAB is.

David Laansma wrote:
  

Is there a way to speed up spinning through a very large dynamic table?  Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-18 Thread Anthony Youngman
If you're going to do it that way, I wouldn't bother with putting the @VMs back 
(or may the @SM's too, depending on what you're doing.

Get CUST.NUM and CUST.DESC from your modified IN.LINE as follows ...

CUST.NUM = FIELD( IN.LINE, CHAR(9), 1, 1)
CUST.DESC = FIELD( IN.LINE, CHAR(9), 1, 1)

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
Sent: 17 November 2008 20:19
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

That is what I was afraid of.  Okay.  So after listening to all of your
comments (thus far since there is an annoying delay in these messages),
here is what I like the best:

SWAP CHAR(9) WITH "" IN IN.TAB
SWAP CHAR(10) WITH "" IN IN.TAB

SWAP @VM WITH CHAR(9) IN IN.TAB
SWAP @SM WITH CHAR(10) IN IN.TAB

REPEAT
  REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP CHAR(9) WITH @VM IN IN.LINE
  SWAP CHAR(10) WITH @SM IN IN.LINE
  (do my thing with IN.LINE)
UNTIL MARK DO
REPEAT

Any objections, concerns or better suggestions for using CHAR(10) as the
temporary substitute for the @SM?  I just picked it because it came
right after CHAR(9) on my handy-dandy ASCII chart!  Been using it since
the 70's.  Some things just never go out of style!

David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Wolverton
Sent: Monday, November 17, 2008 2:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

If you don't want to 'swap' all the other markers with 'strings' (SWAP
@VM
WITH "<>" IN RECORD) then you have to 'build' the line item up --
keep
removing until you see the remove hit the @AM and then process the
line...

DW

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
> Sent: Monday, November 17, 2008 1:24 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
>
> Oh my goodness!  This is incredible.
>
> Okay, now I have a mixture of @VM and @AM in the table.  The
> REMOVE 'stops' at every @VM and @AM.  I only want it to
> 'stop' at @AMs.  How do I do that?
>
> David Laansma
> IT Manager
> Hubbard Supply Co.
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
---
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] Speeding up processing through large dynamic table

2008-11-18 Thread Mecki Foerthmann

You can SELECT dynamic arrays too.
This is a BASIC SELECT not the executed TCL verb!
The beauty is it works only on attribute marks, so it should even return 
multi-valued strings.


I use this technique to go through large multi-valued attributes too.
I just assign the attribute to an array, convert @VM to @AM and then 
SELECT the array.
It is not good with multiple dependent attributes, though, even one 
could do multiple SELECTTV TOs and READNEXT FROMs.
But I think it is bad database design to have those in the first place - 
better write them as items to a file.



Marvin R. Fisher wrote:

But it is not a file - it's an array.

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is confidential and may be 
legally privileged. The contents contained within, including any attached 
files, are intended solely for the addressee(s). Access by anyone other than 
the addressee(s) is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action, taken or not taken, in 
reliance on it, is prohibited and may be unlawful. If you believe that you have 
received this email message in error, please contact the sender. Any views 
expressed within are those of the individual sender, except where the sender 
specifies and with authority, states them to be the views of Pipeline-Software, 
Inc., Santa Ana, CA.

(The contents of this email message have been scanned for the presence of 
computer viruses.)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mecki Foerthmann
Sent: Monday, November 17, 2008 11:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Speeding up processing through large dynamic table

READNEXT could be an option

SELECT IN.TAB
LOOP WHILE READNEXT IN.LINE DO
   CUST.NUM=IN.LINE<1,1>
   CUST.DESC=IN.LINE<1,2>
REPEAT

this should be lightning-fast regardless how big IN.TAB is.

David Laansma wrote:
  

Is there a way to speed up spinning through a very large dynamic table?  Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread Scott Ballinger
As has been mentioned, UV optimizes for sequential processing of @AM
delimited lists, thus greatly reducing the need for REMOVE and SELECT TO
type work-arounds.  Not mentioned: SWAP is virtually instantaneous. Whatever
is causing the OP's process to slow down, it is not the FOR/NEXT 
construct, nor the SWAPs.

Here is a quick program that builds a 100,000 attribute array with two
values per attribute and then reads every attribute & value. The whole thing
(build then read) runs in less than two seconds.
Note that I first tested it by building LIST as

FOR N = 1 TO MAX
  LIST = XXX
NEXT N

Which really did really slow down as it grew.

But using LIST := @AM:XXX produced the speedy result documented below.

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006


>RUN BP SB

BUILDING...
START: 63682.6225
END:   63683.5232
ELAPSED: 0.9007  <-- less than 1 second to build 100,000 attributes

SIZE:   1277790
DCOUNT: 11

READING...
START: 63683.5428
END:63683.7975
ELAPSED: 0.2547  <-- about 1/4 sec to read and swap @vm to @am on 100,000
attributes.

>.L RELLEVEL

 RELLEVEL
001 X
002 10.1.4
003 PICK
004 PICK.FORMAT
005 10.1.4
>
>CT BP SB

 SB
0001 *array processing test
0002 MAX = 10
0003 A0 = @(0)
0004 CL = @(-4)
0005
0006 T1 = TIME()
0007 PRINT "BUILDING..."
0008 PRINT "START: ":T1
0009 LIST = ""
0010 FOR N = 1 TO MAX
0011   REC = N
0012   REC<1,-1> = N*10
0013   LIST := @AM:REC
0014   IF MOD(N,1000) EQ 0 THEN PRINT A0:N:CL:
0015 NEXT N
0016 T2 = TIME()
0017 PRINT A0:"END:   ":T2:CL
0018 PRINT "ELAPSED: ":T2-T1
0019
0020 PRINT
0021 PRINT "SIZE:   ":LEN(LIST)
0022 PRINT "DCOUNT: ":DCOUNT(LIST,@AM)
0023 PRINT
0024
0025 PRINT "READING..."
0026 T1 = TIME()
0027 PRINT "START: ":T1
0028 FOR N = 1 TO MAX
0029   REC = LIST
0030   CONVERT @VM TO @AM IN REC
0031   THING1 = REC<1>
0032   THING2 = REC<2>
0033   IF MOD(N,1000) EQ 0 THEN PRINT A0:N:CL:
0034 NEXT N
0035 T2 = TIME()
0036 PRINT A0:"END:":T2:CL
0037 PRINT "ELAPSED: ":T2-T1
0038
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Ken Wallis
Much as I agree with Colin's comments on simply REMOVEing the two values you
want inside your loop, I can't help but think that Dave has some evil bad
stuff he needs to do with the rest of IN.LINE that relies on the raised mark
characters.

 

What I'd just like to point out though is that if there is a need to change
characters in the string and especially in the 85000 item IN.TAB it would be
considerably better to do that with CONVERT, RAISE(), or LOWER() than to use
multiple SWAPs.

 

CONVERT CHAR(9):CHAR(10) TO "" IN IN.TAB

 

Will do it all in a single pass and also since CONVERT can never extend the
string it can do the whole thing in place without a bunch of malloc()s.

 

If you were going with the original idea of processing an attribute at a
time and needed to work with @AM instead of @VM, you should use

IN.LINE=RAISE(IN.LINE)

instead of your SWAP statement because again this will be done in a single
pass without the need for malloc()ing additional memory.

KEN WALLIS
* [EMAIL PROTECTED]



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
Sent: Tuesday, 18 November 2008 7:19 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

 

That is what I was afraid of.  Okay.  So after listening to all of your

comments (thus far since there is an annoying delay in these messages),

here is what I like the best:

 

SWAP CHAR(9) WITH "" IN IN.TAB

SWAP CHAR(10) WITH "" IN IN.TAB

 

SWAP @VM WITH CHAR(9) IN IN.TAB

SWAP @SM WITH CHAR(10) IN IN.TAB

 

REPEAT

  REMOVE IN.LINE FROM IN.TAB SETTING MARK

  SWAP CHAR(9) WITH @VM IN IN.LINE

  SWAP CHAR(10) WITH @SM IN IN.LINE

  (do my thing with IN.LINE)

UNTIL MARK DO

REPEAT

 

Any objections, concerns or better suggestions for using CHAR(10) as the

temporary substitute for the @SM?  I just picked it because it came

right after CHAR(9) on my handy-dandy ASCII chart!  Been using it since

the 70's.  Some things just never go out of style!

 

David Laansma

IT Manager

Hubbard Supply Co. 

Direct: 810-342-7143

Office:810-234-8681

Fax: 810-234-6142

www.hubbardsupply.com

"Delivering Products, Services, and Innovative Solutions"

 

 

-Original Message-

From: [EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED] On Behalf Of David Wolverton

Sent: Monday, November 17, 2008 2:52 PM

To: u2-users@listserver.u2ug.org

Subject: RE: [U2] Speeding up processing through large dynamic table

 

If you don't want to 'swap' all the other markers with 'strings' (SWAP

@VM

WITH "<>" IN RECORD) then you have to 'build' the line item up --

keep

removing until you see the remove hit the @AM and then process the

line...

 

DW 

 

> -Original Message-

> From: [EMAIL PROTECTED] 

> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma

> Sent: Monday, November 17, 2008 1:24 PM

> To: u2-users@listserver.u2ug.org

> Subject: RE: [U2] Speeding up processing through large dynamic table

> 

> Oh my goodness!  This is incredible.

> 

> Okay, now I have a mixture of @VM and @AM in the table.  The 

> REMOVE 'stops' at every @VM and @AM.  I only want it to 

> 'stop' at @AMs.  How do I do that?

> 

> David Laansma

> IT Manager

> Hubbard Supply Co. 

> Direct: 810-342-7143

> Office:810-234-8681

> Fax: 810-234-6142

> www.hubbardsupply.com

> "Delivering Products, Services, and Innovative Solutions"

---

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] Speeding up processing through large dynamic table

2008-11-17 Thread David A. Green
David,

Try this trick:

A11 = DCOUNT(IN.TAB,@AM)
Pos = 1
FOR A1 = 1 TO A11
  IN.LINE = FIELD(IN.TAB[Pos, ], @AM, 1)
  Pos += COL2()
  *SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1, 1>
  CUST.DESC = IN.LINE<1, 2>
NEXT A1

Thanks,
David A. Green
www.dagconsulting.com
(480) 813-1725


-Original Message-

Okay, now I have a mixture of @VM and @AM in the table.  The REMOVE
'stops' at every @VM and @AM.  I only want it to 'stop' at @AMs.  How do
I do that?

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


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Colin Alfke
Oh my - I'm not sure with all that swapping that you'll come out much ahead.

You're missing the "point" of remove. If your array is well built your code
simply becomes:

LOOP
REMOVE CUST.NUM FROM IN.TAB SETTING MARK
REMOVE CUST.DESC FROM IN.TAB SETTING MARK
(do your thing)
WHILE MARK DO REPEAT

If you do have to worry about having more attributes or sub-values in the
array then you need to test the "MARK" variable after each remove and keep
removing until the line is exhausted. Here is how "MARK" (delimiter) is set:
Delimiter Code Description ASCII Value* 
0 array end   
1 record mark 255 
2 attribute mark  254
3 value mark  253 
4 subvalue mark   252
5 text mark   251 
6 not used; nonprinting   250
7 not used; nonprinting   249

Someone else sent an example of how to keep checking "MARK" so I won't
bother. You could even throw it in a subroutine to keep your processing
"clean."

Hth
Colin Alfke
Calgary, Canada

> -Original Message-
> From: Dave Laansma
> 
> That is what I was afraid of.  Okay.  So after listening to all of your
> comments (thus far since there is an annoying delay in these messages),
> here is what I like the best:
> 
> SWAP CHAR(9) WITH "" IN IN.TAB
> SWAP CHAR(10) WITH "" IN IN.TAB
> 
> SWAP @VM WITH CHAR(9) IN IN.TAB
> SWAP @SM WITH CHAR(10) IN IN.TAB
> 
> REPEAT
>   REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP CHAR(9) WITH @VM IN IN.LINE
>   SWAP CHAR(10) WITH @SM IN IN.LINE
>   (do my thing with IN.LINE)
> UNTIL MARK DO
> REPEAT
> 
> Any objections, concerns or better suggestions for using CHAR(10) as
> the
> temporary substitute for the @SM?  I just picked it because it came
> right after CHAR(9) on my handy-dandy ASCII chart!  Been using it since
> the 70's.  Some things just never go out of style!
> 
> David Laansma
> 
> -Original Message-
> From: David Wolverton
> 
> If you don't want to 'swap' all the other markers with 'strings' (SWAP
> @VM
> WITH "<>" IN RECORD) then you have to 'build' the line item up --
> keep
> removing until you see the remove hit the @AM and then process the
> line...
> 
> DW
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread David Wolverton
Or again, you could 'build up' your IN.LINE like this: 

If you string were **huge** this might be faster as long as the size of each
@AM was not too big...

IN.LINE = ""
LOOP
   REMOVE TEMP.IN.LINE FROM IN.TAB SETTING MARK
   BEGIN CASE
  CASE MARK = 0 OR MARK = 1 OR MARK = 2
(do my thing with IN.LINE)
 IN.LINE = ""
  CASE MARK = 3
 IN.LINE := TEMP.IN.LINE:@VM
  CASE MARK = 4
 IN.LINE := TEMP.IN.LINE:@SVM
END CASE
 UNTIL MARK = 0
 REPEAT

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
> Sent: Monday, November 17, 2008 2:19 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> That is what I was afraid of.  Okay.  So after listening to 
> all of your comments (thus far since there is an annoying 
> delay in these messages), here is what I like the best:
> 
> SWAP CHAR(9) WITH "" IN IN.TAB
> SWAP CHAR(10) WITH "" IN IN.TAB
> 
> SWAP @VM WITH CHAR(9) IN IN.TAB
> SWAP @SM WITH CHAR(10) IN IN.TAB
> 
> REPEAT
>   REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP CHAR(9) WITH @VM IN IN.LINE
>   SWAP CHAR(10) WITH @SM IN IN.LINE
>   (do my thing with IN.LINE)
> UNTIL MARK DO
> REPEAT
> 
> Any objections, concerns or better suggestions for using 
> CHAR(10) as the temporary substitute for the @SM?  I just 
> picked it because it came right after CHAR(9) on my 
> handy-dandy ASCII chart!  Been using it since the 70's.  Some 
> things just never go out of style!
> 
> David Laansma
> IT Manager
> Hubbard Supply Co. 
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> David Wolverton
> Sent: Monday, November 17, 2008 2:52 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> If you don't want to 'swap' all the other markers with 
> 'strings' (SWAP @VM WITH "<>" IN RECORD) then you have to 
> 'build' the line item up -- keep removing until you see the 
> remove hit the @AM and then process the line...
> 
> DW 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> Dave Laansma
> > Sent: Monday, November 17, 2008 1:24 PM
> > To: u2-users@listserver.u2ug.org
> > Subject: RE: [U2] Speeding up processing through large dynamic table
> > 
> > Oh my goodness!  This is incredible.
> > 
> > Okay, now I have a mixture of @VM and @AM in the table.  The REMOVE 
> > 'stops' at every @VM and @AM.  I only want it to 'stop' at 
> @AMs.  How 
> > do I do that?
> > 
> > David Laansma
> > IT Manager
> > Hubbard Supply Co. 
> > Direct: 810-342-7143
> > Office:810-234-8681
> > Fax: 810-234-6142
> > www.hubbardsupply.com
> > "Delivering Products, Services, and Innovative Solutions"
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread George Gallen
0001: TESTDYN=""
0002: TESTDYN<-1>="HELLO":CHAR(253):"THERE"
0003: TESTDYN<-1>="UNTIL":CHAR(253):"ANOTHER"
0004: SELECT TESTDYN
0005: LOOP
0006: READNEXT ID ELSE EXIT
0007: PRINT ID
0008: REPEAT
0009: STOP
0010: END

This only returns
HELLO
UNTIL

My first test did not have @vm's and it looked like it worked
but when I put in @vm's, anything after them is ignored.

George

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of 
> Marvin R. Fisher
> Sent: Monday, November 17, 2008 3:00 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> 
> But it is not a file - it's an array.
> 
> Marvin R. Fisher
> Technical Resource Group
> A Pipeline Group Company
> 2850 Red Hill Ave.
> Suite 110
> Santa Ana, CA 92705
> Tel (949) 296-8380 ext. 620
> Fax (949) 756-0029
> Pipeline Software Statement: This email message is 
> confidential and may be legally privileged. The contents 
> contained within, including any attached files, are intended 
> solely for the addressee(s). Access by anyone other than the 
> addressee(s) is unauthorized. If you are not the intended 
> recipient, any disclosure, copying, distribution or any 
> action, taken or not taken, in reliance on it, is prohibited 
> and may be unlawful. If you believe that you have received 
> this email message in error, please contact the sender. Any 
> views expressed within are those of the individual sender, 
> except where the sender specifies and with authority, states 
> them to be the views of Pipeline-Software, Inc., Santa Ana, CA.
> 
> (The contents of this email message have been scanned for the 
> presence of computer viruses.)
> 
> 
> -Original Message-----
> From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Mecki Foerthmann
Sent: Monday, November 17, 2008 11:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Speeding up processing through large dynamic table

READNEXT could be an option

SELECT IN.TAB
LOOP WHILE READNEXT IN.LINE DO
   CUST.NUM=IN.LINE<1,1>
   CUST.DESC=IN.LINE<1,2>
REPEAT

this should be lightning-fast regardless how big IN.TAB is.

David Laansma wrote:
> Is there a way to speed up spinning through a very large dynamic table?  Here 
> is
> a sample of my program:
>
> A11 = DCOUNT(IN.TAB,@AM)
>
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
>
> A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread Marvin R. Fisher
I think a lot of us need to brush up on how remove works.

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is confidential and may be 
legally privileged. The contents contained within, including any attached 
files, are intended solely for the addressee(s). Access by anyone other than 
the addressee(s) is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action, taken or not taken, in 
reliance on it, is prohibited and may be unlawful. If you believe that you have 
received this email message in error, please contact the sender. Any views 
expressed within are those of the individual sender, except where the sender 
specifies and with authority, states them to be the views of Pipeline-Software, 
Inc., Santa Ana, CA.

(The contents of this email message have been scanned for the presence of 
computer viruses.)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tony G
Sent: Monday, November 17, 2008 12:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

And unless there is a need to work with attributes rather than
values, eliminate the SWAP to get:
  CUST.NUM = IN.LINE<1,1>
  CUST.DESC = IN.LINE<1,2> 


> From: Joshua Gallant
> Try something like this instead:
> 
> LOOP
> REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> WHILE MARK DO
> REPEAT
> 
> That will keep track of where you were in the array and pick up
where
> you left off.
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread BNeylon
You can make use of the change in the delimiter flag.  I have a remove 
boiler plate;
   DELIM = -1
   ATT = 1
   VAL = 1
   SV = 1
   LOOP
 REMOVE PIECE FROM RECORD SETTING DELIM
 CRT '<':ATT:',':VAL:',':SV:'>  = ':PIECE
 BEGIN CASE
   CASE DELIM = 2
 ATT += 1
 VAL = 1
 SV = 1
   CASE DELIM = 3
 VAL += 1
 SV = 1
   CASE DELIM = 4
 SV += 1
 END CASE
   WHILE DELIM DO REPEAT
You don't need all of the above.  All you need to know is that if your VAL 
is 1 you have a CUST.NUM, VAL = 2 a CUST.DESC and when your ATT changes or 
you hit the end, you need to process

Bruce M Neylon
Health Care Management Group 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Tony G
And unless there is a need to work with attributes rather than
values, eliminate the SWAP to get:
  CUST.NUM = IN.LINE<1,1>
  CUST.DESC = IN.LINE<1,2> 


> From: Joshua Gallant
> Try something like this instead:
> 
> LOOP
> REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> WHILE MARK DO
> REPEAT
> 
> That will keep track of where you were in the array and pick up
where
> you left off.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread George Gallen
that's what I thought.but it works! (coool)

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of 
> Marvin R. Fisher
> Sent: Monday, November 17, 2008 3:00 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> 
> But it is not a file - it's an array.
> 
> Marvin R. Fisher
> Technical Resource Group
> A Pipeline Group Company
> 2850 Red Hill Ave.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Dave Laansma
That is what I was afraid of.  Okay.  So after listening to all of your
comments (thus far since there is an annoying delay in these messages),
here is what I like the best:

SWAP CHAR(9) WITH "" IN IN.TAB
SWAP CHAR(10) WITH "" IN IN.TAB

SWAP @VM WITH CHAR(9) IN IN.TAB
SWAP @SM WITH CHAR(10) IN IN.TAB

REPEAT
  REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP CHAR(9) WITH @VM IN IN.LINE
  SWAP CHAR(10) WITH @SM IN IN.LINE
  (do my thing with IN.LINE)
UNTIL MARK DO
REPEAT

Any objections, concerns or better suggestions for using CHAR(10) as the
temporary substitute for the @SM?  I just picked it because it came
right after CHAR(9) on my handy-dandy ASCII chart!  Been using it since
the 70's.  Some things just never go out of style!

David Laansma
IT Manager
Hubbard Supply Co. 
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Wolverton
Sent: Monday, November 17, 2008 2:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

If you don't want to 'swap' all the other markers with 'strings' (SWAP
@VM
WITH "<>" IN RECORD) then you have to 'build' the line item up --
keep
removing until you see the remove hit the @AM and then process the
line...

DW 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
> Sent: Monday, November 17, 2008 1:24 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> Oh my goodness!  This is incredible.
> 
> Okay, now I have a mixture of @VM and @AM in the table.  The 
> REMOVE 'stops' at every @VM and @AM.  I only want it to 
> 'stop' at @AMs.  How do I do that?
> 
> David Laansma
> IT Manager
> Hubbard Supply Co. 
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread Marvin R. Fisher
 The REMOVE 'stops' at every @VM and @AM.  ...
See my earlier response.

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is confidential and may be 
legally privileged. The contents contained within, including any attached 
files, are intended solely for the addressee(s). Access by anyone other than 
the addressee(s) is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action, taken or not taken, in 
reliance on it, is prohibited and may be unlawful. If you believe that you have 
received this email message in error, please contact the sender. Any views 
expressed within are those of the individual sender, except where the sender 
specifies and with authority, states them to be the views of Pipeline-Software, 
Inc., Santa Ana, CA.

(The contents of this email message have been scanned for the presence of 
computer viruses.)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
Sent: Monday, November 17, 2008 11:24 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

Oh my goodness!  This is incredible.

Okay, now I have a mixture of @VM and @AM in the table.  The REMOVE
'stops' at every @VM and @AM.  I only want it to 'stop' at @AMs.  How do
I do that?

David Laansma
IT Manager
Hubbard Supply Co. 
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joshua Gallant
Sent: Monday, November 17, 2008 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

When running through an array with a for next loop the last item
processed isn't remembered so the program needs to traverse the entire
array for each record and will slow down as you get to records later in
the process.

Instead of this:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

Try something like this instead:

LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

That will keep track of where you were in the array and pick up where
you left off.

Let me know how that works out for you.

Thanks,
Josh


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread Marvin R. Fisher
But it is not a file - it's an array.

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is confidential and may be 
legally privileged. The contents contained within, including any attached 
files, are intended solely for the addressee(s). Access by anyone other than 
the addressee(s) is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action, taken or not taken, in 
reliance on it, is prohibited and may be unlawful. If you believe that you have 
received this email message in error, please contact the sender. Any views 
expressed within are those of the individual sender, except where the sender 
specifies and with authority, states them to be the views of Pipeline-Software, 
Inc., Santa Ana, CA.

(The contents of this email message have been scanned for the presence of 
computer viruses.)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mecki Foerthmann
Sent: Monday, November 17, 2008 11:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Speeding up processing through large dynamic table

READNEXT could be an option

SELECT IN.TAB
LOOP WHILE READNEXT IN.LINE DO
   CUST.NUM=IN.LINE<1,1>
   CUST.DESC=IN.LINE<1,2>
REPEAT

this should be lightning-fast regardless how big IN.TAB is.

David Laansma wrote:
> Is there a way to speed up spinning through a very large dynamic table?  Here 
> is
> a sample of my program:
>
> A11 = DCOUNT(IN.TAB,@AM)
>
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
>
> A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread Charles_Shaffer
>>READNEXT could be an option

Agreed.  I've found that using SELECT lists is considerably faster than 
dynamic arrays.

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Tom Dodds
Be careful with remove if you are changing the original string.  This is
from the UniVerse manual on REMOVE.

The pointer is reset to the beginning of dynamic.array whenever
dynamic.array is reassigned. Therefore, dynamic.array should not be assigned
a new value until all elements have been extracted (that is, until variable
= 0).

Tom 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George Gallen
Sent: Monday, November 17, 2008 1:27 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

I believe that the later versions of UV does keep a current pointer, so
the REMOVE shouldn't be much faster, as long as you don't write back to the
dynamic
  array.

George

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Joshua Gallant
> Sent: Monday, November 17, 2008 1:31 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> 
> When running through an array with a for next loop the last item
> processed isn't remembered so the program needs to traverse the entire
> array for each record and will slow down as you get to 
> records later in
> the process.
> 
> Instead of this:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> Try something like this instead:
> 
> LOOP
> REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> WHILE MARK DO
> REPEAT
> 
> That will keep track of where you were in the array and pick up where
> you left off.
> 
> Let me know how that works out for you.
> 
> Thanks,
> Josh
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
> Sent: Monday, November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> Is there a way to speed up spinning through a very large 
> dynamic table?
> Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get really slow.
> Any tips
> on speeding this up?
> ---
> 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/

__ Information from ESET NOD32 Antivirus, version of virus signature
database 3619 (20081117) __

The message was checked by ESET NOD32 Antivirus.

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


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread David Wolverton
If you don't want to 'swap' all the other markers with 'strings' (SWAP @VM
WITH "<>" IN RECORD) then you have to 'build' the line item up -- keep
removing until you see the remove hit the @AM and then process the line...

DW 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Laansma
> Sent: Monday, November 17, 2008 1:24 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> Oh my goodness!  This is incredible.
> 
> Okay, now I have a mixture of @VM and @AM in the table.  The 
> REMOVE 'stops' at every @VM and @AM.  I only want it to 
> 'stop' at @AMs.  How do I do that?
> 
> David Laansma
> IT Manager
> Hubbard Supply Co. 
> Direct: 810-342-7143
> Office:810-234-8681
> Fax: 810-234-6142
> www.hubbardsupply.com
> "Delivering Products, Services, and Innovative Solutions"
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread Anthony W. Youngman
In message <[EMAIL PROTECTED]>,
Joshua Gallant <[EMAIL PROTECTED]> writes
>When running through an array with a for next loop the last item
>processed isn't remembered so the program needs to traverse the entire
>array for each record and will slow down as you get to records later in
>the process.

I thought UV had optimisations so that (as long as it is FIELDS) the
last item processed IS remembered and it carries on scanning from where
it left off.
>
>Instead of this:
>
>A11 = DCOUNT(IN.TAB,@AM)
>
>FOR A1 = 1 TO A11
>  IN.LINE = IN.TAB
>  SWAP @VM WITH @AM IN IN.LINE
>  CUST.NUM  = IN.LINE<1>
>  CUST.DESC = IN.LINE<2>
>NEXT A1
>
Seeing as this snippet does nothing much, I'd guess that the problem is
actually somewhere in the code you've snipped - do you assign back to
IN.TAB at any point? That *really* will get slow.

>Try something like this instead:
>
>LOOP
>REMOVE IN.LINE FROM IN.TAB SETTING MARK
>  SWAP @VM WITH @AM IN IN.LINE
>  CUST.NUM  = IN.LINE<1>
>  CUST.DESC = IN.LINE<2>
>WHILE MARK DO
>REPEAT
>
>That will keep track of where you were in the array and pick up where
>you left off.
>
>Let me know how that works out for you.
>
I'd do the following (INFORMATION-style flavours only!)

A11 = DCOUNT(IN.TAB,@AM)
DIM IN.TAB.M(A11)
MATPARSE IN.TAB.M FROM IN.TAB, @FM

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB.M(A1)
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

If you've been assigning to IN.TAB, you can then get it all back with
MATBUILD IN.TAB FROM IN.TAB.M, @FM

(Check my syntax - I've probably got MATPARSE/MATBUILD wrong - I look
them up in the manual when I need them :-)

Something to bear in mind ... using dimensioned arrays will ALWAYS beat
dynamic arrays for speed. Which is more important to you? The
flexibility of dynamic or the speed of dimensioned? And in PI-style
accounts you can have the advantages of both - dimensioned arrays can be
defined "on the fly", at a small cost in clarity-of-code.

With small arrays I can never be bothered with dimensioned arrays. As
soon as I start heavily manipulating arrays, or they start getting big,
I look at dimensioned arrays and wonder "are they worth it". Sometimes
they are, sometimes they aren't. Looking at your case, they almost
certainly are!

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] Speeding up processing through large dynamic table

2008-11-17 Thread Allen Egerton

Joshua Gallant wrote:

When running through an array with a for next loop the last item
processed isn't remembered so the program needs to traverse the entire
array for each record and will slow down as you get to records later in
the process.

Instead of this:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

Try something like this instead:

LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

That will keep track of where you were in the array and pick up where
you left off.

Let me know how that works out for you.



Unfortunately, that won't quite work.

The REMOVE statement removes the next element, and since he's got 
embedded attributes (@AM), that approach will return the attribute 
instead of the entire line.


Unfortunately.  And particularly since the approach you recommend is one 
that I like, and use a lot 'cause you're absolutely correct about the 
indexing of the elements.


However, this will work:  (at least on Universe):
0001   IN.TAB = "" 

0002   IN.TAB:= "NAME-ONE": @VM: "DESC-ONE": @VM: "1A": @VM: "1B" 

0003   IN.TAB:= @AM: "NAME-TWO": @VM: "DESC-TWO": @VM: "2A": @VM: 
"2B"
0004   IN.TAB:= @AM: "NAME-THREE": @VM: "DESC-THREE": @VM: "3A": 
@VM: "3B":
  @VM: "3C" 

0005 

0006   REM1 = 999 

0007   LOOP WHILE REM1 NE 0 

0008  REMOVE CUST.NAME FROM IN.TAB SETTING REM1 

0009  CRT "CUST.NAME: ": CUST.NAME 

0010  REMOVE CUST.DESC FROM IN.TAB SETTING REM1 

0011  CRT "CUST.DESC: ": CUST.DESC 

0012  LOOP WHILE REM1 EQ 3 

0013 REMOVE EXCESS FROM IN.TAB SETTING REM1 

0014 CRT "REMOVED ": EXCESS 

0015  REPEAT 

0016  CRT 

0017   REPEAT 

0018   STOP 

>RUN ADE.BP TT 

CUST.NAME: NAME-ONE 

CUST.DESC: DESC-ONE 

REMOVED 1A 

REMOVED 1B 




CUST.NAME: NAME-TWO 

CUST.DESC: DESC-TWO 

REMOVED 2A 

REMOVED 2B 




CUST.NAME: NAME-THREE 

CUST.DESC: DESC-THREE 

REMOVED 3A 

REMOVED 3B 


REMOVED 3C


--
Allen Egerton
aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Speeding up processing through large dynamic table

2008-11-17 Thread George Gallen
I believe that the later versions of UV does keep a current pointer, so
the REMOVE shouldn't be much faster, as long as you don't write back to the 
dynamic
  array.

George

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Joshua Gallant
> Sent: Monday, November 17, 2008 1:31 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Speeding up processing through large dynamic table
> 
> 
> When running through an array with a for next loop the last item
> processed isn't remembered so the program needs to traverse the entire
> array for each record and will slow down as you get to 
> records later in
> the process.
> 
> Instead of this:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> Try something like this instead:
> 
> LOOP
> REMOVE IN.LINE FROM IN.TAB SETTING MARK
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> WHILE MARK DO
> REPEAT
> 
> That will keep track of where you were in the array and pick up where
> you left off.
> 
> Let me know how that works out for you.
> 
> Thanks,
> Josh
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
> Sent: Monday, November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> Is there a way to speed up spinning through a very large 
> dynamic table?
> Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get really slow.
> Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread Dave Laansma
Oh my goodness!  This is incredible.

Okay, now I have a mixture of @VM and @AM in the table.  The REMOVE
'stops' at every @VM and @AM.  I only want it to 'stop' at @AMs.  How do
I do that?

David Laansma
IT Manager
Hubbard Supply Co. 
Direct: 810-342-7143
Office:810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services, and Innovative Solutions"

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joshua Gallant
Sent: Monday, November 17, 2008 1:31 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

When running through an array with a for next loop the last item
processed isn't remembered so the program needs to traverse the entire
array for each record and will slow down as you get to records later in
the process.

Instead of this:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

Try something like this instead:

LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

That will keep track of where you were in the array and pick up where
you left off.

Let me know how that works out for you.

Thanks,
Josh


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread Mecki Foerthmann

READNEXT could be an option

SELECT IN.TAB
LOOP WHILE READNEXT IN.LINE DO
  CUST.NUM=IN.LINE<1,1>
  CUST.DESC=IN.LINE<1,2>
REPEAT

this should be lightning-fast regardless how big IN.TAB is.

David Laansma wrote:

Is there a way to speed up spinning through a very large dynamic table?  Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.  Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread Marvin R. Fisher
So the remove pointer (mark) works like the example believes it should...

SWAP @VM WITH CHAR(0) IN IN.TAB
LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP CHAR(0) WITH @AM IN IN.LINE  
*  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

Marvin R. Fisher
Technical Resource Group
A Pipeline Group Company
2850 Red Hill Ave.
Suite 110
Santa Ana, CA 92705
Tel (949) 296-8380 ext. 620
Fax (949) 756-0029
Pipeline Software Statement: This email message is confidential and may be 
legally privileged. The contents contained within, including any attached 
files, are intended solely for the addressee(s). Access by anyone other than 
the addressee(s) is unauthorized. If you are not the intended recipient, any 
disclosure, copying, distribution or any action, taken or not taken, in 
reliance on it, is prohibited and may be unlawful. If you believe that you have 
received this email message in error, please contact the sender. Any views 
expressed within are those of the individual sender, except where the sender 
specifies and with authority, states them to be the views of Pipeline-Software, 
Inc., Santa Ana, CA.

(The contents of this email message have been scanned for the presence of 
computer viruses.)


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Gallant
Sent: Monday, November 17, 2008 10:31 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Speeding up processing through large dynamic table

When running through an array with a for next loop the last item
processed isn't remembered so the program needs to traverse the entire
array for each record and will slow down as you get to records later in
the process.

Instead of this:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

Try something like this instead:

LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

That will keep track of where you were in the array and pick up where
you left off.

Let me know how that works out for you.

Thanks,
Josh


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread David Beaty
If the array IN.TAB is only attributed, with say the customer number & 
description with pipe delimited you can use REMOVE:


LOOP
   REMOVE IN.LINE FROM IN.TAB SETTING MORE
UNTIL IN.LINE = "" DO
   CUST.NUM = FIELD(IN.LINE,"|",1)
   CUST.DESC = FIELD(IN.LINE,"|",2)
REPEAT

--
From: "George Gallen" <[EMAIL PROTECTED]>
Sent: Monday, November 17, 2008 7:05 PM
To: 
Subject: RE: [U2] Speeding up processing through large dynamic table


What if you eliminated the SWAP
  and changed:

CUST.NUM = IN.LINE<1,1>
CUST.DESC = IN.LINE<1,2>

How long does it take?

George


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table


Is there a way to speed up spinning through a very large
dynamic table?  Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get
really slow.  Any tips
on speeding this up?
---
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] Speeding up processing through large dynamic table

2008-11-17 Thread George Gallen
What if you eliminated the SWAP
   and changed:

CUST.NUM = IN.LINE<1,1>
CUST.DESC = IN.LINE<1,2>

How long does it take?

George

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of David Laansma
> Sent: Monday, November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> 
> Is there a way to speed up spinning through a very large 
> dynamic table?  Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get 
> really slow.  Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread u2ug
Check into REMOVE , it should speed this up quite a bit.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of David Laansma
> Sent: November 17, 2008 1:10 PM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] Speeding up processing through large dynamic table
> 
> Is there a way to speed up spinning through a very large dynamic
table?
> Here is
> a sample of my program:
> 
> A11 = DCOUNT(IN.TAB,@AM)
> 
> FOR A1 = 1 TO A11
>   IN.LINE = IN.TAB
>   SWAP @VM WITH @AM IN IN.LINE
>   CUST.NUM  = IN.LINE<1>
>   CUST.DESC = IN.LINE<2>
> NEXT A1
> 
> A11 is 85,000+ and as this loop goes on, this thing get really slow.
> Any tips
> on speeding this up?
> ---
> 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] Speeding up processing through large dynamic table

2008-11-17 Thread Joshua Gallant
When running through an array with a for next loop the last item
processed isn't remembered so the program needs to traverse the entire
array for each record and will slow down as you get to records later in
the process.

Instead of this:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

Try something like this instead:

LOOP
REMOVE IN.LINE FROM IN.TAB SETTING MARK
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
WHILE MARK DO
REPEAT

That will keep track of where you were in the array and pick up where
you left off.

Let me know how that works out for you.

Thanks,
Josh


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Laansma
Sent: Monday, November 17, 2008 1:10 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Speeding up processing through large dynamic table

Is there a way to speed up spinning through a very large dynamic table?
Here is
a sample of my program:

A11 = DCOUNT(IN.TAB,@AM)

FOR A1 = 1 TO A11
  IN.LINE = IN.TAB
  SWAP @VM WITH @AM IN IN.LINE
  CUST.NUM  = IN.LINE<1>
  CUST.DESC = IN.LINE<2>
NEXT A1

A11 is 85,000+ and as this loop goes on, this thing get really slow.
Any tips
on speeding this up?
---
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/