home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dove!dove.nist.gov!przemek
- From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
- Newsgroups: comp.unix.ultrix
- Subject: Re: FAL acces _from_ Ultrix (accessing VMS files over DECnet)
- Message-ID: <PRZEMEK.92Aug28152143@rrdstrad.nist.gov>
- Date: 28 Aug 92 19:21:43 GMT
- References: <PRZEMEK.92Aug20141453@rrdstrad.nist.gov>
- Sender: news@dove.nist.gov
- Organization: U. of Maryland/NIST
- Lines: 69
- In-reply-to: przemek@rrdstrad.nist.gov's message of 20 Aug 92 18:14:53 GMT
-
-
- In article <PRZEMEK.92Aug20141453@rrdstrad.nist.gov> I wrote:
- [ We don't have VMS/ultrix connection on our VMS hosts, and yet] I
- would like to be able to open/read [VMS] files directly from my program.
-
- Well, since noone came forward with information on how to do it, I shall post
- a solution I use now; it uses the popen() calls to link VMS files to a FILE
- pointer via a pipe---works fine, but does not provide error messages that
- can be intercepted by the program.
-
- BTW, DEC support (for which we are paying literally tens of thousands
- of dollars a year) wasn't very helpful in my original query; they said
- that DECnet programming is completely unsupported, and if we want any
- help on DECnet other than how to call dls/dcat/dcp programs from
- Ultrix, we have to pay their consulting fees. So much for the "openness":
- it made me swear to avoid DECnet whenever I can.
-
- przemek klosowski (przemek@rrdstrad.nist.gov)
- Reactor Division (bldg. 235), E111
- National Institute of Standards and Technology
- Gaithersburg, MD 20899, USA
-
- (301) 975 6249
-
-
-
- /* Copyright (c) 1992 by P. Klosowski at NIST. All Rights Reserved */
-
- /***
- NAME
- decnet
- PURPOSE
- Access files on VAX/VMS using decnet
- NOTES
- library: cc -c decnet.c; ar cv libdecnet.a decnet.o (or just #include this file)
- HISTORY
- przemek - Jan 24, 1992: Created.
- $Id: decnet.c,v 1.2 1992/08/21 13:59:05 przemek Exp przemek $
- ***/
-
- #include <stdio.h>
-
- FILE * dopen(char * filename, char * mode);
- void dclose(FILE * vfp);
-
- FILE * dopen(char * filename, char * mode){
- char line[255];
-
- switch (*mode){
- case 'r': sprintf(line, "dcp %s -", filename); break;
- case 'w': sprintf(line, "dcp - %s", filename); break;
- default : return NULL; /* unknown mode */
- }
- return popen(line,mode);
- }
-
- void dclose(FILE * vfp){
- pclose(vfp);
- }
-
-
-
- --
- przemek klosowski (przemek@rrdstrad.nist.gov)
- Reactor Division (bldg. 235), E111
- National Institute of Standards and Technology
- Gaithersburg, MD 20899, USA
-
- (301) 975 6249
-