Hitachi

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


9.1.8 Executing the jamimport (import) command

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

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

Asset-Console-installation-folder\exe

Organization of this subsection

(1) Function

The jamimport command registers data in a CSV file into the asset management database and updates the database. The command registers all data in the CSV file into the asset management database as is in a batch operation. A CSV file to be registered is created for each class.

To register information about multiple classes at one time, you must use a data files definition file.

(2) Format

jamimport
      {{-f data-file-name
          -gc object-class-name-or-association-class-name}
       |-dc data-files-definition-file}
      [-e log-file-name[-s]]
      [-l message-type]

(3) Options

-f data-file-name

Specifies the name of the data file if there is only one data file to be imported. The data file name can be a full or relative path.

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

-gc object-class-name-or-association-class-name

Specifies the class name corresponding to the data file if there is only one data file to be imported.

If you are importing an object class, specify the name of the object class. If you are importing an association class, specify the name of the association class. For details about class names, see 20.1 Organization of classes.

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

-dc data-files-definition-file

Specifies that multiple data files are to be imported in a batch operation. You cannot specify this option together with the -f or -gc option.

The name of the 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, in which case the system outputs the messages to the console where the jamimport command was executed.

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

-s

Specifies that the number of imported 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.

The progress status is displayed each time 50 items are processed.

-l message-type

Specifies the type of messages 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

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

W

Outputs 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

Outputs information messages plus messages with types E and W.

(4) Return value

The jamimport 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 imported 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

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