Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread Steve Romanow
Sometimes it seems all it takes is asking someone else to make the soln pop
up.
On Aug 5, 2011 11:19 AM, "John Thompson"  wrote:
> Thanks guys. One of those days where you stare at something for a while,
> and on't realize the obvious :(
>
> On Fri, Aug 5, 2011 at 11:12 AM, Marc Harbeson wrote:
>
>> This is the reason you always place CASE 1 at the end... :-)
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis
>> Sent: Friday, August 05, 2011 11:00 AM
>> To: U2 Users List
>> Subject: Re: [U2] Strange CASE Statement behavior
>>
>> Hi John
>>
>> Based on the values of your variables, your CASE construct is behaving
>> perfectly!
>>
>> As far as I can tell, the reason partial_names_found never executes is
>> because the preceding clause in your CASE statement evaluates to /true/.
>> In a CASE block, each clause is checked until a clause is found which
>> evaluates to /true. /The preceding conditions in the CASE are not
checked.
>>
>> If you really do need to know the results of all conditions, you may be
>> better of with using multiple IF clauses.
>>
>> Regards
>>
>> */Glenn Sallis
>> /**Glenn Sallis Softwareentwicklung und Beratung
>> *47608 Geldern·Deutschland
>> Tel: + 49 2831 9104220 Mob: +49 151 55714743·
>> Email:_gl...@glennsallis.de <mailto:gl...@glennsallis.de>___
>> Web: www.glennsallis.de <http://www.glennsallis.de/>
>>
>> /Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und
>> Benelux/
>>
>>
>>
>> Am 05.08.2011 16:57, schrieb John Thompson:
>> > I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.
>> >
>> > I ran into some really weird behavior with a CASE statement this
morning,
>> or
>> > at least what I deem to be strange.
>> >
>> > I won't post the entire program... yet
>> >
>> > Basically I have some boolean variables that get set earlier in the
>> program
>> > to the following values.
>> >
>> > exact_alpha1_found = @FALSE
>> > partial_alpha1s_found = @TRUE
>> > partial_names_found = @TRUE
>> >
>> > Then the CASE statement does its checks...
>> >
>> > BEGIN CASE
>> > CASE exact_alpha1_found
>> > ...do something...
>> > CASE (partial_alpha1s_found AND partial_names_found)
>> > ...do something...
>> > CASE partial_names_found
>> > ...do something...
>> > END CASE
>> >
>> > However, the CASE partial_names_found never executes. It fails!!!
>> >
>> > Is it only allowed to check these once, and thats it?
>> >
>> > In the debugger the value of partial_names_found is still a 1, even
after
>> > the check fails.
>> >
>>
>> ___
>> U2-Users mailing list
>> U2-Users@listserver.u2ug.org
>> http://listserver.u2ug.org/mailman/listinfo/u2-users
>>
>> ___
>> U2-Users mailing list
>> U2-Users@listserver.u2ug.org
>> http://listserver.u2ug.org/mailman/listinfo/u2-users
>>
>
>
>
> --
> John Thompson
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread John Thompson
Thanks guys.  One of those days where you stare at something for a while,
and on't realize the obvious :(

On Fri, Aug 5, 2011 at 11:12 AM, Marc Harbeson wrote:

> This is the reason you always place CASE 1 at the end...  :-)
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis
> Sent: Friday, August 05, 2011 11:00 AM
> To: U2 Users List
> Subject: Re: [U2] Strange CASE Statement behavior
>
> Hi John
>
> Based on the values of your variables, your CASE construct is behaving
> perfectly!
>
> As far as I can tell, the reason partial_names_found never executes is
> because the preceding clause in your CASE statement evaluates to /true/.
> In a CASE block, each clause is checked until a clause is found which
> evaluates to /true. /The preceding conditions in the CASE are not checked.
>
> If you really do need to know the results of all conditions, you may be
> better of with using multiple IF clauses.
>
> Regards
>
> */Glenn Sallis
> /**Glenn Sallis Softwareentwicklung und Beratung
> *47608 Geldern·Deutschland
> Tel: + 49 2831 9104220 Mob: +49 151 55714743·
> Email:_gl...@glennsallis.de <mailto:gl...@glennsallis.de>___
> Web: www.glennsallis.de <http://www.glennsallis.de/>
>
> /Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und
> Benelux/
>
>
>
> Am 05.08.2011 16:57, schrieb John Thompson:
> > I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.
> >
> > I ran into some really weird behavior with a CASE statement this morning,
> or
> > at least what I deem to be strange.
> >
> > I won't post the entire program... yet
> >
> > Basically I have some boolean variables that get set earlier in the
> program
> > to the following values.
> >
> > exact_alpha1_found= @FALSE
> > partial_alpha1s_found = @TRUE
> > partial_names_found   = @TRUE
> >
> > Then the CASE statement does its checks...
> >
> > BEGIN CASE
> > CASE exact_alpha1_found
> > ...do something...
> > CASE (partial_alpha1s_found AND partial_names_found)
> > ...do something...
> > CASE partial_names_found
> > ...do something...
> > END CASE
> >
> > However, the CASE partial_names_found never executes.  It fails!!!
> >
> > Is it only allowed to check these once, and thats it?
> >
> > In the debugger the value of partial_names_found is still a 1, even after
> > the check fails.
> >
>
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>



-- 
John Thompson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread Marc Harbeson
This is the reason you always place CASE 1 at the end...  :-)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis
Sent: Friday, August 05, 2011 11:00 AM
To: U2 Users List
Subject: Re: [U2] Strange CASE Statement behavior

Hi John

Based on the values of your variables, your CASE construct is behaving 
perfectly!

As far as I can tell, the reason partial_names_found never executes is 
because the preceding clause in your CASE statement evaluates to /true/.
In a CASE block, each clause is checked until a clause is found which 
evaluates to /true. /The preceding conditions in the CASE are not checked.

If you really do need to know the results of all conditions, you may be 
better of with using multiple IF clauses.

Regards

*/Glenn Sallis
/**Glenn Sallis Softwareentwicklung und Beratung
*47608 Geldern·Deutschland
Tel: + 49 2831 9104220 Mob: +49 151 55714743·
Email:_gl...@glennsallis.de <mailto:gl...@glennsallis.de>___
Web: www.glennsallis.de <http://www.glennsallis.de/>

/Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und 
Benelux/



Am 05.08.2011 16:57, schrieb John Thompson:
> I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.
>
> I ran into some really weird behavior with a CASE statement this morning,
or
> at least what I deem to be strange.
>
> I won't post the entire program... yet
>
> Basically I have some boolean variables that get set earlier in the
program
> to the following values.
>
> exact_alpha1_found= @FALSE
> partial_alpha1s_found = @TRUE
> partial_names_found   = @TRUE
>
> Then the CASE statement does its checks...
>
> BEGIN CASE
> CASE exact_alpha1_found
> ...do something...
> CASE (partial_alpha1s_found AND partial_names_found)
> ...do something...
> CASE partial_names_found
> ...do something...
> END CASE
>
> However, the CASE partial_names_found never executes.  It fails!!!
>
> Is it only allowed to check these once, and thats it?
>
> In the debugger the value of partial_names_found is still a 1, even after
> the check fails.
>

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread Glenn Sallis
Sorry, the fourth line of my email should read: "The subsequent 
conditions"


Glenn


Am 05.08.2011 16:59, schrieb Glenn Sallis:

Hi John

Based on the values of your variables, your CASE construct is behaving 
perfectly!


As far as I can tell, the reason partial_names_found never executes is 
because the preceding clause in your CASE statement evaluates to /true/.
In a CASE block, each clause is checked until a clause is found which 
evaluates to /true. /The preceding conditions in the CASE are not 
checked.


If you really do need to know the results of all conditions, you may 
be better of with using multiple IF clauses.


Regards

*/Glenn Sallis
/**Glenn Sallis Softwareentwicklung und Beratung
*47608 Geldern·Deutschland
Tel: + 49 2831 9104220 Mob: +49 151 55714743·
Email:_gl...@glennsallis.de ___
Web: www.glennsallis.de 

/Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und 
Benelux/




Am 05.08.2011 16:57, schrieb John Thompson:

I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.

I ran into some really weird behavior with a CASE statement this 
morning, or

at least what I deem to be strange.

I won't post the entire program... yet

Basically I have some boolean variables that get set earlier in the 
program

to the following values.

exact_alpha1_found= @FALSE
partial_alpha1s_found = @TRUE
partial_names_found   = @TRUE

Then the CASE statement does its checks...

BEGIN CASE
CASE exact_alpha1_found
...do something...
CASE (partial_alpha1s_found AND partial_names_found)
...do something...
CASE partial_names_found
...do something...
END CASE

However, the CASE partial_names_found never executes.  It fails!!!

Is it only allowed to check these once, and thats it?

In the debugger the value of partial_names_found is still a 1, even 
after

the check fails.



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread Glenn Sallis

Hi John

Based on the values of your variables, your CASE construct is behaving 
perfectly!


As far as I can tell, the reason partial_names_found never executes is 
because the preceding clause in your CASE statement evaluates to /true/.
In a CASE block, each clause is checked until a clause is found which 
evaluates to /true. /The preceding conditions in the CASE are not checked.


If you really do need to know the results of all conditions, you may be 
better of with using multiple IF clauses.


Regards

*/Glenn Sallis
/**Glenn Sallis Softwareentwicklung und Beratung
*47608 Geldern·Deutschland
Tel: + 49 2831 9104220 Mob: +49 151 55714743·
Email:_gl...@glennsallis.de ___
Web: www.glennsallis.de 

/Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und 
Benelux/




Am 05.08.2011 16:57, schrieb John Thompson:

I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.

I ran into some really weird behavior with a CASE statement this morning, or
at least what I deem to be strange.

I won't post the entire program... yet

Basically I have some boolean variables that get set earlier in the program
to the following values.

exact_alpha1_found= @FALSE
partial_alpha1s_found = @TRUE
partial_names_found   = @TRUE

Then the CASE statement does its checks...

BEGIN CASE
CASE exact_alpha1_found
...do something...
CASE (partial_alpha1s_found AND partial_names_found)
...do something...
CASE partial_names_found
...do something...
END CASE

However, the CASE partial_names_found never executes.  It fails!!!

Is it only allowed to check these once, and thats it?

In the debugger the value of partial_names_found is still a 1, even after
the check fails.



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread John Thompson
Yeah I need sleep... Sorry.  Thanks.

On Fri, Aug 5, 2011 at 11:01 AM, Israel, John R. <
johnisr...@daytonsuperior.com> wrote:

> Your 2nd CASE was satisfied so no further CASE conditions were tested.
>  Unlike some other languages, once a CASE condition is met, no other CASE
> conditions are tested.
>
>
> John Israel
> Senior Programmer/Analyst
> Dayton Superior Corporation
> 1125 Byers Road
> Miamisburg, OH  45342
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org [mailto:
> u2-users-boun...@listserver.u2ug.org] On Behalf Of John Thompson
> Sent: Friday, August 05, 2011 10:58 AM
> To: U2 Users List
> Subject: [U2] Strange CASE Statement behavior
>
> I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.
>
> I ran into some really weird behavior with a CASE statement this morning,
> or
> at least what I deem to be strange.
>
> I won't post the entire program... yet
>
> Basically I have some boolean variables that get set earlier in the program
> to the following values.
>
> exact_alpha1_found= @FALSE
> partial_alpha1s_found = @TRUE
> partial_names_found   = @TRUE
>
> Then the CASE statement does its checks...
>
> BEGIN CASE
> CASE exact_alpha1_found
> ...do something...
> CASE (partial_alpha1s_found AND partial_names_found)
> ...do something...
> CASE partial_names_found
> ...do something...
> END CASE
>
> However, the CASE partial_names_found never executes.  It fails!!!
>
> Is it only allowed to check these once, and thats it?
>
> In the debugger the value of partial_names_found is still a 1, even after
> the check fails.
>
> --
> John Thompson
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>



-- 
John Thompson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Strange CASE Statement behavior

2011-08-05 Thread Israel, John R.
Your 2nd CASE was satisfied so no further CASE conditions were tested.  Unlike 
some other languages, once a CASE condition is met, no other CASE conditions 
are tested.


John Israel
Senior Programmer/Analyst
Dayton Superior Corporation
1125 Byers Road
Miamisburg, OH  45342

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Thompson
Sent: Friday, August 05, 2011 10:58 AM
To: U2 Users List
Subject: [U2] Strange CASE Statement behavior

I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.

I ran into some really weird behavior with a CASE statement this morning, or
at least what I deem to be strange.

I won't post the entire program... yet

Basically I have some boolean variables that get set earlier in the program
to the following values.

exact_alpha1_found= @FALSE
partial_alpha1s_found = @TRUE
partial_names_found   = @TRUE

Then the CASE statement does its checks...

BEGIN CASE
CASE exact_alpha1_found
...do something...
CASE (partial_alpha1s_found AND partial_names_found)
...do something...
CASE partial_names_found
...do something...
END CASE

However, the CASE partial_names_found never executes.  It fails!!!

Is it only allowed to check these once, and thats it?

In the debugger the value of partial_names_found is still a 1, even after
the check fails.

-- 
John Thompson
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users