Re: [U2] Locks in subroutines

2007-10-09 Thread Martin Phillips

Hi all,

Very quick testing on my home machine, (Win2K and Universe PE) suggests 
that if you pass the opened file pointer from the main to the cataloged 
routine it works as you would expect.  If however, you do the file open 
within the subroutine it releases the lock when you return to the calling 
program.


--
Allen Egerton



Although most programmers think of the lock as being related to the file, it 
is actually related to a particular instance of opening the file via the 
associated file variable. The behaviour described by Allen above is what you 
should expect.


This is an essential feature of the language. If I open a file in a 
subroutine and either explicitly release all my locks using the variant of 
RELEASE with only a file variable or I simply close the file while I have 
locks in place, this should not (must not) affect other parts of my 
application that may have locks in the same file.


This all comes down to the programming theory concept of encapsulation 
where one part of an application should not need to know anything about what 
it happening elsewhere.


Note that if I copy the file variable, these are both references to the same 
file instance and locks are shared between the two file variables.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
---

u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Locks in subroutines

2007-10-09 Thread Brett Callacher
It's interesting how one man's feature is another's bug... coming from a 
Pick/AP/D3 background I was horrified to encounter this behaviour in Universe.

I am not convinced by the encapsulation argument here.  If the lock is truly 
local to the file variable then should a READU in the subroutine be respected 
by other instances elsewhere?  Of course it should and so should the release.

I would contend that a global RELEASE with just a file variable (or worse none 
at all) is bad programming practice anyway...

My tuppence.

Brett

Martin Phillips [EMAIL PROTECTED] wrote in message news:[EMAIL 
PROTECTED]...
 Hi all,

  Very quick testing on my home machine, (Win2K and Universe PE) suggests
  that if you pass the opened file pointer from the main to the cataloged
  routine it works as you would expect.  If however, you do the file open
  within the subroutine it releases the lock when you return to the calling
  program.
 
  --
  Allen Egerton


 Although most programmers think of the lock as being related to the file, it
 is actually related to a particular instance of opening the file via the
 associated file variable. The behaviour described by Allen above is what you
 should expect.

 This is an essential feature of the language. If I open a file in a
 subroutine and either explicitly release all my locks using the variant of
 RELEASE with only a file variable or I simply close the file while I have
 locks in place, this should not (must not) affect other parts of my
 application that may have locks in the same file.

 This all comes down to the programming theory concept of encapsulation
 where one part of an application should not need to know anything about what
 it happening elsewhere.

 Note that if I copy the file variable, these are both references to the same
 file instance and locks are shared between the two file variables.


 Martin Phillips
 Ladybridge Systems Ltd
 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
 +44-(0)1604-709200
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Locks in subroutines

2007-10-09 Thread Brian Leach
Noel

The locks will be released when the file variable goes out of scope.
If the file variable is retained - either by passing it as an argument or using 
named common - the lock will also be retained.

Regards


Brian

Hi all,

I am porting some code from D3 to Universe 10.1.11 on Windows (and then 
to Linux 10.2.x)

I have a subroutine that does a READU on an item and leaves the lock set 
when it returns to the calling the program (The calling program will 
release the lock at a later stage). However, Universe is releasing the 
lock when it returns from subroutine. Is this a known feature and is 
there an option to turn off this behaviour?

Cheers,
Noel
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Locks in subroutines

2007-10-09 Thread Noel

Thank you to all that responded.

Yes the file is being opened withing the subroutine and no, is not easy 
to change it to open the file higher in the food chain. It seems that D3 
scopes the lock table according to the user that created the lock (the 
lock is released when they log off, if not explicitly released 
beforehand), whereas Universe scopes the lock at the life of the file 
variable used (as Brian and others suggested). Just another issue to 
work around when porting code from AP/D3.


This piece of code was an add-on for a tacked-on extension to a system 
many years ago by persons unknown. It may be easier to open most of the 
files in the system at logon time and put them in a named common.


Cheers,
Noel

Noel wrote:

Hi all,

I am porting some code from D3 to Universe 10.1.11 on Windows (and then 
to Linux 10.2.x)


