Page 1 of 1

mutiple validation in same do not working

Posted: 23 Aug 2019 07:14
by Rajnishjc_27
Hi Frinds

i have script like below
for /F " skip=1 tokens=3,7 delims=;" %%a in (%file% ) do (
set token7=%%b
set token3=%%a
echo !token7! !token3!  it is displaing both the value

if !TOKEN7! equ 0 echo(field "DIS_TYPE" = " " is Blank)
if !token3! equ 0 echo(field "Reason" = " " is Blank)  but it not showing this message
)

only one message its showing, where is the wrong..?

Re: mutiple validation in same do not working

Posted: 23 Aug 2019 13:58
by elzooilogico
review your code, you have unbalanced parentheses. try to change

Code: Select all

echo(…
to

Code: Select all

echo/…
to see what's happening. then tou may return to

Code: Select all

echo(…
as it has especial meaning, it's not an opening parens ar all!

Re: mutiple validation in same do not working

Posted: 24 Aug 2019 08:15
by pieh-ejdsch
Hello,
closing parenthesis is a special character.
Try to Escape every special character with a caret.

Code: Select all

echo( (this^) ^& that ^<are^> "escaped" ^| signs
Phil