Hi Mark,

I think you are mistaken here.

<quote>
$SERVER$ LIKE (( "%"  +  "Server A" ) +  "%" ) is not programmatically the same 
as $SERVER$ LIKE "%Server A%"
</quote>

Yes is it.  '(( "%"  +  "Server A" ) +  "%" )' is logically equivalent to 
"%Server A%", because by definition based on how BMC have defined the 
qualification syntax, the evaluator will process everything in parentheses to 
come to a final value for the right-hand side of the expression before it uses 
the resultant value for the LIKE operator.  It will combine "%" and "Server A" 
to get the string "%Server A", and then it will combine the resultant "%Server 
A" and "%" to get the string "%Server A%".  At that point, it will evaluate the 
LIKE operator using the final string value (or the $SERVER$ reference if that 
hasn't been evaluated yet).  Whether it's a dynamically built string or a 
string literal is irrelevant, because they way they have defined the syntax, 
it's the end result of the evaluation of the expression that matters, and by 
definition, those two expressions are equivalent, because the resultant string 
is the same.  The fact that they're not treated the same would indicate a flaw 
in their code that processes qualification expressions.

<quote>
%text% isn't magic, it's a system variable that is populated at runtime.
</quote>

That's only on Windows and is entirely outside the context of AR System.  
Within AR system, the % has no special meaning except in qualifications where 
it behaves as a wildcard character.

<quote>
If $SERVER$ <> "Server A" the two are different.
</quote>

That is correct.  However, the issue is that $SERVER$ _does_ equal "Server A", 
but the expression interpreter apparently only recognizes that when you use a 
build string rather than a single string literal.  Since the two expressions 
are logically equivalent according to how they've defined the expression 
syntax, the fact that they are not treated the same, or that you have to use 
one qualification format in one context and the other format in another context 
indicates a problem in their expression interpreter.

Lyle

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Mark Lev
Sent: Thursday, March 19, 2009 10:28 AM
To: [email protected]
Subject: Re: Anyway to read the ARDBC via workflow?- Resolved

$SERVER$ LIKE (( "%"  +  "Server A" ) +  "%" ) is not programmatically the same 
as $SERVER$ LIKE "%Server A%"
 
"%Server A%" is a literal string, will always be what is between quotes.
 
"%" + $SERVER$ + "%" is a computed dynamic string, with $SERVER$ being 
populated at run-time.
 
If $SERVER$ <> "Server A" the two are different.
 
%text% isn't magic, it's a system variable that is populated at runtime.  This 
is for flexibility, and server independence in the case of reserved word 
$SERVER$.  $USER$ is a system variable that populates out to the logged in 
user, so that you don't need to hard code it in every instance or test.  The 
same applies to $SERVER$, etc...
 
Because of this, at times the interpreter may require that a dynamic format be 
used, rather than a literal format, so it can be properly managed.

Thanks,
Mark

Mark Lev
Sr. Systems Consultant
703-672-4390
732-859-5827 (cell) 
[email protected]
-----------------------------------------------------------
RightStar Systems, Inc.
100 East Street SE, Suite 202
Vienna, VA 22180
USA
-----------------------------------------------------------

________________________________

From: Action Request System discussion list(ARSList) on behalf of Juan Ingles
Sent: Thu 3/19/2009 12:05 PM
To: [email protected]
Subject: Re: Anyway to read the ARDBC via workflow?- Resolved


** The only reason I can think of why it would be different is if %text% was 
something "magic" to the interpreter. Like windows trying to expand it as a 
environment variable, for instance.

Juan Ingles

--



On Thu, Mar 19, 2009 at 6:35 AM, Guillaume Rheault <[email protected]> wrote:


        ** 

        I totally agree with you that $SERVER$ LIKE (( "%"  +  "Server A" ) +  
"%" ) should be the same as $SERVER$ LIKE "%Server A%", and I have assumed that 
in the past. I guess I should not assume the obvious....
        
        -Guillaume 


        -----Original Message-----
        From: Action Request System discussion list(ARSList) on behalf of Lyle 
Taylor
        
        Sent: Tue 03/17/09 1:40 PM
        To: [email protected]
        Subject: Re: Anyway to read the ARDBC via workflow?- Resolved
        
        Perhaps I'm just overly critical.  I come from a more hard-core 
programming background, so when I see things like this, I see it as poor design 
and/or lazy programming.  If it's the nature of the beast, that's only because 
the beast was made like that, not because of technical limitations that drove 
this design.
        
        If two statements are interpreted the same but don't work the same, 
that's a bug in my opinion.  The two statements are technically equivalent and 
should be treated exactly the same.
        
        You're philosophy is good, I just get worked up about these kinds of 
things in commercial software...
        
        Lyle
        
        
        -----Original Message-----
        From: Action Request System discussion list(ARSList) [ 
<mailto:ars__Platinum%20Sponsor:%20RMI%20Solutions%20ARSlist:> 


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"

Reply via email to