How to improve performance

How to change this code to increase the performance?

for each table :
if condition 1 then
call program1.p

else if condtion 2 then
call program2.p

else if condtion 3 then
call program3.p

else if condtion 4 then
call program4.p
end. /* end of table */

each and every called program is CIM to standard QAD program.
shall i use .i instead of .p ?
I think while we calling another program , the Process control block has to change the control. register has to maintained internally. so it may cause performance issue.

A'm I right?

could u give suggestion for this?
 

ss_kiran

Member
How to change this code to increase the performance?

for each table :
if condition 1 then
call program1.p

else if condtion 2 then
call program2.p

else if condtion 3 then
call program3.p

else if condtion 4 then
call program4.p
end. /* end of table */

each and every called program is CIM to standard QAD program.
shall i use .i instead of .p ?
I think while we calling another program , the Process control block has to change the control. register has to maintained internally. so it may cause performance issue.

A'm I right?

could u give suggestion for this?

if the condition check is based on a field of table which is being used in the FOR block, You can use CASE statement.
 

sunilnair

Member
also , the transaction scope of the FOR block (if any) will include the called .p so you might take a hit on your bi file if the called program is big or has further transactions ... .....
 
Top