- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting an error during execution on an open statement. There are two files and the first does exist while the second does not. The code segment follows: C:\Users\Brooks\Desktop\Stats\Stats.txt C:\Users\Brooks\Desktop\Stats\PRN.dat forrtl: severe (29): file not found, unit 3, file \\.\PRN Image PC Routine Line Source libifcoremdd.dll 519D2617 Unknown Unknown Unknown libifcoremdd.dll 519F9190 Unknown Unknown Unknown MyStats.exe 0032F1BF _MAIN__ 51 MyStats.f90 MyStats.exe 003354D3 Unknown Unknown Unknown MyStats.exe 0033873E Unknown Unknown Unknown MyStats.exe 00338620 Unknown Unknown Unknown MyStats.exe 003384CD Unknown Unknown Unknown MyStats.exe 00338758 Unknown Unknown Unknown KERNEL32.DLL 759A8654 Unknown Unknown Unknown ntdll.dll 77B64B17 Unknown Unknown Unknown ntdll.dll 77B64AE7 Unknown Unknown Unknown Code Segment: fName1 = "C:\Users\Brooks\Desktop\Stats\Stats.txt" write(6,*) fName1 open (unit=2,file=fName1,status='REPLACE',form='FORMATTED',action="WRITE") rewind 2 fName2 = "C:\Users\Brooks\Desktop\Stats\PRN.dat" write(6,*) fName2 open (unit=3,file=fName2,status='REPLACE',form='FORMATTED',action="WRITE") <=== Line 51
When status="REPLACE" I thought if the file does not exist then it creates one; but it bombs me out instead.
Thanks,
Brooks
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PRN, LPT, COM1, COM2, CON are examples of special files, which are tied to devices with specific properties. You cannot have a file name that clashes with these dedicated names.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running Win 10 x64 on an Intel i7 with 32GB RAM and 1 TB disk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PRN, LPT, COM1, COM2, CON are examples of special files, which are tied to devices with specific properties. You cannot have a file name that clashes with these dedicated names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much. Did not know that.
Brooks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much. Did not know that.
Brooks
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page