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



All,

I'm got some experience with APIs, but QWDRJOBD is a little different than
what I'm used to.  Not to mention I'm a little out of practice and have yet
to bring copies of my old source to my new place of employment.


Anyway, using Scott Klement's recent example's in the Club Tech iSeries
Programming Tips Newsletters I put together the following prototype for
QWDRJOBD:

d RtvJobDesc      pr                  extpgm('QWDRJOBD')
d  pReceiverVar              65535a   option(*VARSIZE)
d  pReceiverLen                 10i 0 const
d  pFormatName                   8a   const
d  pQualJobd                    20a   const
d  pError                     8192a   option(*VARSIZE)


Looking at the DS for the returned data, I believe that given the use of the
"Offset" and "Number of Library List Entries" fields for the initial library
list I shouldn't hardcode anything past pos 434 of the DS.  Or at least I
should not hardcode the initial library list as starting at that point.  I
suppose I could add a big character buffer at the end, say 3000 bytes or so.

Problem with that, is that the buffer would be static.  It would work now,
but what about the future?

The only thing I can think of is make the buffer huge, but I'm not
particularly fond of that idea.  If I do, perhaps I should use the following
prototype:

d RtvJobDesc      pr                  extpgm('QWDRJOBD')
d  pReceiverBuff                  *   value           
d  pReceiverLen                 10i 0 const
d  pFormatName                   8a   const
d  pQualJobd                    20a   const
d  pError                     8192a   option(*VARSIZE)

And just ALLOC op-code to allocate storage along with a BASED data
structure.  Of course, I could still use the first prototype.  Is that
considered the preferred way of coding it?


Any thoughts appreciated,
Charles

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.