Re: BATCH SYNTAX: IF varname not present

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Pavel (Atin90_at_hotmail.com)
Date: 12/01/04


Date: Wed, 1 Dec 2004 08:31:09 -0800

Do only if %saspgm% is not blank
Must use Quote on the variable.

if not "%saspgm%"=="" set saspgm=%programname%.sas

-- 
Pavel
"Paul McDonald" <PaulMcDonald@discussions.microsoft.com> wrote in message 
news:6304B6AE-EF91-408C-9922-A3DCD55E9D7B@microsoft.com...
>I have a batch file and am checking for a varibale.
>
> Here's my code:
>   if %saspgm%()==() set saspgm=%programname%.sas
>
> The IF statement is not recognizing when the field SASPGM is 
> missing/blank.
> Can someone help me with the syntax?
>
>
>
>