[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: EVALUATE - meaning of BREAK



Sam,

Unfortunately, not a trick question -- I really have this bugger to debug!

There are 13 iterations, and the data being retrieved is not correct.  I am trying to clean it up in some fashion to facilitate fixing it!

- Joe

On Thu, 18 November 1999, Sam Spritzer wrote:

>
> Joe...
> Is this a trick question??
>
> If #iteration = 1, then you are correct...anything after the first break will not run.
>
> Sam
>
> <<< Joe Johnson <jejohn1216@SURFREE.COM> 11/18 10:45a >>>
> Hi, group.
>
> Does the BREAK command that follows each EVALUATE statement mean STOP?
>
> I have an SQR which has this:
> ----------------------------------------------
> evaluate #iteration
>  when  = 1
>     put &a.bill_to_cust_id &a.bill_type_id &amount into store_sales(#i) cust_id prod_type month1_amt
>     let #i = #i   1
>     BREAK
>     let #j = 0
>   while 1=1
>     get $cust_id $prod_type from store_sales(#j) cust_id prod_type
>    if $cust_id = &a.bill_to_cust_id and  $prod_type = &a.bill_type_id
>     put &amount into Store_sales(#j) month2_amt
>     BREAK
>    end-if
>     let #j = #j 1
>    if #J > #I
>     put &a.bill_to_cust_id &a.bill_type_id &amount into store_sales(#j) cust_id prod_type month2_amt
>     let #i = #j
>     let #j = 0
>     BREAK
>    end-if
>  end-while
>   BREAK
> when = 2
> (etc..........)
> -----------------------------------------------
> I would think that the first BREAK in this section should have meant STOP, in which case is the code following it even being run?!?
>
> Any clarification of this would be greatly appreciated!
>
> TIA
>
>
>
> Joe Johnson ;{)
> __________________________________________
> $14.95 a month Unlimited Internet Access.
> Get your first month for $1.00.
> http://www.surfree.com/promo

Joe Johnson ;{)
__________________________________________
$14.95 a month Unlimited Internet Access.
Get your first month for $1.00.
http://www.surfree.com/promo