[SIZE=3][FONT=Times New Roman]def var i as integer no-undo.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]find first customer no-lock no-error.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]do while avail customer:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] tran-block:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] do transaction:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] do i = 1 to 100: /*set any number here for a batch*/[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] if not avail customer then leave tran-block.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] run updateCustomer(buffer customer).[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] find next customer no-error.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] end.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] end.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]end.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]procedure updateCustomer:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] define parameter buffer b for customer.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] find current b exclusive no-error.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] if avail b then[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] do:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] b.discount = 10.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] end.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]end procedure.[/FONT][/SIZE]