Although my program is written in Pascal, this really isn't a Pascal
problem but an AIF problem/issue.
My call to AIFPROCGET is returning a positive value in the overall status
field because it doesn't like item 2063 (return a table of file numbers
of files being accessed by other processes:
The AIF manual states that item 2063 is not putable and not verifiable, but
does this mean it is not gettable either?
I hope someone out there can enlighten me as to why item 2063 is giving me
a problem here.
TIA,
Brian.
Code sample here:
type
i32rec_type = record
cnt :integer;
ints :array[1..maximum_pids] of integer;
end;
var accessors_count :integer;
var cc :integer;
var count_1 :integer;
var count_2 :integer;
var count_3 :integer;
var EOF_bytes :integer;
var error_no :shortint;
var file_num :shortint;
var file_numbers :i32rec_type;
var flimit_bytes :integer;
var flimit_recs :integer;
var job_session_no :jsnum_type;
var jskey :integer;
var num_entries :integer;
var pid_array_1 :packed array [1..maximum_pids] of
longint_type;
var path_array_1 :packed array [1..maximum_pids] of
path_identifier_type;
var record_zero :integer;
var sntinel_parms_1 :sntinel_parms_1_type;
var sntinel_parms_2 :sntinel_parms_2_type;
aif_area := 2000;
item_num_array[1] := 2065;
item_num_array[2] := 0;
item_array [1] := addr(sntinel_parms_1.ufid);
proc_no := 4;
overall_status.all:= 0;
num_entries := maximum_pids;
item_status_array := init_item_status_array;
AIFSYSWIDEGET(overall_status,
aif_area,
pid_array_1,
pid_array_2,
num_entries,
item_num_array,
item_array,
item_status_array);
if overall_status.all <> 0 then
goto 999;
if (pid_array_1[1].left=0) and (pid_array_1[1].right=0) then
goto 400;
goto 200;
200:
count_2 := 0;
stop_flag := 0;
repeat
file_numbers.cnt := 0;
item_num_array[1] := 2002;
item_num_array[2] := 2015;
item_num_array[3] := 2034;
item_num_array[4] := 2035;
item_num_array[5] := 2063;
item_num_array[6] := 2094;
item_num_array[7] := 0;
item_array [1] := addr(sntinel_parms_2.proc_pin);
item_array [2] := addr(sntinel_parms_2.job_session_no);
item_array [3] := addr(sntinel_parms_2.program_name);
item_array [4] := addr(sntinel_parms_2.program_file_no);
item_array [5] := addr(file_numbers);
item_array [6] := addr(jskey);
item_status_array := init_item_status_array;
overall_status.all:= 0;
proc_no := 5;
count_2 := count_2 + 1;
GETPRIVMODE;
AIFPROCGET(overall_status,
item_num_array,
item_array,
item_status_array,,
pid_array_1[count_2]);
if overall_status.all = 0 then
begin
count_3 := 0;
stop_flag := 0;
repeat
item_num_array[1] := 4013;
item_num_array[2] := 4018;
item_num_array[3] := 4019;
item_num_array[4] := 0;
item_array [1] := addr(sntinel_parms_2.open_count);
item_array [2] := addr(sntinel_parms_2.logical_reads);
item_array [3] := addr(sntinel_parms_2.logical_writes);
item_status_array := init_item_status_array;
overall_status.all:= 0;
proc_no := 6;
count_3 := count_3 + 1;
GETPRIVMODE;
AIFFILELGET(overall_status,
item_num_array,
item_array,
item_status_array,file_numbers.ints[count_3],
pid_array_1[count_2]);
if overall_status.all = 0 then
begin
item_num_array[1] := 1001;
item_num_array[2] := 1009;
item_num_array[3] := 1010;
item_num_array[4] := 1011;
item_num_array[5] := 1012;
item_num_array[6] := 1013;
item_num_array[7] := 1014;
item_num_array[8] := 1015;
item_num_array[9] := 1017;
item_num_array[10] := 1018;
item_num_array[11] := 0;
item_array [1] := addr(sntinel_parms_2.job_name);
item_array [2] := addr(sntinel_parms_2.user_name);
item_array [3] := addr(sntinel_parms_2.group_name);
item_array [4] := addr(sntinel_parms_2.acct_name);
item_array [5] := addr(sntinel_parms_2.input_device);
item_array [6] := addr(sntinel_parms_2.output_device);
item_array [7] := addr(sntinel_parms_2.logon_date);
item_array [8] := addr(sntinel_parms_2.logon_time);
item_array [9] := addr(sntinel_parms_2.jsmain_pin);
item_array [10] := addr(sntinel_parms_2.ci_pin);
item_status_array := init_item_status_array;
overall_status.all := 0;
proc_no := 7;
GETPRIVMODE;
AIFJSGET(overall_status,
item_num_array,
item_array,
item_status_array,,
jskey);
if overall_status.all = 0 then
begin
GETUSERMODE;
FWRITE(fwrite_parms[2].file_num,
sntinel_parms_2,
fwrite_parms[2].rec_lgth,
fwrite_parms[2].ctl_code);
cc:= ccode;
if cc = 2 then
fwrite_parms[2].counter:= count_2
else
begin
file_num:= fwrite_parms[2].file_num;
error_no:= fwrite_parms[2].error_no;
FCHECK(file_num,error_no);
fwrite_parms[2].proc_no := 3;
stop_flag := 1;
fwrite_parms[2].file_num:= file_num;
fwrite_parms[2].error_no:= error_no;
end;
end
else
stop_flag:= 1;
end
else
stop_flag:= 1;
until (count_3 = file_numbers.cnt) or (stop_flag <> 0);
end
else
stop_flag:= 1;
until (count_2 = num_entries) or (stop_flag <> 0);
if stop_flag <> 0 then
goto 999;
goto 300;
300:
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|