From: CSBVAX::MRGATE!@KL.SRI.COM:info-vax-request@kl.sri.com@SMTP 24-NOV-1987 07:58 To: EVERHART Subj: Re: Using System service in VAXC Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Mon 23 Nov 87 17:23:54-PST Received: by ucbvax.Berkeley.EDU (5.58/1.26) id AA12158; Mon, 23 Nov 87 16:30:59 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: 23 Nov 87 19:33:24 GMT From: hao!noao!stsci!barsh@ames.arpa (John Barshinger) Organization: Space Telescope Science Institute, Baltimore, MD 21218 Subject: Re: Using System service in VAXC Message-Id: <106@ra> References: <8711230601.AA23969@ucbvax.Berkeley.EDU> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com in article <8711230601.AA23969@ucbvax.Berkeley.EDU>, NIELAND@FALCON.BERKELEY.EDU (Ted Nieland - SRL) says: > But the VAXC equivalent: > > read_key_vax(key) > char *key; > short int channel,status; > #include > int sysqiow(),sys$assign(); > > status = sys$assign("sys$input",channel,,); > status = sys$qiow(,channel,IO$_READVBLK + IO$M_NOECHO + IO$M_CVTLOW > ,,,,*key,256,,,,); > } > > Doesn't compile because it doesn't like the extra commas in the qiow statment. > > Any ideas out there 1. You can put zero's in for parameter's you don't use. 2. you must use a string descriptor to pass string's to VMS i.e. your "sys$input" will not work since it is a "C" string #include $DESCRIPTOR(sinp, "sys$input"); status = sys$assign(&simp, &channel, 0, 0); etc... 3. You must pass string descriptors by address, hence, the above ampersand in passing simp. 4. channel number in sys$assign must be passed by address if I remember correctly. 5. When specifying things like your lists in qio, you should OR in the values (i.e. IO$_READVBLK | IO$...) instead of adding them. 6. The system service manual specifies exactly how to pass parms to each ss, if you don't follow them exactly... If this doesn't help, I can come up with a working sample of this in a few minutes, just let me know... jrbii ~~~~~ -- John Barshinger Space Telescope Science Institute Baltimore, MD 21218 plink:jrbii | bix:jrbii | barsh@stsci.edu