f



Re: AIFFILEGGET -- Perm file vs Temp File Problem #3

ok, I figured it out.

My mainline is Cobol calling the Pascal subs.
=20
I had to convert the 32 char byte string to all "1" and then run it thru =
the=20
bitmapcnv intrinsic and then pass that to Pascal -- that's boolean true.
=20
=20
Yeah, it finds the temp file ok but only if I have definitely told it to =
look for the=20
file in the temp domain.=20
=20
But most of the time I don't know which domain the file may be in. This=20=

intrinsic is not smart enough to look in the temp domain first, and then =
the=20
perm domain if the file is not found in the temp domain.
=20
The fopen intrinsic is much smarter than that -- if you pass a 7 to the f=
options=20
parm then fopen looks in the temp domain first and then the perm domain i=
f=20
the file is not found in the temp domain.
=20
However, the aif finds the file regardless of the domain if you go in by =
the ufid.=20
The aif manual states that the tempfile parm is ignored if you are going =
in by=20
the ufid.
=20
No matter, my solution will be to do two calls to aiffilegget -- set the =
tempfile=20
parm to boolean, if the call returns a -43 then set tempfile to zeroes th=
en do=20
the call again. Basically doing what the fopen is probably doing.
=20

Paul, thanks for the heads up.

Give yourself a raise......


Brian.

On Sun, 21 Oct 2007 15:04:31 -0700, Paul Taffel <ptaffel@IO.COM> wrote:

>Er, Brian:
>
>The AIFFILEGGET 'TEMP' parameter is an INPUT parameter.
>
>Note that the manual says "Boolean by value".  Meaning that there's
>no way for the parameter to be modified by the call.
>
>As far as I know, AIFFILEGGET works perfectly well with Perm or
>Temp files.
>
>Paul
>
>At 02:43 PM 2007-10-21, Brian Donaldson wrote:
>>The saga continues. Well, not really, got an answer from the AIF techie=
 a=3D
>>t=3D20
>>HP just a few days ago.
>>
>>The results returned by AIFFILEGGET differs between perm and temp files=
..
>>
>>There are three ways to access a file's attributes with this intrinsic.=

>>
>>Scenario #1 --=3D20
>>
>>Perm file
>>
>>1) Go in by the File Name returns a -43 if file not found
>>2) Go in by the UFID returns -42 if file not found
>>3) Go in by HFS pathname returns a -66 if file not found.
>>
>>Tempfile parm is boolean zeroes.
>>
>>Correct for perm files.
>>
>>
>>Scenario #2 --
>>
>>Temp file=3D20
>>
>>1) Go in by the File Name returns a -43 if file not found
>>2) Go in by the UFID returns -42 if file not found
>>3) Go in by HFS pathname returns a -66 if file not found.
>>
>>Guess what? -- the temp file is not found if you go in by the file name=
 o=3D
>>r hfs=3D20
>>path name. AIFFILEGGET only finds the temporary file if you go in by th=
e =3D
>>UFID.
>>
>>Regardless, the tempfile parm is returned as boolean zeroes! WRONG! -- =
sh=3D
>>ould=3D20
>>be boolean true.
>>
>>
>>After discussions with the techie at HP recently I was given the bad ne=
ws=3D
>>
>>and told that this problem will never be fixed now.
>>
>>Nice one.
>>
>>No matter, I can live with it, as most of the time I would be processin=
g
>>perm files with this intrinsic.
>>
>>Makes me wonder which other AIF intrinsics are flawed......
>>
>>Time will tell,
>>Brian.
>>
>>On Mon, 1 Oct 2007 20:01:57 -0400, Brian Donaldson=20
<bmdinsocal@AOL.COM>=3D20=3D
>>
>>wrote:
>>
>> >I found a solution -- use the UFID instead of the file name and
>> >AIFFILEGGET works just fine.
>> >
>> >Brian.
>> >
>> >On Mon, 1 Oct 2007 15:48:29 -0400, Brian Donaldson=3D20
>><bmdinsocal@AOL.COM>=3D20
>> >wrote:
>> >
>> >>I am using this AIF intrinsic to get info on a file.
>> >>
>> >>Works fine when the file is in the perm domain but it doesn't work i=
f
>> >>the file is in the temp domain.
>> >>
>> >>I need this file to be in the temp domain (not the perm domain) so
>> >>what do I need to do to get AIFFILEGGET to see the temp file.
>> >>
>> >>I would use the FLABELINFO intrinsic but it doesn't give me the file=
=3D20=3D
>>
>> >>lockword when the program is being run by a non SM/AM user.
>> >>
>> >>So I opted for the AIF's.
>> >>
>> >>
>> >>Here's my code:
>> >>
>> >>PROCEDURE get_the_labelinfo(var overall_status:HPE_status;
>> >>                            var item_table    :item_table_type;
>> >>                            var tempfile       :boolean);
>> >>
>> >>label 999;
>> >>begin
>> >>   item_num_array[1]  :=3D3D 5001;
>> >>   item_num_array[2]  :=3D3D 5041;
>> >>   item_num_array[3]  :=3D3D 5016;
>> >>   item_num_array[4]  :=3D3D 5008;
>> >>   item_num_array[5]  :=3D3D 5017;
>> >>   item_num_array[6]  :=3D3D 5012;
>> >>   item_num_array[7]  :=3D3D 5039;
>> >>   item_num_array[8]  :=3D3D 5010;
>> >>   item_num_array[9]  :=3D3D 0;
>> >>
>> >>   item_array    [1]  :=3D3D addr(item_table.itt_file_name);
>> >>   item_array    [2]  :=3D3D addr(item_table.itt_file_owner);
>> >>   item_array    [3]  :=3D3D addr(item_table.itt_rec_size);
>> >>   item_array    [4]  :=3D3D addr(item_table.itt_file_code);
>> >>   item_array    [5]  :=3D3D addr(item_table.itt_eof);
>> >>   item_array    [6]  :=3D3D addr(item_table.itt_foptions);
>> >>   item_array    [7]  :=3D3D addr(item_table.itt_file_type);
>> >>   item_array    [8]  :=3D3D addr(item_table.itt_lockword);
>> >>
>> >>   overall_status.all     :=3D3D 0;
>> >>   user_id                :=3D3D 0;
>> >>   item_status_array      :=3D3D init_item_status_array;
>> >>   item_table.itt_lockword:=3D3D ' ';
>> >>
>> >>   GETPRIVMODE;
>> >>
>> >>   AIFFILEGGET(overall_status,
>> >>               item_num_array,
>> >>               item_array,
>> >>               item_status_array,,
>> >>               item_table.itt_file_name,
>> >>               tempfile,
>> >>               user_id,,);
>> >>   if overall_status.all <> 0 then
>> >>      goto 999;
>> >>
>> >>   goto 999;
>> >>999:
>> >>   GETUSERMODE;
>> >>end;
>> >>
>> >>TIA,
>> >>Brian Donaldson.
>> >>
>> >>* To join/leave the list, search archives, change list settings, *
>> >>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>> >
>> >* To join/leave the list, search archives, change list settings, *
>> >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>>
>>* To join/leave the list, search archives, change list settings, *
>>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

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

0
Brian
10/21/2007 11:40:57 PM
comp.sys.hp.mpe 25828 articles. 0 followers. rhorner (2) is leader. Post Follow

0 Replies
251 Views

Similar Articles

[PageSpeed] 41

Reply: