Job Management Partner 1/Software Distribution Administrator's Guide Volume 2
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.
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.
dcmcsvu.exe /i parameter-file-name /o result-output-file-name [/LC {ON|OFF}]
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 a parameter file and the command arguments.
Table 4-8 Correspondence between parameter file contents and arguments (dcmcsvu command)
Parameter file specification contents | Description | Specification | Command argument | |
---|---|---|---|---|
Tag | Parameter | |||
OUTPUT_CONSTRAINTS | template | Template used for exporting | R | template-key |
format | Output file format | O#1 | /par or /csv | |
group_membership | Membership group | O#2 | -- | |
row | Item (row) you want to output | O#3 | -- | |
condition | Comparison condition | O | -- | |
unicode | Whether a CSV file in Unicode is to be output | O#4, #5 | /uniY or /uniN |
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] [/uniY|/uniN] /o result-output-file-name [/LC {ON|OFF}]
For details about available template keys, see Table 4-23 Export file formats and templates that can be specified in 4.26.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 9.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.
Note that the specification for output of CSV files in Unicode is unicode=Y (or unicode=N) in a parameter file, while it is dcmcsvu.exe /uniY (or dcmcsvu.exe /uniN) as a 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.
The following explains the return codes that the dcmcsvu command may return:
Code | Meaning | Action |
---|---|---|
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. |
If JP1/Base is linked to manage JP1/Software Distribution users, see 1.3.3 Setting for executing commands.
The following is an example in which the execution status of a transferred 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:
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* ; }
You can also use the status parameter to extract the jobs in the waiting for installing/collecting status. To use the status parameter to extract jobs, specify the first six characters of the maintenance code: for example, status=2000B0.
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
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 }
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.
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*; }
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
The following is an example in which system information on a host with a minimum installed RAM size of 256 megabytes and belonging to either a host group A or a host group B is output to a CSV-formatted file.
Create the following parameter file and save it with any name:
OUTPUT_CONSTRAINTS{ template = SYS_INFO condition = ram>=256; group_membership = \A;\B; }
When you created the parameter file with the name C:\temp\in.txt and you want to export the result to the C:\temp\system.csv, specify the following command:
dcmcsvu.exe /i C:\temp\in.txt /csv /o C:\temp\system.csv
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.
Create the following parameter file and save it with any name:
OUTPUT_CONSTRAINTS{ template = INSTLD_PKG condition = pname = *OFFICE; condition = newver < 6; }
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
All Rights Reserved. Copyright (C) 2009, 2013, Hitachi, Ltd.
Copyright, patent, trademark, and other intellectual property rights related to the "TMEng.dll" file are owned exclusively by Trend Micro Incorporated.