HP3000-L Archives

May 1995, Week 5

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:
Brian White d1352 <[log in to unmask]>
Reply To:
Brian White d1352 <[log in to unmask]>
Date:
Wed, 31 May 1995 15:25:21 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
We're having a bit of trouble using mapped files on MPE/iX 5.0.
(FYI - Showme says Release is C.50.00, MPE/iX HP31900 B.79.06, User Version
C.50.00)
 
We want to open an oldtemp file that has zero records in it (Fixed ASCII 106
Bytes). Then write to the file using C's memcpy library function, and use
qsort to sort it, then close it.
 
We seem to be able to write to the short-mapped pointer that HPFOPEN returns
to us, and do the qsort OK, but when we FCLOSE the file, MPE says there are
no records in it.
 
Here a few details:
Parms passed to HPFOPEN (in addition to the filenumber and error parm):
 
filename    (This is working OK, we did a LISTFTEMP to find out we have the
file
             open in the mode we want.)
domain        We've tried 3 (Old) and 2 (Temporary)
access        We've tried 5 (Update) and 3 (Append)
array         Pointer to an array of structures. This seems to be OK.
rec size      sizeof (structure)
filecap       nbr of records we're going to work with.
random access We've tried both 0 and 1 here.
 
We've used printf to verify that the parms are set correctly before the
HPFOPEN call. All of the parms are passed by reference, as specified
in the Intrinsics manual. The numeric values are all declared as long ints.
 
We've tried several FCLOSE disposition parms:
0  - no change
3  - save temp, no rewind
16 - return unused disc space beyond EOF.
 
We've also tried doing an FCONTROL controlcode 6 after the last record
has been "written" (memcpy'd) to the file, and before the qsort; but this
had no effect on updating the EOF; it remained at 0.
 
Does anyone have a clue for us? We don't have access to any manuals beyond
a 1988 intrinsics manual.
 
Replies here or by email will be gleefully accepted.
 
Thanks in advance.
 
Brian J. White
[log in to unmask]

ATOM RSS1 RSS2