Can You
SELECT File TO 1
To assign the selection to a list number, as the default list number is 0 it 
would cut down on the chances of the list being used by something else?
Just make sure at the end you PERFORM "DELETE.LIST 1" so it's not  hanging 
around.

Jeffrey Lettau
ERP Systems Manager
polkaudio 


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Jacques G.
Sent: Friday, February 27, 2009 12:27 PM
To: [email protected]
Subject: Re: [U2] Strange happening...

In the example of code you have, the loop will exit if your key (variable ID) 
is equal to an empty string or a string that can be evaluated to zero for 
example values like these:
0E1,0E10, 0E100  (on Universe)
"" (empty string)
0000

Will make the loop end:

> SELECT FILENAME
> LOOP
>    READNEXT ID ELSE EXIT
> WHILE ID DO
>    CODE
>    CODE with GOSUB
>    CODE
>    CODE
> REPEAT

Try:

SELECT FILENAME
LOOP WHILE READNEXT ID
  CODE...
REPEAT




----- Original Message ----
From: George Gallen <[email protected]>
To: "[email protected]" <[email protected]>
Sent: Friday, February 27, 2009 10:21:19 AM
Subject: RE: [U2] Strange happening...

that wasn't the case. The id was combination of 13 letters and numbers.
The strange part was where the while/do seemed to kick in.
   The item was read from the file without a problem
   3-4 lines of code execute as expected
   it then executed a gosub, but when it returned, it dropped out of the loop
      the id variable was never modified.

Strange.

George

> -----Original Message-----
> From: [email protected] [mailto:owner-u2-
> [email protected]] On Behalf Of Edward Brown
> Sent: Friday, February 27, 2009 9:39 AM
> To: [email protected]
> Subject: RE: [U2] Strange happening...
>
> If the ID equates to false it will exit - i.e. a record with ID 000000
>
> Edward
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of George Gallen
> Sent: 27 February 2009 14:26
> To: Ardent
> Subject: [U2] Strange happening...
>
> ok...I found this code snipit (REALITY FLAVOR)
>
> SELECT FILENAME
> LOOP
>    READNEXT ID ELSE EXIT
> WHILE ID DO
>    CODE
>    CODE with GOSUB
>    CODE
>    CODE
> REPEAT
>
>
> What was happening was the loop was exiting early,  but it was exiting
> after
> the
> CODE with GOSUB line was executed.
>
> What struck me was why there was a While DO as well as an EXIT in the
> loop?
> while nothing in the CODE or GOSUBs modified the ID, would having both
> the
> WHILE/DO and EXIT cause some kind of problem?
>
> After I removed (commented out) the WHILE/DO line, the program ran as
> expected
> and processed the 100,000 records, (whereas before it stopped after 6).
>
> George
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
>
> -----------------------------------------------------------------------
> --------------------
> Please remember to recycle wherever possible.
> Reduce, reuse, recycle, think do you need to print this e-mail?
> -----------------------------------------------------------------------
> --------------------
> This e-mail and any attachment(s), is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> addressee, dissemination, copying or use of this e-mail or any of its
> content is prohibited and may be unlawful. If you are not the intended
> recipient please inform the sender immediately and destroy the e-mail,
> any attachment(s) and any copies. All liability for viruses is excluded
> to the fullest extent permitted by law. It is your responsibility to
> scan or otherwise check this email and any attachment(s). Unless
> otherwise stated (i) views expressed in this message are those of the
> individual sender (ii) no contract may be construed by this e-mail.
> Emails may be monitored and you are taken to consent to this
> monitoring.
>
> Civica Services Limited, Company No. 02374268; Civica UK Limited,
> Company No. 01628868
> Both companies are registered in England and Wales and each has its
> registered office at 2 Burston Road, Putney, London, SW15 6AR.
> -----------------------------------------------------------------------
> --------------------
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Disclaimer: This email may contain confidential and/or privileged information. 
It is intended only for the person or persons to whom it is addressed. Any 
unauthorized review, use, or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email or telephone and 
destroy all copies of the original message.

Please consider the environment before printing this email.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to