Batch Command (ORACLE Only)
Allocate memory to hold a number of rows.
asize BATCH_SIZE
BATCH_SIZE
An integer greater than 0 representing the number of rows of data you want to transfer in each operation. The default value is 1.
Description
Rows are transferred in groups according to BATCH_SIZE. As each batch is received, it is sent to the ESL application. For example, if BATCH_SIZE is 5 and 12 rows are selected, two batches of five and one batch of two would be delivered. When using asize to send data, ESL sends each batch as soon as it receives a number of aval commands equal to BATCH_SIZE.
When using this command, you will still respond to lines from the local application in the same way. The asize command simply allows you to control the amount of memory allocated and tune performance according to your knowledge of the database.
Example
subroutine ProcessSQLCommand(string: Command_SV) is
begin guarded
response to start
send Command_SV to SQL
response to "SQL>"
leave block
end
response to BeginInsert
copy "asize 10\n" to SQLCommand_ASV
call ProcessSQLCommand(SQLCommand_ASV)
copy "astmt insert into emp (ename, enum) values (:x, :y)\n" to SQLCommand_ASV
call ProcessSQLCommand(SQLCommand_ASV)
copy "aval JONES, 9000\n" to SQLCommand_ASV
call ProcessSQLCommand(SQLCommand_ASV)
copy "aexec\n" to SQLCommand_ASV
call ProcessSQLCommand(SQLCommand_ASV)