George, Edward,

Just a shot in the dark - prompted by Edwards comment "something else that destroys the list".

We found on UniData that, when a SELECT statement creates a list outside of the program issuing the SELECT, any other SELECT statement issued by the same user in the same or any other program destroys the previously active list.

The solution was to EXECUTE the SELECT statement with a RTNLIST to an internal list var and then READNEXT the items FROM the list var within the program.

This way you can have as many lists as you wish without stepping on any other list as long as the list var names are unique.

hth,

Dave

Dave Taylor
Sysmark Information Systems, Inc.
Authorized IBM Business Partner
49 Aspen Way
Rolling Hills Estates, CA 90274
(O) 800-SYSMARK (800-797-6275)
(F) 310-377-3550
(C) 310-561-5200
www.sysmarkinfo.com
----- Original Message ----- From: "Edward Brown" <[email protected]>
To: <[email protected]>
Sent: Friday, February 27, 2009 7:52 AM
Subject: RE: [U2] Strange happening...


It looks like it's already been followed within the debugger to get the
information given by George below.

One possibility is that the gosub'd code is doing a CLEARSELECT under
some circumstances, or something else that destroys the list? Possibly
also the gosub'd code has a GO that's destroying the call stack? Of
course these assume that the removal of the UNTIL ID DO line is a red
herring and the cause is elsewhere...

I'd try reducing the code around the loop - see if a minimal test case
gives the same result? If so then it looks like a bug in the compiler.

Edward

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David A. Green
Sent: 27 February 2009 15:33
To: [email protected]
Subject: RE: [U2] Strange happening...

I would follow it line-by-line with the debugger.

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


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of George Gallen
Sent: Friday, February 27, 2009 8:21 AM
To: [email protected]
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/
-------
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/

Reply via email to