[an error occurred while processing this directive]

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

Quick Links

» Non-javascript page
» Ask the Wizard
» OpenVMS FAQ

Test Drive OpenVMS

» OpenVMS I64 test drive
» Java test drive

Other information resources available to you include:

» OpenVMS freeware
» ECO kits, software and hardware support, prior version support
» Alpha SRM, ARC, and AlphaBIOS firmware updates
» ENCOMPASS - HP user group
» OpenVMS software downloads, OpenVMS freeware CD-ROM
» OpenVMS firmware locations
» DECconnect passive adaptor charts
» Cables reference guide
» MicroVAX console commands
» OpenVMS student research

Select a topic below to see Questions Frequently Asked by partners

» Using the online documentation library(installing BNU from the asap SDK)
» Global sections(how to create and use.)
» xx$CREATE_BUFOBJ system service(usage)
» Ethernet address(methods of determination)
» Shareable images(cookbook approach to creating one)
» Sharing data/code at absolute addresses(a guide with examples)
» Determining the Alpha microprocessor
» Using GETSYI to get hardware status

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
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);
}