I have a subroutine that does a READU on an item and leaves the lock set 
when it returns to the calling the program (The calling program will 
release the lock at a later stage). However, Universe is releasing the 
lock when it returns from subroutine. Is this a known feature and is 
there an option to turn off this behaviour?


Cheers,
Noel
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Locks in subroutines

2007-10-09 Thread Martin Phillips

Hi Brett,


I would contend that a global RELEASE with just a file variable (or
worse none at all) is bad programming practice anyway...


Despite being the author of the previous email, I completely agree. Any well 
designed program knows what locks it owns and can release them gracefully.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200 
---

u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Green Screen Dev. Environment

2007-10-09 Thread Cedric Fontaine (Nozumi Solutions)

Cooper, Rudy a icrit :

Hi list,
I know we can use gui tools like VS, MV.net, etc, but our transactional
system is all character based and that's what we want to stick with for
the time being.  I know AREV and SB+ are out there, but are there others
that anyone is using that is not 'home grown'?  And if you are using
AREV or SB+ how do you like it?


We're the editor of Winnix, an app terminal emulator. We worked on 
business components to develop fast GUI  in MV Database. If you wish, we 
can send  you a demo and some samples of programs.


--
Cordialement,
Cedric Fontaine
NOZUMI SOLUTIONS inc.
www.nozumi.ca
+1.514.313-3310
+1.646.867-1446
une filiale d'EASY SOFT France
www.easysoft.eu
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] U2:UV: Dynamo

2007-10-09 Thread Tim Franklin
Hi Manu,

I believe there are a number of 'Dynamo' products out there can you give
me details of that your Dynamo product does, I have a lot if experience
in one which is a 4GL, if we are talking the same product let me know
and I can be of help.

Regards,
Tim Franklin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manu Fernandes
Sent: 05 October 2007 15:47
To: u2-users@listserver.u2ug.org
Subject: [U2] U2:UV: Dynamo

Hi all,

Is there someone who have experience with Dynamo product under
Universe 9
Unix ?

I've a resurrected customer site (UV/AIX)) where I want to go on
Linux,
but Dynamo is not moveable.

Thanks for any help, contact, advice.

Manu
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Legal Disclaimer:
The information contained in this message may be privileged and confidential. 
It is intended to be read only by the individual or entity to whom it is 
addressed or by their designee. If the reader of this message is not the 
intended recipient, you are on notice that any distribution of this message, in 
any form, is strictly prohibited. If you have received this message in error, 
please immediately notify the sender and delete or destroy any copy of this 
message
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Locks in subroutines

2007-10-09 Thread Stevenson, Charles
Responding to this part only:

 Yes the file is being opened withing the subroutine and 
 no, is not easy to change it to open the file higher in the food
chain.

   SUBROUTINE XYZ( ... )
   COMMON /XYZ.ONLY/ XYZ.COMMON.INIT, FVAR
   IF NOT( XYZ.COMMON.INIT ) THEN
  OPEN 'whatever-file' TO FVAR ELSE ... Abort ? ...
  XYZ.COMMON.INIT = @TRUE
   END
   READU rec FROM FVAR, 'some-id' ELSE ...
   RETURN ;* readu lock ON whatever-file some-id is retained
  ;* and file remains open in /XYZ.ONLY/ common.
END


The calling program can later release that lock via:

   OPEN 'whatever-file' TO LOCAL.FVAR ...
   RELEASE LOCAL.FVAR, 'some-id'

BUT !!!NOT!!! By this: 

   OPEN 'whatever-file' TO LOCAL.FVAR ...
   RELEASE LOCAL.FVAR   
   

Yet these 2, within the calling program, WILL cause the record lock on
'some-id' to be released:
   RELEASE 
Or:
   STOP


I'm just describing what IS (10.0.16), not whether good or bad.
cds
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Locks in subroutines

2007-10-09 Thread colin.alfke
I'll second the suggestion to not use generic RELEASE statements and add
that if you do or may in the future use more than one data account to
add a path variable to your common and check if the current path is
different than the common path. 

