midrange.com code scratchpad
Name:
Issue with embedded lists in a command
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
01/09/2013 04:39:04 pm
IP:
Logged
Description:
Where the issue comes in is when I define the code and message as lists. There can be up to two codes and there could be up to three message lines for each code. When I specify the code with a max value of two (MAX(2)) and the message with a max value of three (MAX(3)) the command will not compile and I get the error shown here.

CPD0258 30 More than three levels of nesting specified for keyword ENRCODE.
Code:
  1.                    CMD        PROMPT('Billing Statement Insert Setup') TEXT('Billing +
  2.                                   statement insert setup') ALLOW(*INTERACT) MODE(*ALL)
  3.  
  4.                    PARM       KWD(ENRCODE) TYPE(ENRGROUP) MAX(2) +
  5.                                   PROMPT('ENR code')
  6.  ENRGROUP: ELEM       TYPE(*CHAR) LEN(1) MIN(1) +
  7.                                 PROMPT('Code')
  8.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('Start date')
  9.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('End date')
  10.                   ELEM       TYPE(ENRMSG) MAX(3) PROMPT('Message text')
  11.  ENRMSG:    ELEM       TYPE(*CHAR) MIN(1) LEN(80) PROMPT('Message text')
  12.                   ELEM       TYPE(*CHAR) MIN(1) LEN(6) PROMPT('Configuration text')
  13.                   ELEM       TYPE(*CHAR) MIN(1) LEN(2) PROMPT('Size text')
  14.  
  15.                   PARM       KWD(IMPCODE) TYPE(IMPGROUP) MAX(2) PROMPT('IMP code')
  16.  IMPGROUP: ELEM       TYPE(*CHAR) LEN(1) MIN(1) CASE(*MONO) +
  17.                                 CHOICEPGM(*NONE) PROMPT('Code')
  18.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('Start date')
  19.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('End date')
  20.  
  21.                   PARM       KWD(INSCODE) TYPE(INSGROUP) MAX(4) PROMPT('INS code')
  22.  INSGROUP: ELEM       TYPE(*CHAR) LEN(1) MIN(1) CASE(*MONO) +
  23.                                 CHOICEPGM(*NONE) PROMPT('Code')
  24.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('Start date')
  25.                   ELEM       TYPE(*DATE) MIN(1) PROMPT('End date')
© 2004-2019 by midrange.com generated in 0.006s valid xhtml & css