Hitachi

JP1 Version 11 JP1/IT Desktop Management 2 Administration Guide


17.5  ioutils importasset (Importing hardware asset information)

Functionality

This command imports hardware asset information using a CSV file. For details about hardware asset items and the CSV file description format, see the JP1/IT Desktop Management 2 Overview and System Design Guide.

When a CSV file is imported, hardware asset information is updated with the values set in the CSV file. However, items whose values are empty (meaning, no values are enclosed in double quotation marks) in the CSV file will not be updated after importing (that is, hardware asset information is not overwritten with a null value).

Tip

If a single-byte space enclosed in double quotation marks (") is specified for a value, the value is processed depending on the condition, as follows:

  • If the item is Department or Location, the value is updated to Unknown.

  • If the data type of the item is Text, the value is updated to a blank.

  • If the data type of the item is Enumeration or Hierarchy, the value is not updated.

Execute this command on the management server.

Format

ioutils importasset -import import-file-name -template template-name [ -encoding character-encoding]

Arguments

-import import-file-name

Specify the absolute path (within 259 bytes) of the CSV file to import.

-template template-name

Specify a template to use for importing.

Only the items specified in the template will be imported.

If the specified items in the template do not exist in the import file, importing is performed as follows:

  • Non-existent items are treated as omitted, and the values at the time of omission will be set for the asset information when importing is finished. The omitted items are not overwritten when importing overwrites the asset information.

  • If a column associated with a mapping key does not exist, an error occurs and importing fails.

-encoding character-encoding

Specify a character encoding for the hardware assert information to import. The following types of character codes can be specified. When you do not specify this argument, the character code is set to UTF-8.

  • US-ASCII

  • ISO-8859-1

  • UTF-8

  • UTF-8N

  • UTF-16

  • UTF-16LE

  • UTF-16BE

  • MS932

  • Shift-JIS

  • EUC-JP

  • JIS

Storage location

JP1/IT Desktop Management 2-installation-folder\mgr\bin\

You can execute this command without specifying the storage location for the executable file, by using the command prompt provided by JP1/IT Desktop Management 2.

Notes

Return value

The following table shows the return values of the ioutils importasset command.

Return values

Description

0

The command finished normally.

11

The format for specifying the command arguments is invalid.

12

The specified folder is invalid, the disk does not have sufficient capacity, or the folder does not exist.

31

Another command is being executed.

51

You do not have the permissions to execute this command.

54

The management server has not been set up.

72

The specified template does not exist.

80

The format of the file being imported is invalid.

101

Command execution failed because there is not enough memory, or due to some other reason.

120

A database access error occurred.

150

The command execution was interrupted due to some other error.

Example

The following example shows use of this command to import the hardware asset information file hardwareexpo.csv, which was exported to C:\temp\, using a template specified for importing hardware asset information.

ioutils importasset -import C:\temp\hardwareexpo.csv -template for hardware asset information import-encoding UTF-8

Related Topics: