I need to create an AS/400 command. Based on the requirement, it has two parameter, say A and B, which cannot be filled in the same time. Both will be displayed when F4 is pressed to prompt, but only one can be filled at a time. If both are filled an error message should appear saying this is invalid. Can someone tell me how to create a command like this? What do I need to specify in the CMD source to achieve it?
Use the DEP command definition statement to control the parameters.
CMD PROMPT('TEST')
PARM KWD(A) TYPE(*CHAR) PROMPT('A')
PARM KWD(B) TYPE(*CHAR) PROMPT('B')
DEP CTL(*ALWAYS) PARM(A B) NBRTRUE(*EQ 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With