|
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.QMHCMQ00Though, 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 mailing list archive is Copyright 1997-2025 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.