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



Rob,
The book to look at is
http://publib.boulder.ibm.com/pubs/html/as400/v5r1/ic2924/books/c415721413.h
tm

Bob beat me to posting the layout of the passed "list in a list."  Here's a
code fragment that should help somewhat.  I don't try to receive the whole
input parameter in a single variable; I use pointers.  Before that I was
stuck.

 * define one larger than the number of files on the cmd
 * the "extra" is for the file count.
d input           s              5i 0 dim(301)
d numFiles        s              5i 0
d file            s             10i 0
d mbr             s             10i 0
d mbrName         s             10a
d offset          s             10i 0

 * each file can refer to 50 members
d thisFile        ds                  based(thisFilePtr)
d  numSomething                  5i 0
d  fileName                     10a
d  filler                        2
d  numMbrs                       5i 0
d  mbrList                      10a   dim(50)
d thisFilePtr     s               *

c     *entry        plist
c                   parm                    input

c/free
   numFiles = input(1);
   offset   = 0;

   // File loop
   for file = 1 to numFiles;
   offset   = input(file + 1);
   thisFilePtr = %addr(input) + offset;

      // Member loop
      for mbr = 1 to numMbrs;
        mbrName = mbrlist(mbr);
      endfor;

   endfor;

   *inlr = *on;
 /end-free

Interested lurkers should paste Rob's command in and look at this in debug.
SPecifically, just before the member look, look at thisFile in hex.  Here's
a sample command to use with it:

 ===> ROB FILEMBR((FILE1 (MEMBER101 MEMBER102 MEMBER103)) (FILE000002
(MEMBER201
 MEMBER202)) (F3 (MEMBER301 MEMBER302 MEMBER303 MEMBER304 MEMBER305)))


  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.