Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

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...

  • one or more locks exist that cover the entire DataArea:
    • All writable data will be uploaded by reconciling the data in the DataArea with the data in the database.
  • one or more locks exist that cover part of the DataArea:
    • All writable data covered by the lock will be uploaded by reconciling the data in the DataArea with the data in the database.
  • no lock exists that covers any part of the DataArea:
    • The UPLOAD will fail.
    • The UPLOAD will fail.
Copy

Syntax

UPLOAD [ADD] DataAreaName ["Comment"] [BatchWait DisableServerRollup] [UploadBatchSize]            

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.

Copy

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                        
Copy

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

 

Copy

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

Published:

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...

  • one or more locks exist that cover the entire DataArea:
    • All writable data will be uploaded by reconciling the data in the DataArea with the data in the database.
  • one or more locks exist that cover part of the DataArea:
    • All writable data covered by the lock will be uploaded by reconciling the data in the DataArea with the data in the database.
  • no lock exists that covers any part of the DataArea:
    • The UPLOAD will fail.
    • The UPLOAD will fail.
Copy

Syntax

UPLOAD [ADD] DataAreaName ["Comment"] [BatchWait DisableServerRollup] [UploadBatchSize]            

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.

Copy

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                        
Copy

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

 

Copy

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

For an optimal Community experience, Please view on Desktop