Stefio Almeida
New Member
Hi
I am writing a piece of code that will run on PROGRESS V9 to OpenEdge 10.x and my question is as stated in the subject, are using functions like CAN-DO, LOOK-UP in the FOR EACH selection criteria an efficient way of writing code?
Example, is the below code an efficient way of fetching records? or i should fetch the records anyways and then do the necessary checks and skip withing the body of FOR EACH loop?
Thanks in advance for any inputs.
Regards,
Stefio
I am writing a piece of code that will run on PROGRESS V9 to OpenEdge 10.x and my question is as stated in the subject, are using functions like CAN-DO, LOOK-UP in the FOR EACH selection criteria an efficient way of writing code?
Example, is the below code an efficient way of fetching records? or i should fetch the records anyways and then do the necessary checks and skip withing the body of FOR EACH loop?
Code:
for each ld_det where CAN-DO (lv_status, ld_status)
and ld_site = lv_site
and CAN-DO (lv_loc, ld_loc)
no-lock:
end.
Thanks in advance for any inputs.
Regards,
Stefio