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:
Noel Demos <[log in to unmask]>
Reply To:
Noel Demos <[log in to unmask]>
Date:
Mon, 25 Oct 1999 22:31:06 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
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.
>
> The start generates a FILE STATUS of '23' indicating that it can't find a key based on the START statement.  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.
>
> 404000 22310-START-ECR-K1.
> 404500*-------------------
> 405000*
> 405500     IF WS-ECF-CLOSED
> 406000         PERFORM 10300-OPEN-INPUT-ECF THRU 103ZZ-EXIT
> 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
> 409000     END-START.
> 409100     IF NOT WS-ECF-FS-OK
> 409110         DISPLAY "22310 - ERROR FS = '", WS-ECF-STATUS, "'"
> 409120     END-IF.
> 409500*
> 410000*-----------
> 410500 2231Z-EXIT.
> 411000*-----------
> 411500     EXIT.
>
> Assume that WS-ECF-CLOSED is TRUE and that the 10300-OPEN-INPUT-ECF does and OPEN INPUT of the file without errors.  After the START, WS-ECF-STATUS contains '23'.
>
> Is it unacceptable to OPEN a file in INPUT mode after having created it in OUTPUT mode in the same program?

Definitely not.

It's been a long time, but I believe the start key values must ge a key
that
actually exists on the file.

Nick D.

ATOM RSS1 RSS2