Page 1 of 1

Constrainst in Transformer Stage Not Working

Posted: Thu Jun 05, 2008 10:06 pm
by nbdbzv4
I have a transformer stage with five output links. The vqrious contstrainst coded do not give the expected results. I have tried deleloping them in notepad and copying and pasting them in the constrainst editor and also entering them directly into the constrainst editor. One of teh problem constrainst follows:

acctlvl = ' ' and srvtype <> 'S' and
caasrvnbr <>132 and
(srvstatus <> 'X' or 'W' or 'F') and
acctlvl_1 = ' ' and
(acctchg_1 <> 'A' or 'C')

Please help as I have tried for 3 days to get this to work..

Thanks

Re: Constrainst in Transformer Stage Not Working

Posted: Thu Jun 05, 2008 10:20 pm
by senthilt1
Hi Nbdbzv4.

Please try the below one, hope it will work,

acctlvl = ' ' and srvtype <> 'S' and
caasrvnbr <>132 and
(srvstatus <> 'X' or srvstatus<>'W' or srvstatus<>'F') and
acctlvl_1 = ' ' and
(acctchg_1 <> 'A' or acctchg_1<>'C')

Find the changes in Bold.

Thanks,

Senthil P

Posted: Fri Jun 06, 2008 12:54 am
by keshav0307
what is actually you are expecting in the output, give some example of input and expected output records

i think the logic you are trying is wrong
if srvstatus <> 'X' or 'W' or 'F' is wrong even (srvstatus <> 'X' or srvstatus<>'W' or srvstatus<>'F' ) is wrong

Posted: Fri Jun 06, 2008 6:57 am
by chulett
Right. You've got the corrected syntax now but as keshav0307 points out having multiple 'not equal' checks with 'or' makes no sense. They needs to be 'and', otherwise it will always return true.

Posted: Fri Jun 06, 2008 9:09 pm
by nbdbzv4
Hi Everyone:

Thanks for taking the time to review my issue and offering suggestions and corrections. I did get it to work by using this format as was suggested:

acctlvl = ' ' and srvtype <> 'S' and
caasrvnbr <>132 and
(srvstatus <> 'X' and srvstatus<>'W' and srvstatus<>'F' ) and
acctlvl_1 = ' ' and
(acctchg_1 <> 'A' and acctchg_1<>'C' ) .

The other issue and confusion which I had was relying upon a verification script developed by the testing group.

Thanks

Posted: Fri Jun 06, 2008 9:10 pm
by nbdbzv4
Hi Everyone:

Thanks for taking the time to review my issue and offering suggestions and corrections. I did get it to work by using this format as was suggested:

acctlvl = ' ' and srvtype <> 'S' and
caasrvnbr <>132 and
(srvstatus <> 'X' and srvstatus<>'W' and srvstatus<>'F' ) and
acctlvl_1 = ' ' and
(acctchg_1 <> 'A' and acctchg_1<>'C' ) .

The other issue and confusion which I had was relying upon a verification script developed by the testing group.

Thanks