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



Uuhhh.  Thanks you.  I agree that the copy book should include the
prototype.


-----Original Message-----
From: rpg400-l-bounces+lim.hock-chai=usamobility.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+lim.hock-chai=usamobility.com@xxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Tuesday, November 29, 2005 2:24 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: why can't I add a subfield to likeds


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.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.