home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3026 < prev    next >
Encoding:
Text File  |  1992-08-13  |  2.1 KB  |  53 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!hal!map
  3. From: map@hal.maths.monash.edu.au (Michael Page)
  4. Subject: Re: programming style question
  5. Message-ID: <1992Aug14.002538.3929@monu6.cc.monash.edu.au>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Mathematics Department, Monash University, Australia
  8. References: <1992Aug13.004056.3819@ccu1.aukuni.ac.nz> <1992Aug13.081049.4648@newssrv.edvz.univie.ac.at>
  9. Date: Fri, 14 Aug 1992 00:25:38 GMT
  10. Lines: 41
  11.  
  12. pm@katz.cc.univie.ac.at (Peter Marksteiner) writes:
  13. >ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig) writes: 
  14. >
  15. >>It's a real shame that Unix does not have standard way of attatching
  16. >>FORTRAN units to file descriptors, that would make things much easier.
  17. >>Does POSIX have anything to say about that?
  18. >
  19. >Try symbolic links. For example,
  20. >
  21. >    ln -s /whatever/pathname/you/want fort.3
  22. >
  23. >may not be as beautiful as
  24. >
  25. >//FT03F001  DD  DSN=REVOLTING.MVS.DATASET,DISP=NEW
  26. >
  27. >but it works almost as well. 
  28.  
  29. Unfortunately `almost' is important here.  One of the nice features of
  30. VMS (gargle) was the ability to use:
  31.  
  32. $ define/user_mode 'P1'.dat for005
  33. $ define/user_mode 'P1'.out for006
  34. $ run myprog
  35.  
  36. in a command procedure.  The advantage here is that you can have that
  37. program running on at least two different sets of data in the same directory
  38. at the same time.  The only way you can do this with symbolic links is to 
  39. place the data files in different directories.  A royal pain if you are 
  40. doing a lot of batch processing, which I suspect applies to most serious 
  41. FORTRAN users.  A very bad design decision from a supposedly flexible 
  42. operating system.
  43.  
  44. I, and probably many others, get around the problem by passing the 
  45. argument (P1, above) into the program using getarg, doing some string
  46. handling to create the file names and using open explicitly.  Messy.
  47.  
  48. --
  49. +------------------------------------------------------------------------------+
  50.  Michael Page, Maths Dept, Monash University, Clayton, Victoria, AUSTRALIA 3168
  51.   email: map@hal.maths.monash.edu.au phone: +61 3 565 4486 FAX: +61 3 565 4403
  52. +------------------------------------------------------------------------------+
  53.