/* CRTCMD CMD(mylib/CRTUSRIDX) + */ /* PGM(QSYS/QUSCRTUI) + */ /* SRCFILE(mylib/mysrcf) + */ /* SRCMBR(CRTUSRIDX) + */ /* TEXT('QUSCRTUI') */ CMD PROMPT('Create User Index (QUSCRTUI)') PARM KWD(USRIDX) + TYPE(Q00AB) + MIN(1) + CHOICE(*NONE) + PROMPT('Qualified user index name' 1) Q00AB: QUAL TYPE(*NAME) + LEN(10) + MIN(1) QUAL TYPE(*NAME) + LEN(10) + DFT(*CURLIB) + SPCVAL( + (*CURLIB )) + PROMPT('Index library') PARM KWD(EXTATR) + TYPE(*NAME) + LEN(10) + DFT(*NONE) + SPCVAL( + (*NONE )) + PMTCTL(*PMTRQS) + PROMPT('Extended attribute' 3) PARM KWD(ENTLENATR) + TYPE(*CHAR) + LEN(1) + RSTD(*YES) + DFT(*FIXED) + SPCVAL( + (*FIXED F) + (*VARIABLE V)) + PMTCTL(*PMTRQS) + PROMPT('Entry length attribute' 4) PARM KWD(ENTLEN) + TYPE(*INT4) + DFT(120) + RANGE( + -1 + 2000) + PMTCTL(*PMTRQS) + PROMPT('Entry length' 5) PARM KWD(KEYINS) + TYPE(*CHAR) + LEN(1) + RSTD(*YES) + DFT(*NO) + SPCVAL( + (*YES 1) + (*NO 0)) + PMTCTL(*PMTRQS) + PROMPT('Key insertion attribute' 6) PARM KWD(KEYLEN) + TYPE(*INT4) + DFT(0) + RANGE( + 0 + 2000) + PMTCTL(*PMTRQS) + PROMPT('Key length' 7) PARM KWD(IMMUPD) + TYPE(*CHAR) + LEN(1) + RSTD(*YES) + DFT(*NO) + SPCVAL( + (*YES 1) + (*NO 0)) + PMTCTL(*PMTRQS) + PROMPT('Immediate update attribute' 8) PARM KWD(OPTIMIZE) + TYPE(*CHAR) + LEN(1) + RSTD(*YES) + DFT(*RANDOM) + SPCVAL( + (*RANDOM 0) + (*SEQUENTIAL 1)) + PMTCTL(*PMTRQS) + PROMPT('Optimization attribute' 9) PARM KWD(AUT) + TYPE(*CHAR) + LEN(10) + RSTD(*YES) + DFT(*LIBCRTAUT) + VALUES( + '*ALL' + '*CHANGE' + '*EXCLUDE' + '*LIBCRTAUT' + '*USE') PMTCTL(*PMTRQS) + PROMPT('Default *public authority' 10) PARM KWD(TEXT) + TYPE(*CHAR) + LEN(50) + DFT(*NONE) + SPCVAL( + (*NONE ' ')) + PROMPT('User index text' 2) DEP CTL(&ENTLENATR *EQ 'F') + PARM( + (&ENTLEN *GE 1) + (&ENTLEN *LE 2000)) + MSGID(SYU5000) /* + ADDMSGD MSGID(SYU5000) MSGF(mylib/mymsgf) + MSG('When ENTLENATR(*FIXED), ENTLEN must + range from 1 to 2000.') SECLVL('The + length of a user index entry (ENTLEN) + must be a minimum of 1 and a maximum of + 2000 when the entry length attribute + (ENTLENATR) value is fixed (*FIXED or + "F"). The entry length must be a positive + number not greater than 2000 when the + entries are fixed in length.') + */ DEP CTL(&ENTLENATR *EQ 'V') + PARM( + (&ENTLEN *EQ 0) + (&ENTLEN *EQ -1)) + NBRTRUE(*EQ 1) + MSGID(SYU5001) /* + ADDMSGD MSGID(SYU5001) MSGF(mylib/mymsgf) + MSG('When ENTLENATR(*VARIABLE), ENTLEN + must be either 0 or -1.') SECLVL('The + length of a user index entry (ENTLEN) + must be specified as either 0 (zero) or + -1 (negative one) when the entry length + attribute (ENTLENATR) value is variable + (*VARIABLE or "V"). An entry length of 0 + (zero) indicates a maximum length of 120 + and an entry length of -1 (negative one) + indicates a maximum length of 2000, when + the entries are variable in length.') + */ DEP CTL(&KEYINS *EQ '0') + PARM( + (&KEYLEN *EQ 0)) + MSGID(SYU5002) /* + ADDMSGD MSGID(SYU5002) MSGF(mylib/mymsgf) + MSG('When KEYINS(*NO), KEYLEN must *EQ 0 + (zero) and otherwise must be *GE 1 + (one).') SECLVL('When key insertion + (KEYINS) is not required, the key length + (KEYLEN) must be specified as 0 (zero). + When key insertion is required, key + length must be a positive integer, a + number greater than or equal to 1 (one).') + */ DEP CTL(&KEYINS *EQ '1') + PARM( + (&KEYLEN *GE 1)) + MSGID(SYU5002) DEP CTL(&ENTLEN *EQ 0) + PARM( + (&KEYLEN *LE 120)) + MSGID(SYU5003) /* + ADDMSGD MSGID(SYU5003) MSGF(mylib/mymsgf) + MSG('When ENTLEN(0), KEYLEN must be *LE + 120.') SECLVL('When entry length (ENTLEN) + is specified as 0 (zero), the key length + (KEYLEN) must be less than or equal to + 120. (ENTLEN(0) implies + ENTLENATR(*VARIABLE).)') + */ DEP CTL(&ENTLEN *EQ -1) + PARM( + (&KEYLEN *LE 2000)) + MSGID(SYU5004) /* + ADDMSGD MSGID(SYU5004) MSGF(mylib/mymsgf) + MSG('When ENTLEN(-1), KEYLEN must be *LE + 2000.') SECLVL('When entry length + (ENTLEN) is specified as -1 (negative + one), the key length (KEYLEN) must be + less than or equal to 2000. (ENTLEN(-1) + implies ENTLENATR(*VARIABLE).)') + */ DEP CTL(&ENTLENATR *EQ 'F') + PARM( + (&KEYLEN *LE &ENTLEN)) + MSGID(SYU5005) /* + ADDMSGD MSGID(SYU5005) MSGF(mylib/mymsgf) + MSG('When ENTLENATR(*FIXED), KEYLEN must + be *LE ENTLEN.') SECLVL('The length of a + user index entry key (KEYLEN) must be + less than or equal to the length of the + index entry (ENTLEN) when the entry + length attribute (ENTLENATR) value is + fixed (*FIXED or "F"). The key length + cannot be greater than the length of the + entire entry.') + */