HP3000-L Archives

October 1999, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Hobbs <[log in to unmask]>
Reply To:
Bruce Hobbs <[log in to unmask]>
Date:
Mon, 25 Oct 1999 14:05:46 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
At 4:09 PM -0400 10/25/99, Boris Kortiak wrote:

>Back to the program from before.  I made a change last Friday to a program which originally only created a KSAM file.  The change was to simply continue processing to generate a report.  The original program OPENs the KSAM file OUTPUT.  I added logic after the CLOSE to reOPEN the file INPUT, MOVE LOW-VALUES to one of the keys and do a START on that key; see sample below.
>
Wouldn't you simply want to SELECT ... ACCESS DYNAMIC and OPEN I-O to begin with? What does your SELECT statement look like anyway? Are there any file equates in effect?

>The start generates a FILE STATUS of '23' indicating that it can't find a key based on the START statement.
>
Although it's probably not important here, I believe you can also get a "23" when it appears that you're using START with a missing optional file.

>Please take a look and let me know if you see anything obvious.
>
>The other strangeness is that since no processing is done the program attempts to CLOSE the KSAM file again after the failed START and gets the FILE STATUS indicating that it is attempting to create an already existing file.
>
Since you're getting "DUPLICATE PERMANENT FILE" it certainly "feels" like the file was re-opened OUTPUT (which I think would lead to that error on the second CLOSE).
>
>404000 22310-START-ECR-K1.
>404500*-------------------
>405000*
>405500     IF WS-ECF-CLOSED
>406000         PERFORM 10300-OPEN-INPUT-ECF THRU 103ZZ-EXIT
>
Does this PERFORM never return if the OPEN fails?

>406100         MOVE LOW-VALUES TO ECR-KEY-1
>406500     END-IF.
>407000     START EXTRACTED-COMMISSION-FILE
>407500       KEY IS GREATER THAN ECR-KEY-1
>408000         INVALID KEY SET WS-ECF-IO-IK TO TRUE
>408500         NOT INVALID SET WS-ECF-IO-OK TO TRUE
>
These 88-levels do apply to something other than the FILE STATUS variable, right?

>Is it unacceptable to OPEN a file in INPUT mode after having created it in OUTPUT mode in the same program?
>
Not that I'm aware of, but since you can use OPEN I-O it isn't immediately clear to me why you'd want to do that
=======================================================================
Bruce Hobbs, CCP, CDP   856 N Monterey St         Phone: (626) 570-8028
Partner                 Alhambra, CA 91801-1574   FAX:   (626) 570-9850
Engineered Software     E-mail: [log in to unmask]

ATOM RSS1 RSS2