Rajat Sharma
Member
Hello Everyone, hope you all are well.
I have few queries related to buffer:
1. As per my understanding each DB table has its default buffer with the same name, then why to create buffer with the same name as table name, apparently it works the same as default buffer. please suggest.
2. We can control the scope by using buffer but when we update any record of local buffer(defined in internal procedure) then corresponding original buffer gets updated. for ex:
As per this situation, I unable to figure out the advantage of limiting the scope of buffer to its internal procedure.
Please Suggest.
Thanks & Regards!
Rajat.
I have few queries related to buffer:
1. As per my understanding each DB table has its default buffer with the same name, then why to create buffer with the same name as table name, apparently it works the same as default buffer. please suggest.
2. We can control the scope by using buffer but when we update any record of local buffer(defined in internal procedure) then corresponding original buffer gets updated. for ex:
Code:
RUN l-proc1.
PROCEDURE l-proc1:
DEF BUFFER buf-cust FOR customer.
FOR EACH buf-cust WHERE balance > 25000 EXCLUSIVE-LOCK:
UPDATE customer.ADDRESS.
END.
END PROCEDURE.
FOR EACH CUSTOMER WHERE balance > 25000 NO-LOCK:
DISPLAY ADDRESS.
END.
/*HERE I WILL GET UPDATED ADDRESS FROM BUFFER buf-cust*/
As per this situation, I unable to figure out the advantage of limiting the scope of buffer to its internal procedure.
Please Suggest.
Thanks & Regards!
Rajat.