HP3000-L Archives

September 2000, 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:
"Bailie, Jack" <[log in to unmask]>
Reply To:
Bailie, Jack
Date:
Fri, 22 Sep 2000 14:32:08 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (143 lines)
Oh!  I forgot to mention that in my logging process I do an FCONTROL 2 and
FCONTROL 6 to write the record and then update the EOF.  That might explain
Stan's results.

Jack


                -----Original Message-----
                From:   Stan Sieler [mailto:[log in to unmask]]
                Sent:   Thursday, September 21, 2000 2:11 PM
                To:     [log in to unmask]
                Subject:        Re: circular files-build, read, write to

                Re:

                > One problem is that circular files can't be read while
they are open for
                > writing - but I got a tip off of this list several years
ago - from Stan I
                > believe, that allows you to copy the circular file to a
flat file that you
                > can then look at while the circular file is still open by
another process.
                >
                >  FILE XXEACX=MSGPRINT.HISTORY;ACC=APPEND;SHR
                >  COPY *XXEACX,XXEAC2
                >  PURGE XXEAC2 > $NULL
                >  COPY *XXEACX,XXEAC2
                >
                > The first copy command fails, but the second one works.

                I hope it wasn't me:

                  1) I don't recall that solution

                  2) and it doesn't seem to work reliably.

                I do remember noting the "can't be read while open"
limitation, however.

                I just tried a test on MPE/iX 6.0.

                   :listf c,2
                   ACCOUNT=  SIELER      GROUP=  SOURCE

                   FILENAME  CODE  ------------LOGICAL RECORD-----------
----SPACE----
                                     SIZE  TYP        EOF      LIMIT R/B
SECTORS #X MX

                   C       *          80B  FAO         16       1024  16
256  1  8

                C is a CIRcular file, and is open (for SHR;APPEND) by a
process on
                terminal B.

                BTW, that process has written only 4 records to the file,
not 16.
                OTOH, note that hte blockfactor is 16.

                On terminal A, I do:

                   :print c
                          ^
                   EXCLUSIVE VIOLATION: FILE ACCESSED EXCLUSIVELY  (FSERR
91)
                   The PRINT command failed. (CIERR 9080)

                So, I try explicitly sharing:
                   :file c;shr
                   :print *c
                          ^
                   EXCLUSIVE VIOLATION: FILE ACCESSED EXCLUSIVELY  (FSERR
91)
                   The PRINT command failed. (CIERR 9080)

                Then, I try a variation of Jack's approach:
                  :file c;acc=append;shr
                  :print *c



                ...(about 24 blank lines)


                   (24/4) Continue? no
                   :

                Interesting, eh?
                But not useful...so let's try "COPY" instead of "PRINT":

                   :copy *c, d
                   :listf d,2
                   ACCOUNT=  SIELER      GROUP=  SOURCE

                   FILENAME  CODE  ------------LOGICAL RECORD-----------
----SPACE----
                                     SIZE  TYP        EOF      LIMIT R/B
SECTORS #X MX

                   D                  80B  FAO          4       1024  16
256  1  8

                So...success?  Well...let's look closer:

                   :print d
                   LINE 1
                   LINE 2


                   :
                I.e., two correct lines, and two blank lines.  (As you'll
see below,
                all four lines should have been non-blank!)

                Now, terminate the process on terminal B, closing the file
C.
                And...
                   :print c
                   LINE 1
                   LINE 2
                   LINE 3
                   LINE 4
                   :

                I.e.: there's no need to do a second "copy", AFAIK.

                But...the copy wasn't accurate.

                And...I just went back to try it again, and now I get:

                   :copy *c, d
                         ^
                   COPY command cannot open the source file. (CIERR 9135)

                So...I give up!

                Stan Sieler
[log in to unmask]
                www.allegro.com/sieler/wanted/index.html
www.allegro.com/sieler

ATOM RSS1 RSS2