Execute Export Queries
1 – Introduction
In some customer cases, documents quantity is so big that we cannot export them at once.
So, we have to create several Batches to limit exportation to manageable quantity.
2 – Cut Document Volume to Batches
The best manageable way to cut documents volume for a given Document type is to use NUMDON value.
NUMDON is related to each Jukebox’s volume for a given document type.
You need to audit a document type’s table content to measure quantity by NUMDON.
The following query can help you:
Select NUMDON, count(*) from DOCUM;
Where DOCUM is the document type code.
Please imagine Batches not bigger than 50 000 documents. This will generate 100 000 files, one for document itself, and another for .LDS file.
3 – Create Scripts per Batch
Then please create an export script file for each Batch by adding a Where directive at the end of each script’s line.
The where directive should be:
where numdon=nnn;
Or
where numdon <=xxx and numdon >=yyy;
In this example:
- nnn is fixed value for a numdon where enough documents will be contained ina Batch
- xxx and yyy are numdon’s lower and upper limits
If for a document type quantity is not so important, you don’t need to create several batchs. So, you don’t need to add where directive.