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



Ok, I use List API's.  In the generic header section it says how many list
entries there are, GHListNbr.  What I want to do is:

/free

       // Retrieve the generic list header.
       clear errc0100;
       errc0100p=errc0100;
       qusptrus(UserSpace:pGH0100:errc0100p);
       errc0100=errc0100p;
       if exceptionId<>*blanks;
        return;
       endif;

       // Initialize our offset to the offset of the list data.
       pJobl0100=pGH0100 + GHListOff;
       For 1 to GHListNbr;
        cmd='SNDBRKMSG MSG(' + Apostrophe + %Trim(BrkMsg) + Apostrophe +
            ') TOMSGQ(' + %trim(JLJobNam) + ')';
        qcmdexc(cmd:%len(%trim(cmd)));
        pJobL0100=pJobL0100 + GHListMbrSz;
       EndFor;

       Return;

      /end-free

But I can't.  Instead I have to
/free

       // Retrieve the generic list header.
       clear errc0100;
       errc0100p=errc0100;
       qusptrus(UserSpace:pGH0100:errc0100p);
       errc0100=errc0100p;
       if exceptionId<>*blanks;
        return;
       endif;

       // Initialize our offset to the offset of the list data.
       pJobl0100=pGH0100 + GHListOff;
       For x = 1 to GHListNbr;
        cmd='SNDBRKMSG MSG(' + Apostrophe + %Trim(BrkMsg) + Apostrophe +
            ') TOMSGQ(' + %trim(JLJobNam) + ')';
        qcmdexc(cmd:%len(%trim(cmd)));
        pJobL0100=pJobL0100 + GHListMbrSz;
       EndFor;

       Return;

      /end-free

And I have no use whatsoever for X.  And X must be previously defined.

Rob Berendt

==================
A smart person learns from their mistakes,
but a wise person learns from OTHER peoples mistakes.



                    "Njal Fisketjon"
                    <n.f@figu.no>           To:     <rpg400-l@midrange.com>
                    Sent by:                cc:
                    rpg400-l-admin@mi       Fax to:
                    drange.com              Subject:     RE: Free format DO, or 
make index optional


                    10/01/2001 06:25
                    PM
                    Please respond to
                    rpg400-l






Rob Berendt wrote:

> I had a 1 do x.
> I wanted to make that free form.  Can't be done.  I converted it to
> for y=1 to x
> But I have no use for y, in this case.

What are you trying to do?


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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-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.