Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!noao!stsci!barsh From: barsh@stsci.UUCP Newsgroups: comp.os.vms Subject: Re: Using System service in VAXC Message-ID: <106@ra> Date: Mon, 23-Nov-87 14:33:24 EST Article-I.D.: ra.106 Posted: Mon Nov 23 14:33:24 1987 Date-Received: Thu, 26-Nov-87 05:46:15 EST References: <8711230601.AA23969@ucbvax.Berkeley.EDU> Organization: Space Telescope Science Institute, Baltimore, MD 21218 Lines: 54 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