From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b514935fdcccf632 X-Google-Attributes: gid1164f8,public From: hoffman@xdelta.enet.dec.nospam (Hoff Hoffman) Subject: Re: C program under DEC/Alpha Date: 1998/03/24 Message-ID: <6f9c6r$8gn@usenet.pa.dec.com>#1/1 X-Deja-AN: 337328212 Distribution: world References: <351460D6.C20A915@cerritos.edu> Organization: Digital Equipment Corp Reply-To: hoffman@xdelta.zko.dec.nospam Newsgroups: comp.sys.dec In article <351460D6.C20A915@cerritos.edu>, lakha001@cerritos.edu writes: :Can someone help me out with this. It would help if you listed the operating system -- based on the error messages, this system is clearly running OpenVMS -- and the version of OpenVMS and (in this case) the C compiler. And for OpenVMS questions, posting in comp.os.vms is a better choice. : I am trying to write a simple C :program on DEC/Alpha system. For some reason, it just won't compile. I :am not sure what I am missing out. I looked at the HELP pages on the :system and the CC run time routines do show popen as a command. With DEC C, one often sees the use of the /PREFIX=ALL qualifier, to force the routines to be prefixed for the LINK. (There is some magic going on here, for now it is best to simply add "/PREFIX=ALL" to the DEC C compiler incantation. It's rather easier to explain this as "magic", by the way. :-) Also note that the popen() and similar calls were added in the DEC C run-time support in OpenVMS V7.0 and later. To use these calls on versions of OpenVMS prior to V7.0, one needs to avail ones self of the DEC C V5.6 and later "backport" library, as described in the DEC C documentation set. (To see the current OpenVMS version, look at the first line of the output from a SHOW SYSTEM command.) There exists callable mail interface in OpenVMS, see the OpenVMS Utility Routines Reference Manual for details. Prior to this release, I would expect one would need to use a single line such as the following: system("MAIL filespec user/subject=\"subjecttext\" " ); I'm not sure that PMDF will work this way, but MAIL does... Or one could use mailboxes, and pass the commands into the subprocess one at a time, specifying the mailbox as the input device for a lib$spawn() command, or via a system() call with the command specification of "@mbxdevname:". Remember to send along a ^Z (EOF, ) or EXIT as the last command... Or one could use a text file, and execute it via @filespec, via a call to lib$spawn() or via system(). :Please respond directly by mailing me back since I dont frequent the :newsgroups. Ask here, get an answer here. -------------------------- 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