home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!UB.com!pacbell.com!sgiblab!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!kowari.cpsg.com.au!davids
- From: davids@kowari.cpsg.com.au (David Schulz)
- Subject: Help with SYS$GETSYI please!
- Message-ID: <davids.728101271@marloo.kowari.cpsg.com.au>
- Lines: 47
- Sender: news@kowari.cpsg.com.au (USENET News System)
- Nntp-Posting-Host: marloo.cpsg.com.au
- Organization: Computer Power Software Group Pty Ltd
- Date: Wed, 27 Jan 1993 02:21:11 GMT
-
- Hello,
-
- I am trying to use SYS$GETSYI to retrieve the local node name. The call is
- returning successfully, but the buffer is empty and return length is
- zero. Any help will be greatly appreciated. The code fragment below
- shows what I'm trying to do.
-
- Thanks in advance,
-
- David
-
-
- -----------------------------------------------------------------------------
-
- #include <syidef.h>
-
- int
- main()
- {
- int status;
- short version_len, node_len;
- char version[8];
- char node_name[15];
-
- struct item_list {
- short length;
- short code;
- int buf_addr;
- int return_length;
- } itmlst[] =
- {
- { 8, SYI$_VERSION, &version, &version_len },
- { 15, SYI$_NODENAME, &node_name, &node_len },
- { 0, 0, 0, 0 }
- };
-
- status = SYS$GETSYIW(0, 0, 0, &itmlst, 0, 0, 0);
-
- /* Returns version ok, but not node_name */
-
- printf("version = <%8s>, length = %d\r\n", version, version_len);
- printf("node = <%15s>, length = %d\r\n", node_name, node_len);
- }
-
- -----------------------------------------------------------------------------
- davids@kowari.cpsg.com.au
- -----------------------------------------------------------------------------
-