> From: Scott Klement
> >
> > If I declare a based data structure (EXTNAME and BASED) in a
procedure,
> > what is allocated when I call the procedure?  Common sense tells me
it's
> > just the room for the pointer; that all references to the field are
done
> > via pointer arithmetic.
> >
> 
> Yes, that's correct.  Why?  Are you having problems?

Just the opposite!  I'm getting ready to move some procedures from proof
of concept to production, and I wanted to make sure I wasn't getting
myself in a bind.  I've created a set of - well, I guess the best term
you could use is templates - to use in developing applications, much of
it based on the concept of wrapping files in modules.  One of the
techniques is to pass the address of a data structure to the module and
let it fill the structure with data.  To do that properly I need a based
DS, and I want to make sure I'm not sucking up memory when I do it.

The nice thing about this technique is that I have literally dozens of
modules accessing the same files, and yet I only have one ODP for each
file and no requirement for OS/400 dependencies like SHARE(*YES).  Any
side effects of multiple accesses can be hammered out within the module.
It's kind of slick.

Joe


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.