`RUN FILE BY S.DARDEL/ NDAR JULY 2015:

`A user was trying to enter multi-level conditions with the following syntax:

 

`IF {DS1}<>{DP1} and IF {DS2}<>{DP2} THEN .MACRO0 else IF {DS1}<>{DP1} and IF {DS2}={DP2} THEN .MACRO1 else IF {DS2}<>{DP2} and IF {DS1}={DP1} THEN .MACRO1 ELSE .MACRO2

 

`The above is not an acceptable syntax. The IF / AND is for instance not supported.

`the IF command allows the existence of 3 conditions ( IF / THEN / ELSE...) on the same level

`The below example proposes to address conditions on multiple levels,

`by assigining a tag "0" or "1" to each first-level condition, then adding

`the 2 tags to create 3 conditions:

 

v TAG1 TAG2 SUM

 

if {DS1} = {DP1} then set TAG1 = 1 else set TAG1=0

if {Ds2} = {DP2} then set TAG2 = 1 else set TAG2=0

 

set SUM= {TAG1} plus {TAG2}

 

me Variable values: tag1={TAG1} ^ TAG2={TAG2} ^ sum={SUM}    `For checking purpose

 

iF {SUM} = 0 THEN .MACRO0

iF {SUM} = 2 THEN .MACRO1

iF {SUM} = 1 THEN .MACRO2