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




Hello,

1) I'm trying to use the QMHT0100 ds from QSYSINC/QRPGLESRC/QMHLJOBL
copy book.  The 2nd to the last field is a varying length field and is
not being declared in the ibm copy book.

If you're on V5R2 or later, you can do something like this:

     H DFTACTGRP(*NO)

      /copy qsysinc/qrpglesrc,QMHLJOBL

     D msi             ds                  qualified
     D   base                              likeds(QMHT0100)
     D   QMHIFR00                    10I 0
     D   QMHCMQ00                     1A

Then, you can refer to the IBM provided fields as

   msi.base.QMHQJN
   msi.base.QMHQUN
   etc.

And your own fields are referred to as:

   msi.QMHIFR00
   msi.QMHCMQ00


Though, personally I despise the code in the QSYSINC/QRPGLESRC file, I think it's absolutely positively dreadful and awful, and I don't use it. (Actually, the JNI member is an exception to that rule... that one is okay. But, the rest of them are just awful.)

I personally don't want the next guy who comes along to have to puzzle out what QMHQUN stands for. I also think that the members should have prototypes for the APIs to help the RPG programmer get his syntax correct. They also should use the I data type instead of B, for performance's sake if nothing else.

They do all of this very nicely and correctly for C programmers, but very, very poorly for RPG programmers.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.