Yes, but why make all the programmers in the world repeat this same code over and over? It could easily be accomplished by the database engine. It could be a new keyword across MV database systems. And another step in bring the MV worlds closer together.
David A. Green (480) 813-1725 DAG Consulting -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists Sent: Friday, April 13, 2012 11:00 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] COMMON Size MisMatch On 13/04/12 15:56, David A. Green wrote: > That's why you would specify. > > Example: > > COMMON /SYSSTUFF/ SYSSTUFF(100) > > COMMON /MYSTUFF/ MYSTUFF.REC(100) -CLEAR.ON.LOGTO > > Then only the MYSTUFF gets cleared. This is the kind of logic that I > have to end up writing over and over again to make sure new files get > opened when a person does LOGTO to a different account. > > Programmers would make all their Account specific data into a single > named common that has the flag to initialize on LOGTO. And keep other > cross-account data in common that isn't flagged. > > Easy. Actually, that IS easy. TODAY. Let's say you want to store a filepointer to VOC in common, you create the following INCLUDE file... COMMON /VOC/ F.VOC, D.VOC, VOC.OPEN IF VOC.OPEN NE @WHO THEN VOC.OPEN = @WHO OPEN "", "VOC" TO F.VOC ... OPEN "DICT", "VOC" TO D.VOC ... END I hope I've got the right @variable, but as soon as you LOGTO, the IF goes false, and next to you try access it, it will re-initialise itself. Cheers, Wol (Moderator moan - I've just snipped an AWFUL lot of text ...) _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users