Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
On 16/12/2006, at 10:07 AM, Alan Campin wrote:
I want to be able to check a parameter to make sure that the value isnot 'XVSRCLIST EMUTIL' and for the life of me I can't get DEP to work onthis. My parm is defined as: PARM KWD(OUTFILE) TYPE(QUAL1) ALWVAR(*YES) PROMPT('Output file') QUAL1: QUAL TYPE(*NAME) LEN(10) DFT(SRCLIST) QUAL TYPE(*NAME) LEN(10) DFT(QTEMP) SPCVAL((*LIBL)) PROMPT('Library')I am trying this but it always gives me an error no matter what I enter.DEP CTL(*ALWAYS) PARM((&OUTFILE *EQ 'XVSRCLIST EMUTIL ')) NBRTRUE(*GE 1)
First issue is that you're specifying *EQ which means OUTFILE must contain the value you are testing. However, in this case, specifying *NE won't fix the problem.
Second (and more important) issue is that you can't use DEP to properly test QUAL or ELEM values. For reasons known only to the CL developers DEP only compares against the first QUAL or ELEM statement in a group. Thus your DEP will always fail because the first QUAL will never contain the value against which you are comparing.
You can test this by:DEP CTL(*ALWAYS) PARM((&OUTFILE *NE 'XVSRCLIST')) /* Never allow the value */
orDEP CTL(*ALWAYS) PARM((&OUTFILE *EQ 'XVSRCLIST')) /* Require the specified value */
These comparisons will work as expected but as soon as you increase the length of the compare value to include additional non-blank characters the comparison will not operate as you expect.
DEP CTL(*ALWAYS) PARM((&OUTFILE *NE 'XVSRCLIST E'))
I have some vague recollection of seeing this behaviour documented
somewhere--maybe in an error message--but I cannot recall the location.
One possibility would be to use the REL keyword on each QUAL statement as follows: QUAL1: QUAL TYPE(*NAME) LEN(10) DFT(SRCLIST) REL(*NE XVSRCLIST)
QUAL TYPE(*NAME) LEN(10) DFT(QTEMP) SPCVAL((*LIBL)) +
PROMPT('Library')
REL(*NE EMUTIL)