home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22098 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.6 KB  |  59 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!UB.com!pacbell.com!sgiblab!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!kowari.cpsg.com.au!davids
  3. From: davids@kowari.cpsg.com.au (David Schulz)
  4. Subject: Help with SYS$GETSYI please!
  5. Message-ID: <davids.728101271@marloo.kowari.cpsg.com.au>
  6. Lines: 47
  7. Sender: news@kowari.cpsg.com.au (USENET News System)
  8. Nntp-Posting-Host: marloo.cpsg.com.au
  9. Organization: Computer Power Software Group Pty Ltd
  10. Date: Wed, 27 Jan 1993 02:21:11 GMT
  11.  
  12. Hello,
  13.  
  14. I am trying to use SYS$GETSYI to retrieve the local node name.  The call is
  15. returning successfully, but the buffer is empty and return length is 
  16. zero.  Any help will be greatly appreciated.  The code fragment below
  17. shows what I'm trying to do.
  18.  
  19. Thanks in advance,
  20.  
  21. David
  22.  
  23.  
  24. -----------------------------------------------------------------------------
  25.  
  26. #include     <syidef.h>
  27.  
  28. int
  29. main()
  30. {
  31.     int        status;
  32.     short    version_len, node_len;
  33.     char    version[8];
  34.     char    node_name[15];
  35.  
  36.     struct item_list {
  37.         short        length;
  38.         short        code;
  39.         int            buf_addr;
  40.         int            return_length;
  41.     } itmlst[] =
  42.     {
  43.         {    8,    SYI$_VERSION,        &version,        &version_len    },
  44.         {    15,    SYI$_NODENAME,        &node_name,        &node_len    },
  45.         {    0,    0,                    0,                0    }
  46.     };
  47.  
  48.     status = SYS$GETSYIW(0, 0, 0, &itmlst, 0, 0, 0);
  49.  
  50.     /* Returns version ok, but not node_name */
  51.  
  52.     printf("version = <%8s>, length = %d\r\n", version, version_len);
  53.     printf("node = <%15s>, length = %d\r\n", node_name, node_len);
  54. }
  55.  
  56. -----------------------------------------------------------------------------
  57. davids@kowari.cpsg.com.au
  58. -----------------------------------------------------------------------------
  59.