home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / ultrix / 6550 < prev    next >
Encoding:
Text File  |  1992-08-29  |  2.5 KB  |  82 lines

  1. Path: sparky!uunet!dove!dove.nist.gov!przemek
  2. From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
  3. Newsgroups: comp.unix.ultrix
  4. Subject: Re: FAL acces _from_ Ultrix (accessing VMS files over DECnet)
  5. Message-ID: <PRZEMEK.92Aug28152143@rrdstrad.nist.gov>
  6. Date: 28 Aug 92 19:21:43 GMT
  7. References: <PRZEMEK.92Aug20141453@rrdstrad.nist.gov>
  8. Sender: news@dove.nist.gov
  9. Organization: U. of Maryland/NIST
  10. Lines: 69
  11. In-reply-to: przemek@rrdstrad.nist.gov's message of 20 Aug 92 18:14:53 GMT
  12.  
  13.  
  14. In article <PRZEMEK.92Aug20141453@rrdstrad.nist.gov> I wrote:
  15.    [ We don't have VMS/ultrix connection on our VMS hosts, and yet] I
  16.    would like to be able to open/read [VMS] files directly from my program.
  17.  
  18. Well, since noone came forward with information on how to do it, I shall post
  19. a solution I use now; it uses the popen() calls to link VMS files to a FILE 
  20. pointer via a pipe---works fine, but does not provide error messages that
  21. can be intercepted by the program.
  22.  
  23. BTW, DEC support (for which we are paying literally tens of thousands
  24. of dollars a year) wasn't very helpful in my original query; they said
  25. that DECnet programming is completely unsupported, and if we want any
  26. help on DECnet other than how to call dls/dcat/dcp programs from
  27. Ultrix, we have to pay their consulting fees. So much for the "openness":
  28. it made me swear to avoid DECnet whenever I can.
  29.  
  30.             przemek klosowski (przemek@rrdstrad.nist.gov)
  31.             Reactor Division (bldg. 235), E111
  32.             National Institute of Standards and Technology
  33.             Gaithersburg, MD 20899,      USA
  34.  
  35.             (301) 975 6249
  36.  
  37.  
  38.  
  39. /* Copyright (c) 1992 by P. Klosowski at NIST.  All Rights Reserved */
  40.  
  41. /***
  42.    NAME
  43.      decnet
  44.    PURPOSE
  45.      Access files on VAX/VMS using decnet 
  46.    NOTES
  47.      library: cc -c decnet.c; ar cv libdecnet.a decnet.o (or just #include this file)
  48.    HISTORY
  49.      przemek - Jan 24, 1992: Created.
  50.      $Id: decnet.c,v 1.2 1992/08/21 13:59:05 przemek Exp przemek $
  51. ***/
  52.  
  53. #include <stdio.h>
  54.  
  55. FILE * dopen(char * filename, char * mode);
  56. void dclose(FILE * vfp);
  57.  
  58. FILE * dopen(char * filename, char * mode){
  59.   char line[255];
  60.  
  61.   switch (*mode){
  62.   case 'r': sprintf(line, "dcp %s -", filename); break;
  63.   case 'w': sprintf(line, "dcp - %s", filename); break;
  64.   default : return NULL;        /* unknown mode */
  65.   }
  66.   return popen(line,mode);
  67. }
  68.   
  69. void dclose(FILE * vfp){
  70.   pclose(vfp);
  71. }
  72.  
  73.  
  74.    
  75. --
  76.             przemek klosowski (przemek@rrdstrad.nist.gov)
  77.             Reactor Division (bldg. 235), E111
  78.             National Institute of Standards and Technology
  79.             Gaithersburg, MD 20899,      USA
  80.  
  81.             (301) 975 6249
  82.