Mike_Z
Veteran Member
I've been experimenting with DEC Fortran IV programming. A long time ago, actually 1965, I was using Fortran IV on a Burroughs 5500. In fact I still have my old Guide to Fortran IV by Daniel McCracken. Anyway I am re-familizing myself with Fortran, this time on my PDP8E computer. I want to do some work with Direct Access file control. Seems that my 1965 copy of McCracken's Fortran is silent on this. Recently I found the second edition of Guide to Fortran IV and it talks about direct access. I don't remember much of what I learned 50 years ago and have to rely on these old books to make things work. I believe I understand how to use DEFINE FILE and all the Fortran stuff to work with files, but I do not understand how to associate a file or dataset number to a real file on disk. I did find some information about doing this in a section on DEC Time Sharing. This talks about the CREATE statement that seems to work. I can create an empty filename with this. In fact I've used CREATE as a start to making a Fortran source program in the editor. BUT.... then in this Time Sharing section, there are other commands like OPEN. This is supposed to associate an internal file number to a file name, but when I try it OS8 comes back with OPEN? as if it doesn't know what to do. I suspect this could be something to do with time share. I probably do not have time share. So my question is how can I associate an Internal file number to a file name on disk?
For example, if I write,
DEFINE FILE 14(200,10,E,KPOINT)
This has the dataset or file # of 14. There are 200 records of 10 characters each. The E means the record is formatted and the KPOINT is the associated variable, or next record number.
Then;
This should fill the file with numbers 1 through 200. But somehow the dataset number 14 has to be associated with a filename. From what I have read so far it seems that this association is done in the OS8 operating system and not in the Fortran programming. Any suggestions? Thanks Mike
For example, if I write,
DEFINE FILE 14(200,10,E,KPOINT)
This has the dataset or file # of 14. There are 200 records of 10 characters each. The E means the record is formatted and the KPOINT is the associated variable, or next record number.
Then;
Code:
KPOINT=1
DO 10 I=1, 200
WRITE (14'KPOINT,10)KPOINT
10 FORMAT (10E6)
END
This should fill the file with numbers 1 through 200. But somehow the dataset number 14 has to be associated with a filename. From what I have read so far it seems that this association is done in the OS8 operating system and not in the Fortran programming. Any suggestions? Thanks Mike