On 6/25/2013 5:26 PM, Jon Paris wrote:
Simply compiling the program to use teraspace will do nothing for
you.  It won't even use it. I believe that pretty much all the RPG
options are concerned with is can RPG access storage referenced via a
teraspace pointer.
The 7.1 enhancement was to allow RPG and COBOL to actually run in the 
teraspace storage model.
Advantages:
- no practical limit to the amount of automatic storage in a procedure 
or the program stack. Whether it's usually a good idea to go over the 
16MB limit is a separate issue.
- ability to run in the same activation group as C or C++ that uses the 
very fast teraspace pointers
ILE RPG could always reference teraspace storage. It was only C and C++ 
that had options to disallow it. But in 6.1, everything can. OPM 
programs, ILE C programs compiled with TERASPACE(*NO), everything.
But it's not a trivial exercise to start running in the teraspace 
storage model. It usually involves a complete overhaul or at least a 
complete review of activation groups, since you can't have programs 
(including service programs) in the same activation group that are 
teraspace storage model and single-level storage model. So if most of 
your calls use *CALLER, you'd have to put everything into the teraspace 
storage model, or at least make them STGMDL(*INHERIT). If there's 
anything you call that you don't have control over so you can't change 
its storage model, then you can have difficulties.
As part of the teraspace enhancement, we also added the ALLOC H spec 
keyword for RPG so that %ALLOC etc could use teraspace storage with its 
much bigger limitations, even in the single-level storage model. That's 
usually the only part of the teraspace enhancement that I really talk 
about in what's-new presentations.
As an Amazon Associate we earn from qualifying purchases.