tomc@oakhill.UUCP.UUCP (07/11/86)
Some questions about VMS and VAX C: 1) Is there an equivalent of /dev/null ("bit bucket") on VMS? 2) Are there any routines available written in C that facilitate wildcard filename expansion from within a program running under VMS? I have a case where the C program is invoked from DCL as a foreign command; thus no automatic wildcard expansion is done. 3) I have a C program that was developed in a PC-DOS/Unix environment. I can "install" it on VMS as a foreign command and get access to command line arguments via argv (without DCL wildcard expansion, as stated above). My assumption has been that to install the program in a more conventional way, I must use the Command Definition Utility to specify command line parameters and attributes, and then use RTL CLI$ calls to access the arguments, bypassing argc and argv. Is this assumption correct? Thanks for any help/information you can give. Tom Cunningham "Good, fast, cheap -- select two." {ihnp4,seismo,ctvax,gatech}!ut-sally!oakhill!tomc
MS5U@TE.CC.CMU.EDU.UUCP (07/13/86)
In article <?@oakhill.UUCP> tomc@oakhill.UUCP writes: >1) Is there an equivalent of /dev/null ("bit bucket") on VMS? Yup...There's good old NLA0:, or NL: for short. Good for when you run a program for the hundredth time that asks for an output file and you just don't care. :-) >2) Are there any routines available written in C that facilitate > wildcard filename expansion from within a program running under > VMS? I have a case where the C program is invoked from DCL as > a foreign command; thus no automatic wildcard expansion is done. Written in C? Not exactly, but you can call LIB$FIND_FILE. The format is documented on page RTL-105 in the Run Time Library User's Guide. It involves some "Mixed-Language Programming" (see chapter 14 in the Programming in VAX-C manual), but it's all well documented. >3) I have a C program that was developed in a PC-DOS/Unix environment. > I can "install" it on VMS as a foreign command and get access to > command line arguments via argv (without DCL wildcard expansion, > as stated above). My assumption has been that to install the > program in a more conventional way, I must use the Command Definition > Utility to specify command line parameters and attributes, and then > use RTL CLI$ calls to access the arguments, bypassing argc and argv. > Is this assumption correct? You can use your argc and argv and then just install the program as a foreign command in the system-wide login command procedure. For example, if the program is an echo simulator located in SYS$USER:[UNIX_FAKES], you would have a line in the login like: $ echo :== $SYS$USER:[UNIX_FAKES]ECHO (If you want to be able to abbreviate echo down to one letter, change the left side to e*cho.) Personally, I like VMS. (That's quite an accomplishment to admit around here at CMU!) Anyone got any useful utilities for a uVAX-I running uVMS V4.3? :-) -- Marc Shannon | MS5U@TE.CC.CMU.EDU (Arpanet) \ | / MS5U@CMUCCVMA (Bitnet) ___\|/___ pitt!darth!plooba!shannon (UUCP) /|\ SHANNON%DRYCAS@TE.CC.CMU.EDU (The Computer Club's uVAX-I) / | \ ^^^^^^ -- Really DRYCAS.CLUB.CC.CMU.EDU :-) | -------