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