Jeff Buening wrote:

Programs compiled with DFTACTGRP(*YES) do not behave the same as
ACTGRP(*CALLER), even if the ACTGRP(*CALLER) program was called from the
default activation group. This is because specifying DFTACTGRP(*YES) does
more than control which activation group the program is compiled into,
it also controls some other OPM compatibility things.

Jeff:

Since I haven't seen other responses, I'll comment to give others a chance to disagree or elaborate.

I have no direct info, but I've gotten the impression that some of the "other OPM compatibility things" are more important to older RPG programs than COBOL. Files, for example, would be opened and closed by Cycle code in RPG and LR had meaning for files in Cycle programs. OTOH, COBOL had nothing like the RPG Cycle and how opens/closes would be implicitly handled.

So, COBOL has a number of very different issues to deal with -- COBOL run units would seem to be a primary item. (And I'm not clear how they've been affected.)

I have seen post that say DFTACTGRP(*YES) was to help RPG programs convert
to ILE with out all the goodies of ILE, but still use SEP, content assist
etc.. CRTBNDCBL for cobol does not have a DFTACTGRP parm just ACTGRP parm.
So can I assume using ACTGRP(*CALLER) in cobol is similar to the DFTACTGRP
(*YES) that RPG has? Not sure what the other compatibility things are?

I would think that ACTGRP(*CALLER) for COBOL would be more like ACTGRP(*CALLER) for RPG than like DFTACTGRP(*YES).

IMO, if you want full OPM compatibility, use the OPM compiler... just as could be done with RPG. I don't think the differences in the COBOL compilers are as significant as for RPG.

If I have Cobol "Program A" calls "Program B" and "Program B" is a program
that gets used all throughout the system not just in my "Program A" Call
"Program B" application. If I am changing just my application to ILE would
making "Progam B" ACTGRP(*Caller) be the way to go since other applications
that are still ALL IN OPM COBOL will still be calling "Program B"? Has
anyone done something similar and sees issues with this thinking, because
one post will say one thing and the next another? Or did you create
duplicate programs one for ILE and one for OPM?

You can only create one ProgramB in a given library no matter what. You can't just "create duplicate programs". Of course, if you're willing and able to run your source through the two compilers to create programs in two libraries and qualify your CALLs or manipulate your library lists...?

In any case, I suspect that you simply want to compile as ACTGRP(*CALLER) if you're going to use the ILE compiler.

Note that similar considerations will apply to COBOL as to RPG, e.g., overrides should have appropriate scoping when additional activation groups get involved. I haven't run into anything major myself, but all of the COBOL programs in the past 15 years or so have been single-purpose and wholly self-contained with no external dependencies.

Tom Liotta


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.