From:	CSBVAX::MRGATE!@KL.SRI.COM:info-vax-request@kl.sri.com@SMTP 13-NOV-1987 19:04
To:	EVERHART
Subj:	Re: VAX C!  Help me!!

Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Thu 12 Nov 87 12:00:14-PST
Received: by ucbvax.Berkeley.EDU (5.58/1.26)
	id AA03114; Thu, 12 Nov 87 11:48:48 PST
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 12 Nov 87 15:40:00 GMT
From: hao!noao!stsci!barsh@ames.arpa  (John Barshinger)
Organization: Space Telescope Science Institute, Baltimore, MD 21218
Subject: Re: VAX C!  Help me!!
Message-Id: <99@obi-wan>
References: <3297@xanth.UUCP>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

in article <3297@xanth.UUCP>, manes@xanth.UUCP (Mark Manes) says:
> 
> I have a problem folks, I have just installed VAX C, on VMS 4.6.
> 
> I want to call LIB$SPAWN and can't find a decent example, this program
> that I am uploading does not work, however does compile, would someone
> be so kind as to show me where I have messed up?



The following is a working example:

#include <stdio.h>
#include <descrip.h>
#include <ssdef.h>
 
main()
{  
	$DESCRIPTOR (command_text, "show users");
	$DESCRIPTOR (output_file, "disk.dat");
	int	status;
 
	if ((status = LIB$SPAWN(&command_text, 0, &output_file)) != SS$_NORMAL)
	  printf("Command Failed %d\n",status);
 
}
 
					jrbii
					~~~~~ 
