Hitachi

JP1 Version 13 JP1/IT Desktop Management 2 Distribution Function Administration Guide


14.19 dcmcsvu.exe (exporting to a CSV-formatted file)

This section explains how to use the dcmcsvu command, which exports inventory information to a text file in CSV format or in the parameter file format.

Function

This command connects the managing server running on the local machine and exports the current inventory information to a text file in CSV format or in the parameter file format. In addition, the results of detecting hosts in which JP1/Software Distribution is not installed or the results of searching for hosts on the network can be output to CSV-formatted files. Note that you can output a CSV file in Unicode, in which case the only supported encoding is UTF-8.

The template by which inventory information can be output is the same as the template used in the CSV output utility Information is output for the items included in the specified template (the columns in the template). If you use a parameter file to specify this command, you can set details about the output items or filter the output information. For output of information on hosts on which JP1/Software Distribution is not installed, host information that is specified as outside the range of detection cannot be output.

Format

dcmcsvu.exe /i parameter-file-name /o result-output-file-name

Arguments

Correspondence between the specification contents of parameter file and command arguments

You can also use command arguments to specify the template used for exporting and output file format instead of specifying these parameters in a parameter file. The table below shows the correspondence between the contents of aparameter file and the command arguments.

Table 14‒16: 6Correspondence between parameter file contents and command arguments (dcmcsvu command)

Specification content of parameter file

Content

Whether to specify

Command argument

Tag

Parameter

OUTPUT_CONSTRAINTS

template

Template used for exporting

Y

template-key

format

Output file format

Y/N#1

/par or /csv

group_membership

Membership group

Y/N

--

row

Item (row) you

want to output

Y/N#2

--

condition

Comparison condition

Y/N

--

Legend:

Y: The parameter must be specified.

Y/N: The parameter can be omitted.

N: The parameter is not necessary (is ignored even when specified).

--: The content cannot be specified by using a command argument.

#1

The default is to output the inventory information to a file in CSV format.

#2

The row parameter takes effect only when you export inventory information to a file in CSV format. If you specify the row parameter when exporting to a file in the parameter file format, the row parameter is ignored.

Command format without using any parameter file

The following shows the format of the command when you specify the command by using arguments only instead of using a parameter file.

dcmcsvu.exe template-key [/par|/csv] /o result-output-file-name

For details about available template keys, see Table 14-23 Export file formats and templates that can be specified in 14.20.14 OUTPUT_CONSTRAINTS (specifying the output information). The items that you can output with each template are the same as those you output with the CSV output utility. For details about the items that are output, see 11.1.1 Items eligible for output to a CSV-formatted file in the manual Administrator's Guide Volume 1.

With respect to the output file format, specify format=par (or csv) for a parameter file. Note however, that you must specify dcmcsvu.exe /par (or /csv), in which a slash (/) is inserted at the beginning for the command argument.

When you use command arguments instead of using a parameter file, you cannot specify details of the output items or filter the output information.

Return codes

The following table lists the return codes that are output when the dcmcsvu command is executed:

Code

Meaning

Action to be taken

0

The file output was successfully completed.

None

1

The command cannot open the specified parameter file or the format of the specified parameter file is incorrect.

Check the pathname or format of the parameter file.

2

An invalid value is specified in a command argument or in the parameter file.

Check the values of command arguments or the values of the parameters in the parameter file.

3

An error occurred during connection or access to the managing server.

Check that the managing server and database server are running and that their settings are correct.

4

The results output file cannot be opened.

Check the status of the results output file, because it may have been opened by another application or there may be insufficient space for the file.

5

The operating environment is incorrect.

Ensure that the operating environment settings for the managing server or database server are correct.

10

The command could not output the information because the number of rows to be written to the parameter file exceeded the maximum when /par was specified.

Check the information that will be output and reduce the number of rows to be output.

11

The information to be written to the output file does not exist, so the command did not create the output file.

None.

12

Other errors occurred.

Check the event log.

Example 1

The following is an example in which the execution status of a job is waiting for installing/ collecting, and in which the job execution status for a host whose job destination name is dmp4* is output to the JOB_DESTINATION tag using the parameter file format:

Creating a parameter file

Create the following parameter file and save it with any name:

OUTPUT_CONSTRAINTS{
template = J_STAT
condition = result=Waiting for installing/collecting AND dstname = dmp4* ;
}
Executing the command

When you created the parameter file with the name C:\temp\in.txt and you want to export the result to the C:\temp\parmjob.txt file, specify the following command:

dcmcsvu.exe /i C:\temp\in.txt /o C:\temp\parmjob.txt /par
Checking the result output file

After the command terminates normally, the result is output to the JOB_DESTINATION tag in the C:\temp\parmjob.txt file in the parameter file format:

JOB_DESTINATION{
host_name = dmp410; dmp4200; dmp4system
}

Example 2

The following is an example in which the execution status of a transferred job is waiting for installing/collecting and in which job name, job execution date/time at the server, and job destination name on a host whose job destination name is dmp4* are output to a CSV-formatted file. In this example, the status item, instead of the job status item, is used to refine the specification of the job execution status.

Creating a parameter file

Create the following parameter file and save it with any name:

OUTPUT_CONSTRAINTS{
template = J_STAT
row = jname; execdate; dstname
condition = status=2000B0 AND dstname = dmp4*;
}
Executing the command

When you created the parameter file with the name C:\temp\in.txt and you want to export the result to the C:\temp\jobout.csv file, specify the following command:

dcmcsvu.exe /i C:\temp\in.txt /csv /o C:\temp\jobout.csv

Example 3

The following is an example in which installed package information on the following host is output to a CSV-formatted file: a host on which a package with a package name *OFFICE and whose first-digit value of the latest version is 6 or less is installed.

Creating a parameter file

Create the following parameter file and save it with any name:

OUTPUT_CONSTRAINTS{
template = INSTLD_PKG
condition = pname = *OFFICE;
condition = newver < 6;
}
Executing the command

When you created the parameter file with the name C:\temp\in.txt and you want to export the result to the C:\temp\inspack.csv, specify the following command:

dcmcsvu.exe /i C:\temp\in.txt /csv /o C:\temp\inspack.csv