This posting is mixing up two different topics: (1) LAG function being a simple queue and (2) short-circuiting evaluation of logical expressions.

The LAG function has been talked/written about a lot already. The short-circuiting evaluation has not been and should be, since this does not happen always and the conditions under which the short-circuiting happens is rather complicated.

For an in depth discussion, as of back in 2003, see the sas-l posting thread starting at this one. Would love to know anything has been changed since.