From owner-sc22wg5  Fri Aug 10 02:46:32 2001
Received: from out3.mx.nwbl.wi.voyager.net (out3.mx.nwbl.wi.voyager.net [169.207.3.79])
	by dkuug.dk (8.9.2/8.9.2) with ESMTP id CAA85301
	for <sc22wg5@dkuug.dk>; Fri, 10 Aug 2001 02:46:32 +0200 (CEST)
	(envelope-from Craig_Dedo@execpc.com)
Received: from pop5.nwbl.wi.voyager.net (pop5.nwbl.wi.voyager.net [169.207.3.83])
	by out3.mx.nwbl.wi.voyager.net (8.11.1/8.11.1) with ESMTP id f7A0kQq58247
	for <sc22wg5@dkuug.dk>; Thu, 9 Aug 2001 19:46:26 -0500 (CDT)
Received: from execpc.com (d102.as10.nwbl1.wi.voyager.net [169.207.87.168])
	by pop5.nwbl.wi.voyager.net (8.10.2/8.10.2) with ESMTP id f7A0kPv05376
	for <sc22wg5@dkuug.dk>; Thu, 9 Aug 2001 19:46:25 -0500 (CDT)
Message-ID: <3B732E7F.72C7B4CE@execpc.com>
Date: Thu, 09 Aug 2001 19:44:47 -0500
From: Craig Dedo <Craig_Dedo@execpc.com>
Organization: Elmbrook Computer Services, Inc.
X-Mailer: Mozilla 4.72 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: WG5 Mailing List <sc22wg5@dkuug.dk>
Subject: Re: (SC22WG5.2170) Named Scratch Files in Fortran 2000 - Rationale
References: <200108091200.OAA82583@dkuug.dk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear WG5 Members:
    From my reading of J3/97-193r1 and the current Fortran 2000 draft, it appears that J3 decided this issue on August 12, 1997.  If a
program opens an existing unconnected file with STATUS="SCRATCH", that is an error, just like any other error in the OPEN statement.

     The issue of what happens if a program opens an existing file with STATUS=SCRATCH should be settled.  In the edits in paper J3/97-193r1,
which passed unanimously on August 12, 1997, there is this edit:
[140:13+] Add the following text:
  "If an existing file is not connected, execution of an OPEN statement that connects that file with a STATUS of SCRATCH is prohibited."

     There is similar language in the Technical Specification, although that part of the paper never was debated or voted on by J3 at its
meetings in May or August 1997.  The relevant sentence from the Technical Specification is:
"  It is illegal to open a scratch file with the same name as an existing file that is not open."

    Tonight I found the relevant sentence in the current edition of the Fortran 2000 draft.  It is at [171:3-4], immediately before rule
R904:
"If an existing file is not connected, execution of an OPEN statement that connects that file with a STATUS of SCRATCH is not permitted."

    Issue 2 in WG5/N1454 says, in part:
"At [174:18], it is not specified what happens if STATUS='SCRATCH' and FILE=... are both specified, and the file exists."
It is not specified at [174:18] because it already has been specified at [171:7-8].

    Is this sufficient to answer Issue 2 in WG5/N1454 or is there something else that needs to be decided?  Do we need to add the text of
[171:7-8] to [174:18]?

Dan Nagle wrote:

> Hello,
>
> At the risk of stirring things up more than they need to be...
>
> The discussion of the rationale for named scratch files
> misses the point of the objection raised at WG5 last week.
>
> The design flaw found is that by using the status= with
> a value of scratch, the programmer can't inform the processor
> what to do regarding an existing file of the same name
> (which would have been conveyed by old, new or replace).
>
> To wit, should the processor treat an existing file
> of the same name by:
>
> 1. aborting the program, or
> 2. overwriting the file, or
> 3. using the old file, or
> 4. following a processor dependent action, or
> 5. none of the above (please specify your preferred action).
>
> We (j3) need to answer this question in order to retain
> named scratch files, IMHO.
>
> At least, this is my understanding of the discussion.

--
----------
Sincerely,
Craig T. Dedo                       Internet:     Craig_Dedo@execpc.com
Elmbrook Computer Services, Inc.    Voice Phone:  (262) 783-5869
17130 W. Burleigh Place             Fax Phone:    (262) 783-5928
Brookfield, WI   53005-2759
USA

"They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety."  -- Benjamin Franklin (1759)


