Load

Loads data into an application, using a load file on the application server.

Tip:

You can load files from client computers with the HsvcDataLoad type library. This library also offers properties and methods that simplify handling of the data load options. For more information, see Loading Data.

Syntax

<HsvData>.Load bstrServerFileName, bstrLogFileName, varavOptions

Argument

Description

bstrServerFileName

String (ByVal). The name and path of the data load file. This file must exist on the application server.

bstrLogFileName

String (ByVal). The name and path of the log file. The path must exist on the application server.

varavOptions

Variant array (ByVal). The load options for the data load operation. The array is 1-based. For details on indexes and valid values, see Table 61.

Tip:

Use EnumLoadOptions to return information about the valid load options.

The following table describes the data load options. Some of the valid values are represented by constants of the HsvcDataLoad type library. To use these constants, you must reference HsvcDataLoad in your project; for information on this library, see HsvcDataLoad Type Library.

The listed indexes apply to the array passed to Load and to the first dimension of the array returned by EnumLoadOptions.

Table 61. Data Load Options

Index

Load Option Information

1

Option: Delimiter

Usage: Specifies a load file’s delimiter.

Pass to Load: A valid delimiter character (String subtype).

2

Option: Append to Log File

Usage: Specifies whether log data is appended to or overwrites the existing log file.

Pass to Load: Boolean — TRUE to append, FALSE to overwrite.

3

Option: Load Calculated

For internal use.

4

Option: Duplicates

Usage: Sets the data load mode to either replace or merge.

Tip:

This option corresponds to the Lode Mode option buttons in Financial Management’s Load Data workspace frame. For details on the load modes, see the Oracle Hyperion Financial Management, Fusion Edition User's Guide.

Pass to Load: One of the constants listed in Update Mode Constants.

5

Option: Accumulate within file

Usage: Specifies whether multiple values for the same cell within the load file should be accumulated or allowed to overwrite each other.

If the load file does not contain multiple values for the same cell, then this option has no effect. In addition, this load option applies to line items and values, but not to descriptions — multiple descriptions always overwrite.

Note:

Data for system accounts never gets accumulated.

Pass to Load: TRUE to accumulate, FALSE to overwrite.

6

Option: Does the file contain shares data

Usage: Specifies whether the load file contains shares data such as “shares outstanding” or “voting outstanding” or “owned.”

Pass to Load: TRUE if the file contains shares data, FALSE otherwise.

7

Option: Mode

Usage: Specifies whether the data file is loaded or is merely scanned when Load is called.

Pass to Load: One of the following HsvcDataLoad type library constants:

  • HSV_DATALOAD_LOAD. Data will be loaded.

  • HSV_DATALOAD_SCAN. Data will be scanned but not loaded.

The Mode option defaults to scanning, so you must set the option to HSV_DATALOAD_LOAD in order to load data.

8

Option: Does the file contain submission phase data

Usage: Specifies whether the load file contains data for phased submissions.

Pass to Load: TRUE if the file contains phased submissions data, FALSE otherwise.

9

Option: FileFormat

Usage: Specifies the load file format. In this release, only the native file format is supported.

Pass to Load: The following HsvcDataLoad type library constant, which represents the only supported option:

   HSV_DATALOAD_FILE_FORMAT_NATIVE

10

Option: DecimalChar

Usage: Specifies the decimal character used in the load file. By default this option is set to an empty string, which indicates the load operation will use the decimal character set as the user's preference.

Tip:

To get the user preferences for the decimal and thousands separator characters, use the HsvSystemInfo method GetNumberFormattingUserParameters.

Pass to Load: If the load file's decimal character differs from that specified as the user's preference, specify the load file's decimal character. (String subtype).

11

Option: ThousandsChar

Usage: Specifies the thousands separator character used in the load file. By default this option is set to an empty string, which indicates the load operation will use the thousands separator character set as the user's preference.

Pass to Load: If the load file's decimal character differs from that specified as the user's preference, specify the load file's thousands separator character. (String subtype).

Example

The following example loads data. EnumLoadOptions gets the default data load options. The array passed to Load is built: the default Delimiter option is added, the Duplicates option is set to HSV_DATA_UPDATE_ACCUMULATE, and the Mode option is set to HSV_DATALOAD_LOAD. This array is then passed to Load.

Dim cData As HsvData, vaOpts, vaSettings(1 To 11)
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
cData.EnumLoadOptions vaOpts
vaSettings(1) = vaOpts(1, 2)
vaSettings(4) = HSV_DATA_UPDATE_ACCUMULATE
vaSettings(7) = HSV_DATALOAD_LOAD
cData.Load "c:\acme\myapp.dat", "c:\acme\myapp.log", _
   vaSettings