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



Bob,

I'm a little confused...

I can see how your code works fine, but surely the reason to used a
'template' structure (based on a dummy pointer) is so that you don't
allocate any memory for it up front? But in your case, this seems to be
negated by the fact that you're copying in the QSYSINC version of QUSEC,
which isn't based..... I guess I just don't see the point of your QUSEC_T
structure, since you don't get the benefits of either subfield qualification
or more meaningful field names... Why not actually define QUSEC_T as a
standalone DS (still based on crap, but not with the LIKEDS) and define the
subfields with nice names etc.?

Or have I missed something? Was this just a top-of-the-head thing where you
didn't actually copy in the code?

Rory

On 8/7/06, Bob Cozzi <cozzi@xxxxxxxxx> wrote:

...And yes the issue of QUSEC is valid (if used in multiple places), but
I've never
had an issue with it. I simply include it like this:
SRCMBR(MYQUSEC)
   /if NOT DEFINED(MYQUSEC)
   /DEFINE MYQUSEC
   /include qsysinc/qrpglesrc,qusec
  D QUSEC_T      DS                 LIKEDS(QUSEC) BASED(crap)
   /endif

And then in my code I /copy in the MYQUSEC member whenever I need QUSEC.
Then I
do this:

    /copy myqusec

     D myAPIErrorDS     DS            LikeDS(QUSEC_T)

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.