- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to get the address of a DECWindows Terminal
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2006 12:14 AM
тАО06-30-2006 12:14 AM
I need the address of a DECWindows terminal within a C program.
I could create a temporary file with the following contents.
$ SHOW DISPLAY
Device: WSA397: [super]
Node: 172.16.150.4
Transport: TCPIP
Server: 0
Screen: 0
I could then open the file and get the address 172.16.150.4 without any problem.
But is there another, better way to do this ? Is there a $QIO Sensmode function, which helps me to do this ?
Regards
Heinz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2006 01:04 AM
тАО06-30-2006 01:04 AM
Re: How to get the address of a DECWindows Terminal
To avoid the tmp-file you may use:
$ pipe sh disp/sym | sho sym decw$display_node | (read sys$pipe tmp ; ass/job/nolog &tmp tmp)
and the translate the logical tmp in C.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2006 01:19 AM
тАО06-30-2006 01:19 AM
SolutionAn example of undocumented IO$_SENSEMODE | IO$M_WS_DISPLAY once posted to c.o.v. can be found at
http://wwwvms.mppmu.mpg.de/vmssig/src/c/decw_show_display.c
As always: this may or may not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2006 06:55 PM
тАО06-30-2006 06:55 PM
Re: How to get the address of a DECWindows Terminal
In the meantime (ITRC was not reachable yesterday!) I found a own solution similar to the one from Karl.
system("PIPE SHOW DISPLAY/SYMB > NL:");
strcpy(nodename, getenv("DECW$DISPLAY_NODE"));
strcpy(transport, getenv("DECW$DISPLAY_TRANSPORT"));
But the statement 'system' does a SPAWN. I dont like this solution by creating a subprocess for such things.
I use now the solution proposed by Joseph. This is exactly what I'm looking for. Thanks Joseph.
In the code from Joseph I found a small mistake. QIO delivers the length of a string in IOSB[2] and not in IOSB[1]. After doing this change it works as I expected.
Thanks a lot
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2006 06:57 PM
тАО06-30-2006 06:57 PM
Re: How to get the address of a DECWindows Terminal
Heinz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2006 07:27 PM
тАО07-02-2006 07:27 PM
Re: How to get the address of a DECWindows Terminal
Since there were a lot of downloads for the above decw_show_display.c, I have corrected the error, and a small one in addition (terminating the string returned by QIO with ASCII zero before printing or returning to caller).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2006 10:08 PM
тАО07-02-2006 10:08 PM
Re: How to get the address of a DECWindows Terminal
Wim