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



Bob,

I think you're stating one level too many: he is passing a list of elements
that contain a list themselves.  That is what I do as well:

This is the parameter:

             PARM       KWD(LIBLIST) TYPE(LIBLIST) MIN(1) MAX(25) +
                          PROMPT('Lijst bibliotheken')
 LIBLIST:    ELEM       TYPE(*NAME) MIN(1) PROMPT('Bibliotheek')
             ELEM       TYPE(*CHAR) LEN(10) RSTD(*YES) DFT(*ANZ) +
                          VALUES(*ANZ *DCT *OBJ) PROMPT('Type +
                          bibliotheek')
             ELEM       TYPE(*NAME) DFT(*ALL) SNGVAL((*ALL)) MAX(10) +
                          PROMPT('Source files')
             ELEM       TYPE(*CHAR) LEN(10) RSTD(*YES) DFT(*ALL) +
                          VALUES(MNUCMD CLLE CLP RPG RPGLE SQLRPG +
                          SQLRPGLE MNU36 UNS RPG36) SNGVAL((*ALL)) +
                          MAX(10) PROMPT('Member types')

And this is how I process it:

Definitions:

     D #ANZUTX         PI
     D   LblPmx                       1A   OPTIONS(*VARSIZE)

The main list, containing an array of offsets to the element
     D LblDts          DS                  BASED(LblPtr)
     D   LibNbr                       5U 0
     D   LibOfs                       5U 0 DIM(10)

Element of the main list, containing two offsets to the sublists
     D LibDts          DS                  BASED(LibPtr)
     D   LibElm                       5U 0
     D   LibNme                      10A
     D   LibTyp                      10A
     D   FslOfs                       5U 0
     D   MslOfs                       5U 0

First sublist (Fsl = File selection)
     D FslDts          DS                  BASED      (FslPtr)
     D   FslElm                       5U 0
     D   FslNme                      10A   DIM(10)

Second sublist (Msl = Member type selection)
     D MslDts          DS                  BASED      (MslPtr)
     D   MslElm                       5U 0
     D   MslNme                      10A   DIM(10)

     D   FilSlt        S             10A   DIM(10)
     D   MbrSlt        S             10A   DIM(10)

Part of the mainline that processes the elements in the (main) list:
     C*  Ophalen/verwerken gegevens bibliotheken
     C                   EVAL      LblPtr= %addr(LblPmx)
     C                   FOR       Lib=1      to LibNbr
     C                   EVAL      LibPtr=       LblPtr
     C                                         + LibOfs(Lib)
     C                   EXSR      SR#LIB
     C                   ENDFOR
     C

Subroutine that processes an element of the main list
     C     SR#LIB        BEGSR
     C
     C*  Instellen selectiewaarden
     C
     C                   CLEAR                   FilSlt(*)
     C                   CLEAR                   MbrSlt(*)
     C
     C                   EVAL      FslPtr=       LibPtr
     C                                         + FslOfs
     C                   FOR       Slt=1      to FslElm
     C                   EVAL      FilSlt(Slt)=  FslNme(Slt)
     C                   ENDFOR
     C
     C                   EVAL      MslPtr=       LibPtr
     C                                         + MslOfs
     C                   FOR       Slt=1      to MslElm
     C                   EVAL      MbrSlt(Slt)=  MslNme(Slt)
     C                   ENDFOR
     C
     C                   ENDSR

Joep Beckeringh


----- Original Message -----
From: "Bob Cozzi (RPGIV)" <cozzi@rpgiv.com>
To: <rpg400-l@midrange.com>
Sent: Thursday, December 13, 2001 1:40 AM
Subject: RE: Big complex parameter.


> This guy is passing a list within a list that has a list in it.
> He is not passing a simple ELEM list which has the 2-byte binary prefix
> and then the 3 elements. Note the 3rd element in his example, has
> MAX(300) in addition the ELEM parent has MAX(300) specified.
>
> Bob Cozzi
> cozzi@rpgiv.com





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.