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



Okay, I'm running into an issue.  I've gotten very good about creating
modules and using /COPY to separate the external prototypes for
procedures.  This works wonderfully except for one specific situation.

Often, I like to pass a database field as a parameter.  I've learned
over the years that the best way to define such a field is by doing a
LIKE define against the actual database field.  For example:

d SccIOKWClear    pr                                       
d   ID                                like(KWDFID) value 
d   Format                            like(KWFMT ) value

This function clears all the records from the file with the two key
fields specified.  Works like a champ, provided I have defined KWDFID
and KWFMT. However, with a /COPY prototype, there's no simple way of
importing the database definitions in order to do a LIKE define against
them.

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

(The double underscore is just an idea; I could just as easily use a
double @ or something else to try and minimize collisions.)

Any comments?

Joe



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.