HP3000-L Archives

October 1997, Week 3

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:
Steve Dirickson b894 WestWin <[log in to unmask]>
Reply To:
Steve Dirickson b894 WestWin <[log in to unmask]>
Date:
Thu, 16 Oct 1997 18:21:00 P
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
<<On Thursday, October 16, 1997 2:21 PM, ROGER SMITH
[SMTP:[log in to unmask]] wrote:
> We have purchased Netbase (demo period) from Quest Software.  Netbase
> creates a MSG file for changes to one of our datasets.  We have another
> program that is supposed to read the MSG file and pass the information
> to an Oracle database on the HP9000. I understand that both programs
> should read and write to the MSG file (until physically terminated).
> Netbase does this OK, but the script reading the MSG file reads through
> the file one time and then pauses.  This is OK.  However, the next time
> that Netbase writes to the MSG file, the script terminates without
doing
> another read.
>
> Any help is appreciated.  Our demo period is about to expired and I do
> not have this working correctly.  A listf ,5 of the file is enclosed.
>
> FILE: AUXMSG.DATA.NETBASE
>
> FILE CODE : 0                   FOPTIONS: ASCII,VARIABLE,NOCCTL,MSG
> BLK FACTOR: 1                   CREATOR : **
> REC SIZE: 8192(BYTES)           LOCKWORD: **
> BLK SIZE: 8202(BYTES)           SECURITY--READ    : ANY
> EXT SIZE: 41283(SECT)                     WRITE   : ANY
> NUM REC: 88                               APPEND  : ANY
> NUM SEC: 512                              LOCK    : ANY
> NUM EXT: 2                                EXECUTE : ANY
> MAX REC: 10007                          **SECURITY IS ON
>                                 FLAGS   : 2 ACCESSORS,EXCL,1 R,1 W
> NUM LABELS: 0                   CREATED : THU, OCT 16, 1997,  2:49 PM
> MAX LABELS: 0                   MODIFIED: THU, OCT 16, 1997,  2:49 PM
> DISC DEV #: 52                  ACCESSED: THU, OCT 16, 1997,  2:49 PM
> SEC OFFSET: 0                   LABEL ADDR: **
> VOLCLASS  : MPEXL_SYSTEM_VOLUME_SET:DISC
>
>
> tia,
> roger
Roger,

I'm sure Jeff Vance (or any number of listers) could answer this better
than I. But as I have gone throught this, I thought I would share the
solution I came up with.

We wrote such a job, one that would read a message file and take action
on
the records that were written to it. Same problem occurred, the command
script would work the first time, then terminate. The solution was to
create a third process that kept the message file open for writing (and
did
nothing else). This allowed the first write process to open and close the
message file as needed.>>


This all has to do with the way that message files handle an I/O request
when the file is empty. As explained (more or less) in the "Interprocess
Communication Programmer's Guide", message files, by default, return an
EOF condition if the file is empty-except in the following conditions:
1) There is an "opposite accessor", indicating that the request has at
least some chance of eventually completing, or
2) The read or write request is the first I/O operation on the file by
the requesting process since the file was opened. This helps avoid "race"
conditions where the writer has not yet put anything into the file, so
the reader bails on EOF, then the write writes a record that will never
get read.

It is impossible to identify the exact cause of the behavior without
seeing the commands and intrinsic calls involved, but it sounds like
1) the reader process is not using FCONTROL 45 to turn on "extended
wait", and
2) the writer is closing the file between writes,
3) so the reader gets an EOF on the second read request, says "that's all
folks", and terminates.

Steve

ATOM RSS1 RSS2