Upload (for DataAreas)
You can use this command to upload changed data from the given DataArea to the database. Initially, a DataArea is created with structure only and the DOWNLOAD command must be used to populate it with data from the database. You must then use the UPLOAD command to send any data changes back to the database. When using the UPLOAD command, the maximum number of open DataAreas allowed at any given time is 31.
Note: The UPLOAD command will upload only data to which the user has write access.
The UPLOAD command depends on the existence and status of the lock ID for the DataArea being uploaded as follows.
Value | Description |
---|---|
DataArea has a valid lock ID | Delta values will be uploaded. |
DataArea does not have a valid lock ID, and... |
|
where:
- DataAreaName is the name of the DataArea.
- ADD is an optional keyword that will add the data in the upload to the existing data in the database. The expected use of this option is to import a file into an empty (non-downloaded) DataArea so that the upload will add the values to the existing data in the database.
Note: If ADD is specified, and the DataArea has been downloaded , the DataArea should be cleared before calling UPLOAD ADD. Otherwise, any data in the upload that matches the data in the DataArea will not be added during upload.
- Comment is an optional setting equivalent to having a BatchComment command before the UPLOAD command, and if it is left out the batch will have no comment.
- BatchWait is equivalent to having a BatchWait command before the UPLOAD command. If you specify BatchWait, you must also specify DisableServerRollup. BatchWait can be one of the following:
- FALSE—Use this value if you want to exit without waiting for the batch to complete.
- TRUE—Use this value if you want to wait for the batch to complete.
Note: If either BatchWait or DisableServerRollup is specified, the other must also be specified.
Syntax example
CREATE DATAAREA daMaster USING Master.lvdsp
CREATE LOCK daMaster USING Master.lvdsp
UPLOAD daMaster "Upload Batch"
CREATE DATAAREA daMaster USING Master.lvdsp
CREATE LOCK daMaster USING Master.lvdsp
UPLOAD daMaster "Upload Batch" FALSE FALSE
CREATE DATAAREA daMaster USING Master.lvdsp
CREATE LOCK daMaster USING Master.lvdsp
UPLOAD daMaster "Upload Batch" 200000
CREATE DATAAREA daMaster USING Master.lvdsp
CREATE LOCK daMaster USING Master.lvdsp
UPLOAD daMaster "Upload Batch" TRUE FALSE 200000
Syntax example: used with the BATCHWAIT command
BATCHWAIT ON 30
UPLOAD D1 "Comment" FALSE FALSE
UPLOAD D2 "Comment" 200000
BATCHWAIT OFF
//The first UPLOAD has BatchWait set to FALSE, and thus turned off.
//The second UPLOAD has BatchWait turned on due to the preceding BATCHWAIT command.
Syntax example: Used with the SERVERMATH command |
---|
|
Syntax example: used with the SERVERMATH command
SERVERMATH OFF CURRENTSESSION
UPLOAD D1 "Comment" FALSE FALSE
UPLOAD D2 "Comment" 200000
SERVERMATH DEFAULT CURRENTSESSION
//The first UPLOAD has the server rollup on since DisableServerRollup set to FALSE. //The second UPLOAD has server rollup off due to the preceding SERVERMATH command.
See also