HP OpenVMS Systems

ask the wizard
Content starts here


» close window

The Question is:

Hi ,
 I am trying to get hostaname using lib$get_hostaname. My program runs
on all other system I have except on one system. On that system it gives
status as
Where as I can get hostname lexical f$getsyi() and I tried defining
SYS$NODE logical also. But no luck. Only difference between this node
and other node is that,  This node does not have decnet loaded on this.
Please suggest me what could be wrong on this?
/***                   getnodename.c
#include <stdio.h>
#include <stdlib.h>
#include <ssdef.h>
#include <string.h>
#include <descrip.h>
#include <lib$routines.h>
int retsts;
int ret_length;
char  *node_name_buff;
struct dsc$descriptor_s node_name;
node_name_buff=(char *) malloc(256 * (sizeof(char)));
node_name.dsc$w_length = (256 * sizeof(char));
node_name.dsc$b_class = DSC$K_CLASS_S;
node_name.dsc$b_dtype = DSC$K_DTYPE_T;
retsts=lib$get_hostname(&node_name, &ret_length);
fprintf(stderr,"Node name: %s\n", node_name.dsc$a_pointer);
/*********** End of  file getnodename.c  ***********/

The Answer is :

  The OpenVMS Wizard assumes that the system parameter SCSNODE has
  not been set up (via the use of MODPARAMS.DAT and AUTOGEN), and
  that neither DECnet Phase IV and DECnet-Plus is currently running
  on this system.
  The modification of a system-defined logical name such as SYS$NODE
  is not recommended.

answer written or last revised on ( 14-FEB-2000 )

» close window