HP3000-L Archives

July 2004, 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:
Brian Donaldson <[log in to unmask]>
Reply To:
Brian Donaldson <[log in to unmask]>
Date:
Mon, 19 Jul 2004 23:05:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (76 lines)
Thanks Tom:

Yes, that's exactly what I tried too! Inside the Pascal sub call
GETPRIVMODE, do the AIF and then call GETUSERMODE, do the FWRITE,
call GETPRIVMODE, do the next AIF, call GETUSERMODE, do the next FWRITE
etc etc.....

I decided against that method as the program was taking a *very* long time
to produce the list of data I wanted -- about 20 MINUTES to produce the
list of PM programs on the box. I have a little 917LX with only about 30
accounts on it and I think 20 minutes was rather excessive.

So I opted for the OCCURS 1500 times and set the size of the Pascal arrays
to 1500. Not really the optimum way to do it but ....

Anyway, I want to thank EVERYONE who took the time to respond to my
requests for help. I discard nothing.

Thanks for your help,
Brian.

On Mon, 19 Jul 2004 16:42:03 -0700, Emerson, Tom
<[log in to unmask]> wrote:

>> From: Brian Donaldson
>>
>> Unfortunately, it is the rules of the AIF intrinsics which
>> need to be in priv mode to operate.
>[...] I thought about having the AIF sub just write the data
>> to a file and when control returns
>> to the Cobol mainline have it read the file and process the
>> data that way.
>
>As I recall, you're calling a Pascal routine to make the actual AIF call,
correct?  And if so, THAT routine is also the one calling
FOPEN/FWRITE/FCLOSE so that later you simply use COBOL verbs to read the
file, right?
>
>Well, if so, I think what needs to be done is to call GETPRIVMODE in
the "sub" rather than in the mainline, something like this: [warning:
somewhat rusty Pascal follows...]
>
>   [pascal header stuff here]
>   (* initialize local storage for AIF call *)
>   cntr := 0;
>   numitems := 0;
>   filenum := FOPEN (...);
>
>   GETPRIVMODE;
>   (* make AIF call that returns the number of items
>      that will eventually return, i.e., something like *)
>   numitems := AIFwhatever(parm, parm, parm...);
>   (* or *)
>   status := AIFwhatever(parm, parm, numitems, parm...);
>   GETUSERMODE;
>
>   WHILE cntr < numItems DO BEGIN
>
>      GETPRIVMODE;
>      (* make AIF call that returns data of interest *)
>      GETUSERMODE;
>
>      (* build output record using data returned by AIF *)
>      FWRITE(filenum, buffer, length);
>      INC(cntr);
>   END;
>   FCLOSE(filenum,0,0);
>
>Does this make sense?
>
>* 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 *

ATOM RSS1 RSS2