× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David FOXWELL wrote:
Hi,

How can I call a program that will run in a named activation group without starting in the DFTACTGRP?

All the user menus are displayed by old programs running in the DFTACTGRP. If my program running in a named activation group was called directly from the menu, and returning to the menu I ended that group, would that be OK?

Thanks.

You can specify the activation group in which a program will run in the
compile command, but that's not required. I generally do it, via a
compiler directive (the H spec in RPG.) The value is typically a literal
name, or the special value *CALLER. The program which specifies the
activation group name, is the initial program, and can destroy the
activation group when it completes, thereby releasing all resources that
have been allocated within the group, by calling the CEETREC API
program. I generally code that as the last operation before the normal
exit. The RPG compiler doesn't know about CEETREC, so it still requires
a return or LR just to keep the compiler happy.

A RTVACTGRP command in a CL menu program would accomplish the same thing.

The advantage of CEETREC is that the menu program doesn't need to know
the name of the activation group, and it also works transparently with
system menus, and in batch jobs. If you use CEETREC, don't neglect to
specify the two parameters. Null pointers (*OMIT) can be passed when
they're not needed.

hth

Pete Hall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrKZyIACgkQXczQcKdXKg4B/ACdETpnr6XIh7oLud2eTmBGF50d
VSEAnj1+byY4bCj/DO8efdchqQcNi0of
=cnWR
-----END PGP SIGNATURE-----

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.