Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Creating an Access Definition File Guide


3.1.2 jamscript (execute access definition file) command

Organization of this subsection

(1) Function

The jamscript command registers, updates, and deletes asset information in batch mode according to the definitions in the access definition file. As defined in the access definition file, this command can import and process information from a CSV file into an asset management database, and find information in an asset management database to export into a CSV file.

(2) Syntax

jamscript -f access-definition-file
          (-s variable-name=value (-s variable-name=value))
          (-bp basepath-name)
          (-c)

(3) Options

-f access-definition-file

Specifies the path to the desired access definition file. You can specify either its full path or a relative path. When specifying a relative path, reference the specification to the folder specified by the base path name. This option cannot be omitted.

-s variable-name=value

Specifies the variable name and value to be used as session information. You can also use this option to specify a value when you wish to modify the processing conditions (search conditions, for example) defined in the access definition file. You can also assign a value to this variable when the $GETSESSION embedded function is used in the access definition file.

For details on the $GETSESSION embedded function, see $GETSESSION (get session information) in 5. Embedded Functions Used in Access Definition Files.

-bp basepath-name

Specifies the reference path name of the access definition file. You must specify a full path name for basepath-name. This option can be omitted. If omitted, Asset-Console-installation-folder\scriptwork is assumed.

-c

Use to analyze the syntax of the jamscript command, without executing it.

(4) Return values

This command has the following return values:

Return value

Description

0

Normal end.

11

An error was found in the syntax of a command option.

21

The specified access definition file does not exist.

31

Memory is insufficient.

32

The environment needed to execute the access definition file is not configured properly.

34

An error was found in the access definition file.

52

The user cancelled execution.

101 or greater

The command ended in an error other than the above.

(5) Execution example

jamscript -f "c:\example\accessdef.txt" -s "CSV =c:\temp\data.csv"

(6) Notes

If you use the -bp option to specify a base path name, make sure that you create the CSV file in the first level of the specified folder. If no CSV file exists in the specified folder, an error occurs when the command is executed.