Stan:
Thanks for your help. I had to add something to your code example -- (file
code item) otherwise I got error_code=45 (privmode error).
According to the intrinsics manual (HPFOPEN) it says your item 38 (priv
level) is only valid
at file creation time but it doesn't seem to affect the program negatively
as it opens the
file just fine.
My entire idea behind this was that I needed "extent size" and "maximum
extents."
Originally I used FLABELINFO but the values being passed back to my program
did *not*
(and still don't) match MPEiX's LISTF,3 command nor Vesoft's LISTF,-3
command.
So then I thought -- no problem -- I'll just fopen the file and do
ffileinfo. The best laid plans of mice and men.... :-)
Now that I have those two working successfully I have found that FFILEINFO
is just like
FLABELINFO -- it is *not* returning the same extent size and max extent
values as
MPEiX's LISTF,3 command and Vesoft's LISTF,-3 command.
So after all that hard work I put into this these past 2 days or more, I am
completely
confused as to how MPEiX (and Vesoft) are calculating these values ???
Example:
MPEiX commands --
LISTF,-3
FILE: XXX.PUB.DEV
FILE CODE : 0 FOPTIONS: BINARY,FIXED,NOCCTL,STD
BLK FACTOR: 1 CREATOR : MGR.DEV
REC SIZE: 930(BYTES) LOCKWORD: GETLOST3
BLK SIZE: 930(BYTES) SECURITY--READ : CR
EXT SIZE: 540(SECT) WRITE : GU
NUM REC: 10 APPEND : AL
NUM SEC: 448 LOCK : GL
NUM EXT: 2 EXECUTE : ANY
MAX REC: 1023 **SECURITY IS ON
MAX EXT: 8 FLAGS : NO ACCESSORS
NUM LABELS: 0 CREATED : SUN, OCT 23, 2005, 11:00 AM
MAX LABELS: 199 MODIFIED: SUN, OCT 23, 2005, 11:00 AM
DISC DEV #: 5 ACCESSED: THU, NOV 3, 2005, 11:10 PM
SEC OFFSET: 50944 LABEL ADDR: $00000068.$0020B520
VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC
:listf xxx,2
ACCOUNT= DEV GROUP= PUB
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
XXX 465W FB 10 1023 1 448 2
8
My app reports this --
FILE: XXX.PUB.DEV
FILE CODE : 0 FOPTIONS: Perm,Binary,Formal,Fixed,No
CCTL,No
BLK FACTOR: 1 CREATOR : ********
REC SIZE: 930 LOCKWORD: ********
GROUP ID: ********
BLK SIZE: 930 SECURITY--READ : CR
EXT SIZE: 540 WRITE : GU
NUM REC: 10 LOCK : AL
NUM SEC: 448 EXECUTE : GL
NUM EXT: 2 APPEND : ANY
MAX REC: 1023 **SECURITY IS ON
MAX EXT: 7 FLAGS : NO ACCESSORS
NUM LABELS: 0 CREATED : SUN, OCT 23, 2005, 11:00 AM
MAX LABELS: 199 MODIFIED: SUN, OCT 23, 2005, 11:00 AM
DISC DEV #: 5 ACCESSED: THU, NOV 03, 2005, 11:10 PM
RESTORED: SUN, OCT 23, 2005, 11:00 AM
STATE : SUN, OCT 23, 2005, 11:00 AM
Ho hum......
I wrote my HPFOPEN sub in Pascal, and it works just fine (regardless of the
fact that
FFILEINFO isn't returning the extents values I was looking for) --
(HPFOPEN and FFILEINFO):
const
max_items = 5000;
ccg = 0;
ccl = 1;
cce = 2;
var cc : integer;
PROCEDURE HPFOPEN_file(var HPFOPEN_file_num : integer;
var overall_status : status_type;
var allocated_disk_extents: shortint;
var label_address : integer;
var extent_size_16 : shortint;
var extent_size_32 : integer;
var max_entents_16 : shortint);
label 999;
var formal_designator: char36;
var item_num_1 : integer;
var item_num_2 : integer;
var item_num_3 : integer;
var item_num_4 : integer;
var item_num_5 : integer;
var item_num_6 : integer;
var item_num_7 : integer;
var item_num_8 : integer;
var item_num_9 : integer;
var item_num_10: integer;
var item_num_11: integer;
var access_type : integer;
var cc : integer;
var designator : integer;
var disposition : integer;
var domain : integer;
var error_no : shortint;
var exclusive : integer;
var ffileinfo_file_num: shortint;
var file_code : integer;
var privileged_access : integer;
var record_size : integer;
begin
HPFOPEN_file_num := 0;
overall_status.all:= 0;
item_num_1 := 2;
item_num_2 := 3;
item_num_6 := 13;
item_num_7 := 37;
item_num_8 := 38;
item_num_11 := 0;
access_type := 0;
cc := 1;
designator := 0;
disposition := 0;
domain := 1;
exclusive := 3;
file_code := 1515;
formal_designator := '-I1.IN.HPSPOOL-';
privileged_access := 2;
record_size := 1008;
GETPRIVMODE;
HPFOPEN(HPFOPEN_file_num,
overall_status,
item_num_1,
formal_designator,
item_num_2,
domain,
item_num_6,
exclusive,
item_num_7,
file_code,
item_num_8,
privileged_access,
item_num_11);
if overall_status.all <> 0 then
goto 999;
item_num_1:= 15;
item_num_2:= 16;
item_num_3:= 19;
item_num_4:= 44;
item_num_5:= 69;
ffileinfo_file_num:= HPFOPEN_file_num;
FFILEINFO(HPFOPEN_file_num,
item_num_1,
extent_size_16,
item_num_2,
max_entents_16,
item_num_3,
label_address,
item_num_4,
allocated_disk_extents,
item_num_5,
extent_size_32);
cc:= ccode;
if cc = cce then
goto 999
else
begin
FCHECK(HPFOPEN_file_num,
error_no);
overall_status.info:= error_no;
end;
goto 999;
999:
GETUSERMODE;
end;
-----------------
Forwarded Message:
Subj: Re: [HP3000-L] Fwd: [HP3000-L] Max Extents and Extents size from
intrinsic FFILEINFO Date: 11/3/2005 4:30:07 P.M. Pacific Standard Time From:
[log in to unmask] (mailto:[log in to unmask]) To: [log in to unmask]
(mailto:[log in to unmask]) CC: [log in to unmask]
(mailto:[log in to unmask]) Sent from the Internet _(Details)_ (aolmsg://02b17ea8/inethdr/2)
Re:
> You can't FOPEN an existing #I file.
...
> You have to call HPFOPEN, foptions = 0, aoptions = %300 (usually),
> and specify the correct privlevel.
Argh! Typo! foptions of 0 is what you should NOT use ... that
opens a new file, not an old file!
And, of course, one doesn't simply pass "foptions" or "aoptions" in
to HPFOPEN :)
double array
ints (0 : 9);
...
for inx := 0 until 9 do
ints (inx) := inx;
...
move filename' := "-I2.IN.HPSPOOL-";
getprivmode;
hpfopen (fid32, status,
2, filename', ! filename
3, ints (3), ! domain 3 = old
13, ints (3), ! exc = SHR
38, ints (2)); ! FILEPRIV
Sorry 'bout that!
Stan
--
Stan Sieler
[log in to unmask]
www.allegro.com/sieler/wanted/index.html
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|