Adrian:

An "unnamed" common is not lost between subroutine calls. It is only lost when a program (not a subroutine) completes execution. So, If I run PROGRAM1, set "unnamed" common within it, then call SUBROUTINE1, then call SUBROUTINE2, "unnamed" common is kept until PROGRAM1 completes execution, even though SUBROUTINE2 completed execution then SUBROUTINE1 completed execution.

This is where you have to be careful with non-telnet connectivity. Sometimes, a product has a BASIC subroutine listening at the U2 end then CALLS the subroutines specified. In this case, the use of all common has to be thought about.

Bill

------------------------------------------------------------------------
Adrian Halid said the following on 10/7/2009 11:36 PM:
Thanks for the help.

It seems once you name your common block you do not get the error anymore.

Just having a read of the documentation about the common statement in the 
documentation.

"A common area can be either named or unnamed. An unnamed common area is
lost when the program completes its execution and control returns to the 
UniVerse
command level. A named common area remains available for as long as the user
remains in the UniVerse environment."

>From what it says I should be able to have them unnamed and loose it between 
subroutine calls.

Regards


Adrian Halid
Senior Analyst/Programmer
IT Vision Australia Pty Ltd (ABN: 34 309 336 904)
PO Box 881, Canning Bridge WA 6153
Level 3, Kirin Centre, 15 Ogilvie Road, Applecross, WA, 6153
P:  (08) 9315 7000      F:  (08) 9315 7088
E:  [email protected]        W: http://www.itvision.com.au
___________________________________________________________ NOTICE : This e-mail and any attachments are intended for the addressee(s) only and may
contain confidential or privileged material. Any unauthorised review, use, 
alteration,
disclosure or distribution of this e-mail (including any attachments) by an 
unintended recipient
is prohibited. If you are not the intended recipient please contact the sender 
as soon as
possible by return e-mail and then delete both messages.
___________________________________________________________


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Womack, Adrian
Sent: Thursday, 8 October 2009 2:19 PM
To: U2 Users List
Subject: Re: [U2] UniObject .NET Session and Common Block Bug


The common blocks you've shown are not named - maybe that's your
problem.
Try naming them (i.e. adding a unique slash-delimited name between the
word COMMON and the variable name(s).

eg.
COMMON /AHC1/ AHCOMMON1
&
COMMON /AHC2/ AHCOMMON2

That way there won't be any conflict between the two blocks.
We use named common extensively and it is mostly "lazy loaded" i.e. only
loaded the first time it's required, and we don't have any problems.


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Adrian Halid
Sent: Thursday, 8 October 2009 11:07 AM
To: [email protected]
Subject: [U2] UniObject .NET Session and Common Block Bug

<snip>
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to