Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Configuration and Administration Guide


9.2.6 Executing the jamexport (export) command

This subsection gives the function, format, options, return values, notes about command execution, and an execution example of the jamexport command, which is used for export operations.

The executable file for the command is stored in the following folder:

Asset-Consoler-installation-folder\exe

Organization of this subsection

(1) Function

The jamexport command outputs information from the asset management database information to a CSV file for each class. For the specified classes, all property values are output as is to the CSV files.

To output information about multiple classes at one time, you must use a data files definition file that defines the correspondence between the classes to be output and the CSV file names.

(2) Format

When exporting object classes

jamexport

{{-f data-file-name

-gc object-class-name}

|-dc data-files-definition-file}

[-e log-file-name[-s]]

[-l message-type]

[-op operation-code]

When exporting association classes

jamexport

{{-f data-file-name

-ac association-class-name

-c1 associated-object-class-name

-c2 another-associated-object-class-name}

|-dc data-files-definition-file}

[-e log-file-name[-s]]

[-l message-type]

[-op operation-code]

(3) Options

-f data-file-name

Specifies the name of the data file if the asset data to be exported is only one object class or association class.

The data file name can be a full or relative path. Make sure that this option is specified together with the -gc (or -ac, -c1, or -c2) option. The -f and -dc options are mutually exclusive.

-gc object-class-name

Specifies the object class name if the asset data to be exported is only one object class or association class.

Make sure that this option is specified together with the -f option. The -gc and -dc options are mutually exclusive.

For details about class names, see 20.1 Organization of classes.

-ac association-class-name

Specifies the name of the association class if asset data is to be exported for a single association class.

Make sure that this option is specified together with the -f, -c1, or -c2 option. The -ac and -dc options are mutually exclusive.

-c1 associated-object-class-name

Specifies the name of the object class associated with the association class if asset data is to be exported for a single association class.

-c2 another-associated-object-class-name

Specifies the name of another object class associated with the association class if asset data is to be exported for a single association class.

-dc data-files-definition-file

Specifies that multiple asset data items are to be exported in a batch operation and the name of the classes to be exported are used in the data files definition file. You cannot specify this option together with the -f, -gc, -ac, -c1, or -c2 option.

The name of a data files definition file can be a full or relative path.

-e log-file-name

Specifies the file to which messages, which are usually output to the console, are to be output. Specify the name of the log file to which messages are to be output.

This option can be omitted. When the option is omitted, the system outputs the messages to the console where the jamexport command was executed.

For details about the log file output format, see Chapter 17. Troubleshooting.

-s

Specifies that the number of exported items is to be displayed on the console as the progress status. You can specify this option only when the -e option is specified. When the -s option is omitted, the number of processed items is not displayed.

-l message-type

Specifies the type of message to be output to the log file. This option can be omitted. When the option is omitted, E is assumed.

The following shows the permitted message types and the information that is output:

E

Output only those messages that report a serious error requiring termination of the program.

W

Output the following two types of messages:

  • Messages with type E

  • Messages reporting an error that does not require termination of the program but that disables some functions

I

Output information messages plus the messages with types E and W

-op operation-code

Specifies either A (addition), C (change), D (deletion), N (no change), or R (comment) as the operation code to be output to each line in the exported file. The operation code is a single character indicating the type of change to the table during import operation. If this option is omitted, N is assumed.

For details about the operation code, see 9.1.6(2) Data file specification format.

(4) Return value

The jamexport command returns the following values:

Return value

Description

0

Normal end

1

Warning occurred, but processing terminated normally.

11

Format error was detected in the command options.

21

The file to be exported is not accessible or contains an error.

52

Processing was canceled by the user.

101 or greater

The command terminated due to some other error.

(5) Notes on command execution

(6) Example

jamexport -f "c:\temp\Hardware.csv" -gc HardwareInfo