Hi Nathan,

I am sure that a new instance of MAIN is activated but equally sure that the
existing instance of RPP is re-used. In RPP, all my variables are correct,
but in MAIN, my switch to show that it has already been initialised, is OFF
on the second call and all the variables need initialising.

It is quite likely that I don't really understand activation groups as I
have never had a need for them before. I will spend more time on these
unless someone comes up with a better idea.

Many thanks

Rob

2009/1/6 Nathan Andelin <nandelin@xxxxxxxxx>

Rob,

I've never used persistent CGI, but if you're sure that a new instance of
MAIN is activated, that would indicate that a new instance of RPP is also
being activated, given that they both run in the same activation group.

Nathan.


-----Original Message-----
I am using CGIDEV2 (in persistent mode) for the first time and thought
that
I was making reasonable progress but have now run against a problem for
which I need help, although I am sure that it has been solved many times
before.

My cgi program is RPGLE and is a request processing program (I will call
it
RPP) that handles 5250 or HTML/Javascript output. It does not have any
direct database access but calls a second program (I will call it MAIN).
This handles business logic and reads records and passes them back to the
RPP which displays them using 5250 or CGI. In CGI mode, the first call by
RPP of MAIN works OK and the records are displayed by RPP using
wrtsection.
When I type something on my HTML display, the RPP is reactivated correctly
so my Handle is presumably OK and I can read what I typed using
ZhbGetInput. However, when RPP calls MAIN again so that that program can
retrieve the required records, a new instance of MAIN is called. I am
sure
that in the first call of MAIN I did not set on LR and the mechanism works
fine in 5250 mode I imagine that this has something to do with activation
groups.

Can anyone help please? I have tried compiling MAIN with the same named
activation group and binding directory as RPP but this did not help.

Many thanks



--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.