× 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.



Joe Pluta wrote:
> 
> I could include an externally described data structure, but now I'm
> looking at wasted storage and possible name space collisions.  Thus my
> dilemma.
> 
> My current thinking is to use a based external DS with a prefix.  This
> would "waste" only the space for a pointer, thus:
> 
> d __SCCKW       e ds                  extname(SCCKW) based(__)
> prefix(__)
> d SccIOKWClear    pr
> d   ID                                like(__KWDFID) value
> d   Format                            like(__KWFMT ) value

Joe, that's a good and standard technique, to use
based(always_the_same_namee) for anything that's only to be used as a
"type" definition.  The compiler won't allow __ as a name, though.

For the prefix, you might want to use the name of the structure, to
avoid name collisions.

d SCCKW_types   e ds                  extname(SCCKW)
based(type_defn_ptr)
D                                     prefix(SCCKW_types_)
d SccIOKWClear    pr
d   ID                                like(SCCKW_types_KWDFID) value
d   Format                            like(SCCKW_types_KWFMT ) value

Qualified wouldn't really get you much extra:

d SCCKW_types   e ds                  extname(SCCKW)
based(type_defn_ptr)
D                                     qualified
d SccIOKWClear    pr
d   ID                                like(SCCKW_types.KWDFID) value
d   Format                            like(SCCKW_types.KWFMT ) value

(Except you'd be able to tell for sure what was the DS name and what was
the subfield name, in cases where the subfield have underscores.)
d   Whatever                           like(SCCKW_types.KW_XYZ ) value
vs
d   Whatever                           like(SCCKW_types_KW_XYZ ) value


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.