hth
Colin Alfke
Calgary Canada

-Original Message-
From: Stevenson, Charles

Responding to this part only:

 Yes the file is being opened withing the subroutine and no, is not 
 easy to change it to open the file higher in the food
chain.

   SUBROUTINE XYZ( ... )
   COMMON /XYZ.ONLY/ XYZ.COMMON.INIT, FVAR
   IF NOT( XYZ.COMMON.INIT ) THEN
  OPEN 'whatever-file' TO FVAR ELSE ... Abort ? ...
  XYZ.COMMON.INIT = @TRUE
   END
   READU rec FROM FVAR, 'some-id' ELSE ...
   RETURN ;* readu lock ON whatever-file some-id is retained
  ;* and file remains open in /XYZ.ONLY/ common.
END


The calling program can later release that lock via:

   OPEN 'whatever-file' TO LOCAL.FVAR ...
   RELEASE LOCAL.FVAR, 'some-id'

BUT !!!NOT!!! By this: 

   OPEN 'whatever-file' TO LOCAL.FVAR ...
   RELEASE LOCAL.FVAR   
   

Yet these 2, within the calling program, WILL cause the record lock on
'some-id' to be released:
   RELEASE
Or:
   STOP


I'm just describing what IS (10.0.16), not whether good or bad.
cds
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Employement Opportunity

2007-10-09 Thread Lenore Von Hoene
PICK PROGRAMMER
Benco Dental Company is the nation's largest independent distributor of
dental supplies and equipment, voted one of the Best Places to Work for
four consecutive years.  We are seeking PICK programmers in DALLAS, TX and
WILKES-BARRE, PA with extensive programming experience in one or more of
the following:   Pick, Unidata, Universe, System Builder, SB+, Prelude,
ADS, and UniObjects.  Position requires troubleshooting and maintaining
current code on our Prelude ERP system and developing new mods for  that
application.
We offer a competitive compensation package, including a flexible benefits
program with health , dental, vision, short/long term disability, and life
insurances, as well as paid time off, profit sharing, and a generous 401k
retirement plan.
If this sounds like your type of work environment, we would like to hear
from you!  Please forward resume/letter of interest or complete an
application in person at:

Benco Dental Company
Attn: Lenore Von Hoene
11 Bear Creek Blvd.
Wilkes-Barre, Pa.  18702
Email: [EMAIL PROTECTED]
An Affirmative Action Employer
M/F/V/D



This communication (including any attachments) is intended only for use by the
addressee(s) named herein and may contain legally privileged or confidential
information. If you are not the intended recipient or an authorized
representative of the intended recipient on this communication, you are hereby
notified that any dissemination or distribution of this communication (or
attachments) is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and permanently delete the
communication and any attachments from your system.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Populating Excel Templates from UniVerse

2007-10-09 Thread Don P. Nagai
Hello All:



Just wondering what methods would be suggested for populating Excel
templates (invoices, work orders, etc.) with data from UniVerse.  Weve run
into problems with the newer HP printers no longer supporting PCL commands
and are looking for alternative forms printing options.



Thanks in advance for any suggestions.



Don
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Populating Excel Templates from UniVerse

2007-10-09 Thread Mark Ballinger
On 10/9/07, Don P. Nagai [EMAIL PROTECTED] wrote:

  Just wondering what methods would be suggested for populating Excel
 templates (invoices, work orders, etc.) with data from UniVerse.  We ve run
 into problems with the newer HP printers no longer supporting PCL commands
 and are looking for alternative forms printing options.

I've exported text files that populate a template with a manually-run
macro.  That works pretty well as long as the user is willing to run
the macro and as long as she doesn't upgrade Office!

I've exported spreadsheets using perl scripts and the writeexcel modules.

I've exported PDF using perl and the PDF API.  I highly recommend this
as my users can print the PDF, throw it away, forward it to a
supplier, etc.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[non associated plug] RE: [U2] Populating Excel Templates from UniVerse

2007-10-09 Thread Allen E. Elwood
'Reform' is a great product, that I'm not associated with.  I know of quite
a few companies that use this and just love it.

