[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

Compaq C, errno, and EVMSERR?

» close window

The Question is:

 
Hi Wizard
 
after a while i have connected my sockets using (C TCP/IP) and exhanged
data, i receive a message error :65535, and when i looked for the means of
this number in the errno.h file, i understant that this number cover all
error message not translated to VMS
. The Question is : how can i find explanation for this case of error.
Thank You.
Abdel .
 


The Answer is :

 
  When errno is found set to EVMSERR, then the OpenVMS condition value is
  available to you in the vaxc$errno variable.  vaxc$errno is valid when
  and only when errno is EVMSERR, and is otherwise undefined.
 
  Both the traditional errno and the OpenVMS-specific vaxc$errno variables
  are declared in the errno.h file provided with the Compaq C compiler.
 
  In general, the best way to handle error values is via the perror() and
  and strerror().  These calls correctly handle the various combinations
  of errno and vaxc$errno.  An example of these calls follows:
 
$ run x
1?: not enough core
2?: non-translatable vms error code: 0x124
%system-f-insfmem, insufficient dynamic memory
3?: not enough core
$ type x.c
#include <errno.h>
#include <stdio.h>
#include <ssdef.h>
main()
  {
  errno = ENOMEM;
  vaxc$errno = 0;
  perror("1?");
 
  errno = EVMSERR;
  vaxc$errno = SS$_INSFMEM;
  perror("2?");
 
  errno = ENOMEM;
  vaxc$errno = SS$_INSFMEM;
  perror("3?");
 
  return SS$_NORMAL;
  }
 

answer written or last revised on ( 8-SEP-1999 )

» close window