Operating System - OpenVMS
1752798 Members
5528 Online
108789 Solutions
New Discussion

DECwindows WSAn device reuse

 
SOLVED
Go to solution
Joe Sewell
New Member

DECwindows WSAn device reuse

Is there any advantage to reusing a WSAn device vs. creating a new one?

In other words, is there any advantage to

$ DEFINE/JOB DECW$DISPLAY _WSA1:

over

$ SET DISPLAY/CREATE/TRANSPORT=LOCAL

(Other than slightly fewer characters, of course)
1 REPLY 1
John Gillings
Honored Contributor
Solution

Re: DECwindows WSAn device reuse

Joe,

The biggest issue in "reusing" that I can think of is finding a spare WSA device that you can use (ownership, object security, currently in use etc...). More bother than it's worth!

(also note that DECW$DISPLAY is usually a process logical name - I'd be careful changing a job logical name, as it can potentially affect other processes)

Where reuse may be more of an issue is in changing display attributes. /CREATE is only required if a display doesn't already exist. If it exists, just change it, rather than creating a new one. So, something like this:

$ IF F$TRNLNM("DECW$DISPLAY").EQS."" THEN SET DISPLAY/CREATE
$ SET DISPLAY/TRANSPORT=LOCAL

Each time you SET DISPLAY/CREATE a new WSA device is created - the old one is effectively lost (not deleted, and no restoration of the logical name if the new device is deleted). Fortunately they will be deleted when the process terminates.

The few bytes of NPAGEDYN don't really matter for a small number of extra WSA devices, but a long lived process in a loop might eventually cause trouble.

Obviously creating a new device is more expensive than changing an existing one, but for the likely frequency of changes, the difference is well below the noise floor.
A crucible of informative mistakes