http://www.fabsoft.com/products/reform/whatis.shtml

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Don P. Nagai
Sent: Tuesday, October 09, 2007 17:33
To: u2-users@listserver.u2ug.org
Subject: [U2] Populating Excel Templates from UniVerse


Hello All:



Just wondering what methods would be suggested for populating Excel
templates (invoices, work orders, etc.) with data from UniVerse.  Weve run
into problems with the newer HP printers no longer supporting PCL commands
and are looking for alternative forms printing options.



Thanks in advance for any suggestions.



Don
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [AD] Populating Excel Templates from UniVerse

2007-10-09 Thread Tony G
From: Don P. Nagai
Just wondering what methods would be suggested for populating Excel
templates (invoices, work orders, etc.) with data from UniVerse.  We've run
into problems with the newer HP printers no longer supporting PCL commands
and are looking for alternative forms printing options.


Don - For your printing needs, PrintWizard can do PCL translations,
overlays, and other functions which should help you to get more out of your
printers, old and new:
 removethisNebula-RnD.com/products

(Please 'removethis' text from links to our site.)

For Excel, if you have existing spreadsheets, I'd opt for a custom add-in
that will reach into U2, execute programs, and pull out whatever data you
want.  More on this below.

I believe data can be pulled into existing documents with AccuTerm and
formulas - read fast and free solution.  Custom code that uses a Web
Service or other communications mechanism can extract data from U2.  UO.NET
is suitable for this - again read fast and free solution.  There are
demos on the 'net for having Excel call out with a web service, and on our
website (see the Gallery from the link below) you can see how to create a
web service to connect into U2 with mv.NET.  Just put the pieces
together...

To create new Excel documents, please have a look at a new product called
NebulaXLite.  XLite is a simple product I wrote to combat the typical
scenario where I.T. people respond to inquiries for Excel with a CSV file.
XLite allows you to create real Excel spreadsheets from BASIC, on any OS,
without Excel anywhere in the process.  Among other enhancements, an
upcoming version of XLite will include the ability to use a templates to
create new documents, but not to import data into existing documents.
Pricing is not included on the website but I've been asked a few times why
the price is so low - get it before someone convinces me to make a change.
:)  See FAQ for other details.

For more sophisticated documents, Excel add-ins are complex to write but
very powerful.  We used to have a product for doing this but it was
withdrawn, and custom development with Excel is now provided as a service,
sometimes using components from NebulAnalysis.  For an example of what's
possible, see this page for the dearly departed NebulAnalysis.
  removethisNebula-RnD.com/products/analysis.htm
An audio-video download of NebulAnalysis in action is available on request.
Again, that's just to show what's possible for creating rich Excel
documents from BASIC.  Don't let anyone tell you it can't be done...

HTH
Tony Gravagno
Nebula Research and Development
TG@ removethisNebula-RnD.com 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [AD] Populating Excel Templates from UniVerse

2007-10-09 Thread Bob Rasmussen
 From: Don P. Nagai
 Just wondering what methods would be suggested for populating Excel
 templates (invoices, work orders, etc.) with data from UniVerse.  We've run
 into problems with the newer HP printers no longer supporting PCL commands
 and are looking for alternative forms printing options.

To expand on the mention by Tony G: Print Wizard will take PCL output 
intended for a PCL printer and make it print on any printer Windows 
supports. Print Wizard is available as a freestanding program, with lots 
of ways to feed it from a U2 source. Or, the Print Wizard engine is 
embedded in AnzioWin, our terminal emulator, for the passthrough print 
channel. So if you can passthrough-print the document to AnzioWin, just 
turn on Translate PCL and you're up and running.

And then, with minor changes, you can generate PDFs (and email them), 
generate faxes, add form overlays to the above, and more. See website 
below.

Regards,
Bob Rasmussen,   President,   Rasmussen Software, Inc.

personal e-mail: [EMAIL PROTECTED]
 company e-mail: [EMAIL PROTECTED]
  voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
fax: (US) 503-624-0760
web: http://www.anzio.com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/