Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems

Ask the Wizard
» 

HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
Content starts here

Ask the Wizard Questions

Language: DECnet task to task communication example

The Question is:


Hi folks.

I've got a DECnet nontransparent task-to-task problem. I'm
trying to write a routine to accept incoming connection
requests, but I want to start the program manually in
advance of the request coming in. The routine will be an
alternative to a similar item which uses UCX via berkeley
sockets, but not the auxiliary server. An incoming argument
will say which net type is in use. It will have to run
on both VAX and Alpha, and just about every version of VMS
from 5.5-2 upwards.

The code I've generated from my understanding of the DECnet
manual does the following:

1) Create a mailbox.
2) Assigns a channel to "_NET:", with the mailbox attatched.
3) Issues a QIO with IO$_ACPCONTROL.
4) Posts a read on the mailbox.
5) Uses the NCB in the mailbox to accept the connection.

I get an access violation out of step 2 which makes me think
it's expecting its "_NET:" device to have been created by
DECnet in response to an incoming call it's already got.
I hope that I've just misunderstood the manual.

Is there a way to do what I'm trying to do, and if so could
you give me either a noddy example (ideally in "C") or a
list of the steps I should be coding?

Cheers,


The Answer is:

This works for us
--------------------------------------------------------------------------------
#include 
#include 
#include 

int main()
{
  long netdesc[2];
  long mbxlognam[2];
  int sts;
  short mbxchan, netchan;

  mbxlognam[1] = (long) "MyMailbox!";
  mbxlognam[0] = strlen(mbxlognam[1]);

  sts = sys$crembx(0, &mbxchan, 0, 0, 0, 0, mbxlognam, 0, 0);

  printf("$CREMBX status %X\n", sts);

  if (!(sts&1)) exit(sts);

  netdesc[1] = (long) "_NET:";
  netdesc[0] = strlen(netdesc[1]);

  sts = sys$assign(netdesc, &netchan, 0, mbxlognam, 0);

  printf("$ASSIGN status %X\n", sts);

  exit(sts);
}


 

** About PDF files: The PDF files on this Web site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software installed on your system, you may download it from the Adobe Web site.
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.