Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* system command
@ 2000-11-13  5:00 Tobias Funk
  2000-11-13  5:00 ` Ken Fairfield; SLAC: 650-926-2924; FAX: 926-3515
  2000-11-16  5:00 ` Hoff Hoffman
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Funk @ 2000-11-13  5:00 UTC (permalink / raw)


Hi,

We are using a alpha machine with VMS 6.2. I am writing a fortran
program and trying to use a system command. I know that you can do this
wit fortran under unix with the following command:
value=system("command"). Is there something comparable under VMS?
Thanks for your help
Tobias


--
_________________________________

--
____________________________________________________

Dr. Tobias Funk
LBNL
1 Cyclotron Rd , MS 6-2100
Berkeley CA 94720
USA

phone : 1 (510) 495 2889
fax   : 1 (510) 486 5664
e-mail: funk@lbl.gov





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: system command
  2000-11-13  5:00 system command Tobias Funk
@ 2000-11-13  5:00 ` Ken Fairfield; SLAC: 650-926-2924; FAX: 926-3515
  2000-11-16  5:00 ` Hoff Hoffman
  1 sibling, 0 replies; 3+ messages in thread
From: Ken Fairfield; SLAC: 650-926-2924; FAX: 926-3515 @ 2000-11-13  5:00 UTC (permalink / raw)


In article <3A101BEC.95888D33@lbl.gov>, Tobias Funk <funk@lbl.gov> writes:

> We are using a alpha machine with VMS 6.2. I am writing a fortran
> program and trying to use a system command. I know that you can do this
> wit fortran under unix with the following command:
> value=system("command"). Is there something comparable under VMS?

        Yes, you probably want LIB$SPAWN.   Look  it  up in the Run-time
    Library  reference  manual,  or  the online help as  HELP  RTL  LIB$
    LIB$SPAWN.  There are a number of differences between unix and  VMS,
    so  the  above  may  or  may not work as you expect.  But that's the
    starting point.

        Note that VMS questions are usually better asked on comp.os.vms.

            -Ken
-- 
 Kenneth H. Fairfield            |  Internet: Fairfield@SLC.Slac.Stanford.Edu
 SLAC, 2575 Sand Hill Rd, MS 46  |  Voice:    650-926-2924
 Menlo Park, CA  94025           |  FAX:      650-926-3515
 -----------------------------------------------------------------------------
 These opinions are mine, not SLAC's, Stanford's, nor the DOE's...



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: system command
  2000-11-13  5:00 system command Tobias Funk
  2000-11-13  5:00 ` Ken Fairfield; SLAC: 650-926-2924; FAX: 926-3515
@ 2000-11-16  5:00 ` Hoff Hoffman
  1 sibling, 0 replies; 3+ messages in thread
From: Hoff Hoffman @ 2000-11-16  5:00 UTC (permalink / raw)



In article <3A101BEC.95888D33@lbl.gov>, Tobias Funk <funk@lbl.gov> writes:
:We are using a alpha machine with VMS 6.2. I am writing a fortran
:program and trying to use a system command. I know that you can do this
:wit fortran under unix with the following command:
:value=system("command"). Is there something comparable under VMS?

  Please use the lib$spawn call, it will be easier and more flexible.

  Fortran and C code can be intermixed and you can call system (decc$system,
  since Fortran doesn't add the prefix for you) from Fortran, but C and 
  Fortran have differing assumptions around default argument passing.  C 
  assumes ASCIZ strings, while Fortran assumes ASCID strings.  This means 
  that you would have to create C-format strings in Fortran...

  I'll ask that the response to the version of this question posed over
  in the Ask The Wizard area be cancelled.

 --------------------------- pure personal opinion ---------------------------
   Hoff (Stephen) Hoffman   OpenVMS Engineering   hoffman#xdelta.zko.dec.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-11-16  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-13  5:00 system command Tobias Funk
2000-11-13  5:00 ` Ken Fairfield; SLAC: 650-926-2924; FAX: 926-3515
2000-11-16  5:00 ` Hoff Hoffman

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