Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hoffman@xdelta.enet.dec.nospam (Hoff Hoffman)
Subject: Re: VMS Programming question
Date: 1998/11/06	[thread overview]
Message-ID: <7200u7$a41@usenet.pa.dec.com> (raw)
In-Reply-To: 363F65C7.4050@nswc.navy.mil


In article <363F65C7.4050@nswc.navy.mil>, "David W. Fisher" <dwfishe@nswc.navy.mil> writes:
:I'm writing a c program and need to determine what the user typed-in on
:the command line. The c routine currently uses argc and argv to pickup
:the input to main, but the tricky part is: the c program is being call
:as a verb from a ".CLD" file. Consequently, argv[0] is not what the
:user typed, but the image set-up in the ".CLD". The question is: how
:do I get the information the user typed (i.e., the verb)?

  There are two mechanisms of retrieving user input when an image
  is activiated -- via the foreign command mechanism and such calls
  as lib$get_foreign and its derivatives such as the C argc/argv 
  mechanism, and via the system command definition tables (or via 
  per-process SET COMMAND operations) and the OpenVMS CLI interface 
  callback routines.

  In this case, you will likely want to avail yourself of the CLI
  routines, as documented in the utility routines reference manual.

  One wrinkle: the CLI routines use OpenVMS signals -- which are
  different from C signals, though they are the underpinnings of
  how C signals are implemented on OpenVMS -- which means you will
  likely need to establish a signal handler when working with the
  CLI calls, an example of establishing a signal hander would be a 
  call to the routine VAXC$ESTABLISH( lib$sig_to_ret ); -- this sets
  up a routine that turns the signal into a return status value.

  You'll also have to learn about using string descriptors in C,
  if you have not already done so.  Please see "PROG13. What is a 
  descriptor?" in the OpenVMS Frequently Asked Questions (FAQ)
  for details on descriptors -- if you are not already familiar
  with them, of course...

	--

  ps: comp.os.vms is a better spot for most OpenVMS questions.

 -------------------------- pure personal opinion ---------------------------
 Hoff (Stephen) Hoffman   OpenVMS Engineering   hoffman@xdelta.ZZenet.dec.com
  note to those folks not contributing spam -- there is no ZZ in my address




      reply	other threads:[~1998-11-06  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-03  5:00 VMS Programming question David W. Fisher
1998-11-06  5:00 ` Hoff Hoffman [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox