Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Finding filenames

h-faber
Начинающий
1 129Просмотр.
Hi,
looks like an easy question, but it is driving me mad.
I got some old Fortran (mainly 77) sourcecode again from which I know there are some I/O file accesses within. So I need to know which files are accessed. Unfortunately the person who has given me the sources is on vacation until the end of August.
And the only kind of file accesses I see are directly READ-statements without an according OPEN for the used file unit.
And there are also some lines such as
DEFINE FILE 52 (5000,600,L,ISET)
for there is also no hint which filename hides behind the logical unit number 52.
To complete the worst case, I even do not know on which old machine that Fortran code runs. It is no VAX afaik, maybe a BS2000/PS2000, sorry, no idea.

So confused I am, so glad I'd be for hints and advices how to resolve the file units to file names. Anyone with hints?
0 баллов
6 Ответы
Steven_L_Intel1
Сотрудник
1 129Просмотр.
Well, if there is no OPEN, and no CALL ASSIGN, then unit 52 will go to a file FORT.52. You can do an INQUIRE (UNIT=52, NAME=charvar) to get the name of the file open on unit 52.
h-faber
Начинающий
1 129Просмотр.
Hi Steve,
thanks, this clears up a lot and this mistery. :)
Is this documented somewhere?
Steven_L_Intel1
Сотрудник
1 129Просмотр.
Hmm. It used to be in an obvious place, but doesn't seem to be anymore. It's mentioned under OPEN, FILE= but that's not where you'd expect to look. It should be in Building Applications, Data and I/O, Devices and Files, Logical Devices. It was, once upon a time. I'll ask that it be put back.
jparsly
Новый участник I
1 129Просмотр.
I remember having "DEFINE FILE" statements in some of
my old IBM 360 mainframe programs. They were used to
set up direct access files. On the mainframe, connections
between units numbers and files was done outside the
program using ALLOC statements (for the time sharing system) or using DD statements in the JCL (job control language) for batch runs. The "files" in this case could have
been decks of cards or tapes.
ivfuser
Начинающий
1 129Просмотр.


sblionel wrote:
Hmm. It used to be in an obvious place, but doesn't seem to be anymore. It's mentioned under OPEN, FILE= but that's not where you'd expect to look. It should be in Building Applications, Data and I/O, Devices and Files, Logical Devices. It was, once upon a time. I'll ask that it be put back.




Steve,

Please explicitly ask that when this information is 'put back' that it also be retained in the current location. Some of us have grown accustomed to thinking in weird ways. Dunno, maybe reading standards has something to do with that. ;)

Thanks.
Steven_L_Intel1
Сотрудник
1 129Просмотр.
Oh, it wouldn't be removed from the OPEN documentation.
Ответить