|
Normally, service program are written to run in *CALLER. This is not a requirement, but the benefit is you can export fields from the service program and import them into the calling RPG IV programs. If the service program is in a different activation group, then you cannot do this export/import. If you have two or more program's running in different activation groups, the data imported by one, cannot be passed to the other. Likewise, if you use CGIDEV2, it uses dynamic memory allocations. So the data allocated in one activation group is scoped to that activation group. I'm not certain, but I believe because it is allocated in AG1 it cannot be passed to a program in AG2. If you're passing a parameter to the second program that was dynamically allocated or is based on a dynamic allocation--you're in violation. This is one reason I switched RPG xTools' CGILIB (similar to CGIDEV2) to use pointers to user space objects instead of dynamic memory allocations. Once I eliminated all the ALLOC's from my programs, I had zero issues with situations like this. To solve your problem, make sure you copy and data you want to pass as a parameter, to a global field that is declared in the caller's program. Don't pass the "return value" from a call to a CGIDEV2 function. (Which is what I suspect you are doing). -Bob Cozzi www.iSeriesTV.com iPod your industry news instead of reading it. Coming July 18, 2006 Ask your friends to tune into iSeriesTV.com -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Feddersen Sent: Thursday, July 13, 2006 6:24 AM To: rpg400-l@xxxxxxxxxxxx Subject: CGI and activation groups I am working on a CGI program that calls other programs based off selection. I am OK calling the other programs as long as they exist in the same activation group. When I try to call a program that exists in a different activation group I get the following messages. Space offset X'0006A769' or X'0000000000000000' is outside current limit for object BUCKLEDEV QTMHHTTP 031721. RPG status 00222 caused procedure ZHBGETINPU in program CGIDEV2/CGISRVPGM2 to stop. I assume the ZHBGETINPUT cannot see the original browser input because it is in the other activation group. Any help would be appreciated. Thanks in advance. Scott Feddersen
As an Amazon Associate we earn from qualifying purchases.
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.