HP3000-L Archives

February 2000, Week 1

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:
Barry Lake <[log in to unmask]>
Reply To:
Barry Lake <[log in to unmask]>
Date:
Thu, 3 Feb 2000 13:03:11 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (72 lines)
At 12:04 PM -0800 2/3/00, [log in to unmask] wrote:
>At 11:36 AM -0800 2/3/00, [log in to unmask] wrote:
>>I've been debugging a command file which uses a msg file to read a STD file.
>>Occasionally in the process of debugging the command file will read an empty
>>msg file, causing the command file (and session) to hang.
...
>1) In your command file check the eof of the msg file before reading it.
>   Only if > 0 do your processing:
>
>   if finfo('msgfile','eof') > 0
>      <do some stuff>
>   endif
>
>2) If for some reason this isn't possible, and you must abort the
>   child CI, and you're on MPE/iX 6.0, then you can abort the child
>   CI using the ABORTPROC command, without aborting the whole session:
>
>   abortproc pin=<ci pin>
>
>3) If you don't want to abort the child CI and you still want to
>   "unhang" your command file that's waiting on an empty message file,
>   then from another session, just put some dummy data into the
>   message file:
>
>   :file m=msgfile,old
>   :echo stuff >*m

Amendment to suggestion #3: In order for a second session to be able to
write to the offending message file, I believe the first session should
first have opened it with the SHR and GMULTI options:

   :file m=msgfile,old;shr;gmulti
   :input myvar <*m
       -or-
   :print *m
       -or-
   :<whatever other method you're using to get data out of the file>

4) If you aren't on a version of MPE that has the ABORTPROC command, but
   you do have VESoft's MPEX, then you can use its "goon" command to run
   your CI invocation as a sub process and then return you immediately to
   the MPEX prompt:

   %goon run ci.pub.sys;info='xeq mycmd'
   Output will be sent to temporary file VEOU90
   %

   If mycmd hangs, then you could do

   %showtree
   112   CI.PUB.SYS
     105   MPEX.PUB.VESOFT
       106   MAIN.PUB.VESOFT (active) [you are here]
         90    run ci.pub.sys;info='xeq tcmd' (active)
           123   CI.PUB.SYS
   %kill 90


5) Suggestions #2 and #4 might be overKILL: If your're running the command
   file in some some fashion similar to

   :run ci.pub.sys;info='xeq mycmd'

   then you should be able simply to BREAK / ABORT in the current session
   without having to resort to ABORTPROC from another session and without
   having to abort the whole session.


Barry Lake                                 [log in to unmask]
Allegro Consultants, Inc.                  www.allegro.com
(408)252-2330

ATOM RSS1 RSS2