But -- don't test if an open file pointer exists as this example would
suggest if you are multi-account -- If you move from account to account, the
open file **would** persist, but likely be wrong. We've seen that MANY a
time where the report is giving data totally unrelated to the account we are
in.

Do as others have shown - add the account name into the variable list and
confirm that the account name is assisgned AND matches the current account.

David W. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Gravagno
Sent: Thursday, September 01, 2005 2:38 PM
To: [email protected]
Subject: RE: [U2] Programs slowing down after many iterations

I'll echo the concept of using named common to cache file handles to avoid
re-opening.  I use this as a key technique in web applications.  Funny
enough, right before I got to this thread I wrote a paper to explain to one
of my clients how it works.

The key thing is to use Named common, not regular common.  I use code like
this:

COMMON \APP1\ FILE1,FILE2
IF UNASSIGNED(FILE1) THEN
* note in D3 and maybe other MV platforms that's
*    IF ASSIGNED(...) ELSE or IF NOT(ASSIGNED(...)) THEN ...
   GOSUB OPEN.FILES  ; * file1 is assigned there
   IF ERR THEN RETURN ; * always handle errors from file opening END ...
Continue with code here, secure that at some point the files were opened

<snip>
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to