• Subject: Re: opdesc doesnt work?
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Thu, 5 Apr 2001 12:17:59 -0500 (CDT)

On Thu, 5 Apr 2001 Ron@cpumms.com wrote:
> Scott,
> <<Actually, my most recent OS/400 upgrade broke several of my applications.
> <<(Operational Descriptors just dont work on V4R5!  I had to change them to
> <<not use opdesc.  Several other apps didnt work, including the OS/400
> <<telnet server, until I installed PTFs.)
> We use the opdesc keyword in our snderrmsg procedure which is used
> throughout our application to send error messages to the screen. We have
> not experienced any problem since upgrading to V4R5. Granted, we are only
> using it to get the length of the message data passed to the procedure.
> I'm very interested in this since we have a lot of accounts running our
> software that will eventually upgrade to v4r5 also.  What problems are you
> experiencing with operational descriptors? Are you sure its v4r5 related?
> Are you using it to extract information other than the length of a
> parameter?
> Ron Hawkins

I had two apps fail with OPDESC problems... hmmm, let me see if I can
remember what they were....

One scenario was an RPG IV program calling a bound RPG IV module to
execute a command.  It was basically a simplified wrapper around the
QCAPCMD API so that I could exec commands and get back the error
message that occurred.  (Yes, I know there are other ways to do this,
I've already converted it to use a different method)

Here's the procedure interface for it (the prototype is exactly
the same):

D Command         PI             7A   OPDESC
D   peCmd                     3000A   OPTIONS(*VARSIZE) CONST

And then I was calling CEEDOD to get the length of peCmd.  It would
work the first time I called it, but the 2nd call (from the same spot
in the same program) would result in a length of zero.

I suspect that this is because the variable is declared as "CONST",
but it was tested and working flawlessly on V3R2, so the upgrade to
V4R5 wasn't completely compatable.
We had another situation that was similar to this, but I can't remember
what it was :(.   At any rate, it was also using OPDESC to get the
length of a character string -- and it was also coming up with zero
instead of the correct length.   In that circumstance, we simply
passed the length as an additional parameter, and thats all it took
to solve the problem.

| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].