HP3000-L Archives

November 2002, 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:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Thu, 21 Nov 2002 15:02:18 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
Re:

> >  That's the default mode of operation for MPE:
> >
> >     FOPEN ( "foo", various options including "new, output")
> >     FWRITE...
> >     FCLOSE (  , 1, 0);
> >
> >  the file doesn't appear in the directory until the FCLOSE...exactly what
> >  Wirt seems to want.
...

Wirt asks:

> Are you sure?

Yes.


> It's easy to demonstrate that the COPY function doesn't work that way. I

Yep...the author of hpfcopy (called by the COPY command) chose to
use the new HPFOPEN option I mentioned in my prior post.  In the
following Debug output, we see the HPFOPEN call used to create the
new file:

$3e ($55) nmdebug > tr
     PC=a.00ebc268 HPFOPEN
* 0) SP=41a5fb08 RP=a.00ebc234 ?HPFOPEN+$8
       export stub: a.00b1a9b0 hpfcopy.open_target+$36c
  1) SP=41a5fb08 RP=a.00b1b860 hpfcopy+$420
  2) SP=41a5f808 RP=a.00b1b40c ?hpfcopy+$8
       export stub: a.00a50d08 hxcopy+$394
  3) SP=41a5ed88 RP=a.00fe72b0 exec_cmd+$dbc
  4) SP=41a5a748 RP=a.00a6eb68 ?exec_cmd+$8
       export stub: a.00a71558 try_exec_cmd+$c8
  5) SP=41a5a6c8 RP=a.00fe6274 command_interpret+$318
  6) SP=41a5a248 RP=a.00a6e594 ?command_interpret+$8
       export stub: a.00a72088 xeqcommand+$194
  7) SP=41a59c48 RP=a.00a76bb8 prog_execute_cmd+$1c
  8) SP=41a59bc8 RP=a.00a76b68 ?prog_execute_cmd+$8
       export stub: a.00e74bc8 COMMAND+$870
  9) SP=41a59b48 RP=a.00e74344 ?COMMAND+$8
       export stub: 568.003a4078 intface_call_mp+$220
  a) SP=41a593c8 RP=568.002850ac intface_mpe_all.do_mpe_command+$390
  b) SP=41a591a8 RP=568.00286174 EN_intface_mpe_all+$338
  c) SP=41a58f88 RP=568.00286764 xeq_mpe_command+$240
  d) SP=41a58d68 RP=568.003599a4 main_perform_co.do_system_cmd+$f0
  e) SP=41a58b48 RP=568.0035b050 EN_main_perform_co+$9b4
  f) SP=41a58928 RP=568.0035b238 EN_main_command+$14c
 10) SP=41a58708 RP=568.0035b3c8 main_start+$174
 11) SP=41a584e8 RP=568.00324b9c EX_PROGRAM
 12) SP=41a582c8 RP=568.00000000
     (end of NM stack)

$6b ($55) nmdebug > show_hpfopen
(arg0) # Parameters = #16
(arg1) File#  @ $41a5edd4
(arg2) Status @ $41a5fa64
Item #  1 = #51 filename_as_string  : $41a5f210 --> A
                VIRT $558.41a5f210 "A..................................."
Item #  2 = #41 Name semantics      : $41a5fa74 --> $0 = MPE-escaped
Item #  3 =  #3 domain              : $41a5fa6c --> $4 = makePERM
Item #  4 = #85 HSM_AUTO            : $41a5fa68 --> $1 = NOauto
Item #  5 =  #9 fileeq              : $41a5f828 --> $1 = noFEQ
Item #  6 = #11 access type         : $41a5f82c --> $4 = I/O
Item #  7 = #55 Raw mode            : $41a5f840 --> $0
                VIRT $558.41a5f840 "....DISC                            "


Note that the fourth item the hpfcopy programmer passes into HPFOPEN
is a 3 ("domain), with value 4 ("makePERM") ... which inserts the file
in the directory immediately.  (Also, this was not a POSIX thing...it
was in MPE/iX from day 1, IIRC.)

> The difference in COPY's behavior and yours may be that COPY is first
> BUILDing a file of the proper format and length before it actually begins

Not quite, as we see above.  No "BUILD".

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

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2