14.20.14 OUTPUT_CONSTRAINTS (specifying the output information)
In the OUTPUT_CONSTRAINTS tag, you can specify the kinds and comparison condition for the information you want to output. You can use this tag in the dcmcsvu command only.
The following table shows the parameters that can be specified and their corresponding command arguments:
Parameter |
Content |
Command argument |
---|---|---|
Template used for exporting |
template-key |
|
Format of the output file |
csv or par |
|
Item (row) to be output |
-- |
|
Group to which the targets belongs |
-- |
|
Comparison condition |
-- |
Legend: --: Do not specify as a command argument.
Use a template provided by JP1/Software Distribution to specify the items you want to output. This template is the same as the template that the CSV output utility uses. Information is output for the items included in the specified template (the columns in the template). For some templates, you can also perform the following operations:
-
Exporting only the specified information items (valid only when exporting information to a file in CSV format)
-
Extracting the output information by specifying the comparison condition expression or host group
- Organization of this subsection
(1) Format
OUTPUT_CONSTRAINTS{ template = template-key format = export-file-format (csv or par) row = items-to-be-output (row) group_membership = group-of-the-host condition = condition }
(2) Description
-
template=template-key
In template-key, specify the template key for the template you want to use for exporting the inventory information. The items you can export with the template are the same as the items that the CSV output utility outputs to a CSV-formatted file.
You can specify any template when exporting inventory information in CSV format. However, some templates cannot be specified when you export inventory information in the parameter file format. The following shows the templates and the export formats that can be specified.
Table 14‒18: Export file formats and templates that can be specified Template key
Corresponding template
CSV format
Parameter file format
HOST_ATTR
Host attributes
Y
Y
PKG_INFO
Package attributes
Y
Y
PKG_FILES
Package contents
Y
N
INSTLD_PKG
Installed package information
Y
Y
J_STAT
Job status
Y
Y
- Legend:
-
Y: Specifiable
N: Not specifiable
-
format=export-file-format
Specify either of these keywords as the export format of the output file:
- csv
-
Exports the inventory information to the result output file in CSV format.
- par
-
If you specify this keyword, the command exports the inventory information to the result output file in the parameter file format.
When you export the inventory information to a file in the parameter file format, the tag information to be output differs depending on the template you use. The following shows the template keys and the tags that are displayed.
Table 14‒19: Tags to be output to a file in the parameter file format Template key
Parameter file format
HOST_ATTR (host attribute)
JOB_DESTINATION
PKG_INFO (package attribute)
PACKAGING_INFORMATION
INSTLD_PKG (installed package information)
JOB_DESTINATION
J_STAT (job status)
JOB_DESTINATION
If you specify the export format in both a command argument and the parameter file, the command argument prevails. If you specify the export format in neither a command argument nor the parameter file, csv is used by default.
-
row=items-to-be-output (row)
To output inventory information to a CSV-formatted file, individually specify the items (rows) in the template that are to be output. Use a semicolon (;) to separate each item. The spaces before and after semicolons are ignored.
The following shows the format of the row parameter:
row = item-1;item-2;item-3...
If you do not specify the row parameter, the command outputs the information for all items. The output item specification by the row parameter is valid only when you use any of the following templates to export the inventory information to a file in the CSV format:
-
HOST_ATTR (host attribute)
-
INSTLD_PKG (installed package information)
-
J_STAT (job status)
When you use a template other than the preceding to export the inventory information to a file in CSV format, you cannot specify the items you want to output. The command outputs the information for all items. If you export the inventory information to a file in the parameter file format, the row parameter is ignored.
Tables 14-20 to 14-22 list the items you can specify in the row parameter in each template.
Table 14‒20: Items that can be specified in the row parameter with the HOST_ATTR (host attribute) template Items that can be specified in the row parameter
Explanation
host
Host name
ipaddr
IP address
hid
Host ID
macaddr
MAC address
type
Type
route
Route
group
Group to which the host belongs
holdrep
Notification hold
suspended
File transfer suspended at relay system
cmnt
Comment
cdate
Creation date/time
date
Update date/time
pkgupdate
Installed package information last update date
Table 14‒21: Items that can be specified in the row parameter with the INSTLD_PKG (installed package information) template Items that can be specified in the row parameter
Explanation
host
Host name
ipaddr
IP address
pname
Package name
pid
Package ID
install
Installation
newver
New version
newgen
New generation
date
Installation or software search date/time
Table 14‒22: Items that can be specified in the row parameter with the J_STAT (job status) template Items that can be specified in the row parameter
Explanation
folder
Folder name
jname
Job name
jattr
Job attribute
execdate
Execution date/time at the server
execsch
Scheduled execution date/time at the server
sduedate
Execution time limit at the server
sregdate
Scheduled registration date/time at the server
dstname
Job destination name
jtype
Job type
dexecdate
Job execution date/time by destination
pname
Package name
pid
Package ID
cabid
Cabinet ID
dmcode
DM ID code
pver
Version
pgen
Generation
cexecdate
Installation date/time at the client
result
Result
status
Status
-
-
group_membership=group-of-the-host
In group-of-the-host, specify the group to which the target host belongs as a condition for extracting the information to be output. You can specify one of the group types: relay manager/system, host group, and ID group. You can specify more than one group of the same type. When you specify more than one group, use a semicolon (;) to separate each of the groups or write more than one group_membership parameter line. The specified groups are evaluated with the OR condition. The following shows the format of the group_membership parameter:
group_membership = [relay-manager/systems | host-groups | ID-groups]
-
relay-manager/systems
In relay-manager/systems, specify one or more relay managers/systems. You can specify paths consisting of names delimited by backslashes (\).
-
host-groups
In host-groups, specify one or more host group names that begin with a backslash (\). You can specify paths consisting of names delimited by backslashes (\).
-
ID-groups
In ID-groups, specify an ID group name that begins with \%.
The templates that allow you to use the group_membership parameter for extracting information differ depending on the export file format. The following shows the export file formats for which the template supports the group_membership parameter.
Table 14‒23: Templates supporting the group_membership parameter Template key
Corresponding template
CSV format
Parameter file format
HOST_ATTR
Host attributes
O
O
PKG_INFO
Package attributes
X
X
PKG_FILES
Package contents
X
--
INSTLD_PKG
Installed package information
O
X
J_STAT
Job status
X
X
- Legend:
-
O: Can specify the group_membership parameter.
X: Cannot specify the group_membership parameter.
--: Template that cannot be used in parameter file format.
-
-
condition=condition
In condition, specify a comparison condition expression for limiting the range of values you want to output. You can use items (rows) of the template as the keys for extracting information to create a comparison condition expression.
The templates that allow you to use the condition parameter differ depending on the export file format. You can use the condition parameter for all the templates available for exporting to a file in the parameter file format. The table below shows the export file formats for which the template supports the condition parameter.
Table 14‒24: Templates supporting the condition parameter Template key
Corresponding template
CSV format
Parameter file format
HOST_ATTR
Host attributes
X
O
PKG_INFO
Package attributes
X
O
PKG_FILES
Package contents
X
--
INSTLD_PKG
Installed package information
O
O
J_STAT
Job status
O
O
- Legend:
-
O: Can specify the condition parameter.
X:Cannot specify the condition parameter.
--: Template that cannot be used in parameter file format.
The following shows the format of the condition parameter:
condition = condition [{AND|OR} condition [{AND|OR} condition] ]...
Use the AND and/or OR operators to combine operands to create a condition expression. The conditional expression AND is executed first. The following shows examples of expressions:
- X AND Y AND Z
-
The program extracts the information that satisfies all of the conditions X, Y, and Z.
- X AND Y OR Z
-
The program extracts the information that satisfies both the conditions X and Y, and extracts the information that satisfies the condition Z.
- X OR Y AND Z
-
The program extracts the information that satisfies both the conditions Y and Z, or the condition X.
- X OR Y OR Z
-
The program extracts the information that satisfies any of the conditions X, Y, and Z.
When you use more than one comparison condition, remember the following points:
-
When writing more than one condition statement line, use AND operators to combine them.
-
You can write up to 15 condition statement lines.
The table below shows the formats of the comparison conditions you can use.
Table 14‒25: Formats of comparison conditions Comparison condition
Explanation
A=X
The value of the item A is equal to the condition value X.
A<X
The value of the item A is less than the condition value X.
A>X
The value of the item A is greater than the condition value X.
A<=X
The value of the item A is less than or equal to the condition value X.
A>=X
The value of the item A is greater than or equal to the condition value X.
A<>X
The value of the item A is not the condition value X.
A: X1-X2
The value of the item A is within the range of the condition values X1 to X2.
A: X1, X2, ... Xn
The value of the item A is any of the condition values X1, X2, ... and Xn.
A=[*]X*
The value of the item A includes the character string X. An asterisk (*) stands for an indefinite number of characters. A question mark (?) stands for a single character (1 byte).
Examples:
dmp60?: Information such as dmp600, dmp601, and dmp602 is output.
dmp?00: Information such as dmp100, dmp300, and dmp600 is output.
dmp60*: Information such as dmp600, dmp6000, and dmp60000 is output.
A<>X1-X2
The value of the item A is not within the range from the condition values X1 to X2.
A<>X1, X2, ... Xn
The value of the item A is not any of the condition values X1, X2, ... and Xn.
A<>[*]X*
The value of the item A does not include the character string X. An asterisk (*) stands for an indefinite number of characters. A question mark (?) stands for a single character (1 byte).
<>dmp60?: Information other than strings such as dmp600, dmp601, and dmp602 is output.
<>dmp60*: Information other than strings such as dmp600, dmp6000, and dmp60000 is output.
Notes
-
The value A in the comparison condition indicates an item used as a key for extracting information. For the items that can be specified in the condition parameter, see tables below.
-
If a required entry is missing or there is a conflict in the condition expression, the program returns a syntax error and outputs an error message to the event log.
-
You can place 0 or more spaces between a value and an operator (=, >, etc.).
-
You can use wildcards only when the comparison condition is in an A =[*]X* or A <>[*]X* format.
-
If you want to use an asterisk (*) as a wildcard in a condition expression, always append a semicolon (;) to the expression. You can write a comment after the semicolon. If you do not append a semicolon, the program skips the portion after an asterisk, assuming the portion to be a comment.
-
If you want to use =, <, >, :, -, AND, or OR as a character string in a condition expression, prefix a backslash (\) to them.
For example, if you want to use a host with the name AND as a condition, specify:
host=\AND
The items that can be specified in the condition expression of a condition parameter differ depending on the export file format (the CSV format or parameter file format). If you use an item that cannot be used as a comparison condition, an error occurs and a return code 2 is returned.
Tables 14-26 to 14-27 list the items you can specify in the condition parameter when exporting information to a file in CSV format.
Table 14‒26: Items that can be specified in the condition parameter with the INSTLD_PKG (installed package information) template when exporting to a file in CSV format Item
Explanation
Setting the values and conditions
host
Host name
Inclusion of , or > causes a syntax error.
ipaddr
IP address
Inclusion of , or > causes a syntax error.
The number of periods is not checked
pname
Package name
Inclusion of , or > causes a syntax error.
pid
Package ID
Inclusion of , or > causes a syntax error.
newver
New version
Inclusion of , or > causes a syntax error.
newgen
New generation
Inclusion of , or > causes a syntax error.
date
Installation or software search date/time
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
#:
In YYYY (year), specify a value in the range from 1970 to 3000. If you do not specify a value within this range, an error occurs and the return code 2 is returned. You can omit the portions other than YYYY. The omitted portions are set to their minimum values. If you specify a single-digit value, prefix a 0 to align the digits. If you do not align the digits, an error occurs. The following examples show you how to use date representation correctly:
- 200
-
Error
- 2022
-
0:00 on January 1, 2022
- 2022101
-
Error
- 20221010
-
0:00 on October 10, 2022
- 202201010101
-
1:01 on January 1, 2022
- 202212312359
-
23:59 on December 31, 2022
If you use a date/time representation in the following comparison conditions, an error occurs: A=X, A<>X, A:X1,X2,... Xn, A=[*]X*, A<>X1,X2,... Xn, or A<>[*]X*.
Table 14‒27: Items that can be specified in the condition parameter with the J_STAT (job status) template when exporting to a file in CSV format Item
Explanation
Setting the values and conditions
jname
Job name
Inclusion of , or > causes a syntax error.
execdate
Execution date/time at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
execsch
Scheduled execution date/time at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
sduedate
Execution time limit at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
sregdate
Scheduled registration date/time at the server.
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
dstname
Job destination name
Inclusion of , or > causes a syntax error. Use ! or \ for hierarchical representation.
dexecdate
ob execution date/time by destination
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
pname
Package name
Inclusion of , or > causes a syntax error.
pid
Package ID
Inclusion of , or > causes a syntax error.
cabid
Cabinet ID
Inclusion of , or > causes a syntax error.
pver
Version
Inclusion of , or > causes a syntax error.
pgen
Generation
Inclusion of , or > causes a syntax error.
status
Status
You can specify the first 1 to 6 characters of the maintenance code for Remote Installation Manager. You can use * or ? in the condition. If you include , or >, a syntax error occurs. The following comparison conditions cannot be specified: A:X1-X2, A:X1,X2,... Xn, A<>X1 - X2, and A<>X1,X2,... Xn.
- #
-
For details about how to represent the date/time and examples of date/time representation, see Table 14-26.
Tables 14-28 to 14-31 list the items you can specify in the condition expression of a condition parameter when exporting to a file in the parameter file format. Unlike when the CSV output utility is used, when you use a command to output a file in parameter file format, you can use the Host attributes and Package attributes template to narrow the conditions.
Table 14‒28: Items that can be specified in the condition parameter with the HOST_ATTR (host attribute) template when exporting to a file in the parameter file format Item
Explanation
Setting the values and conditions
host
Host name
Inclusion of , or > causes a syntax error.
ipaddr
IP address
Inclusion of , or > causes a syntax error.
The number of periods is not checked
cmnt
Comment
Inclusion of , or > causes a syntax error.
cdate
Creation date/time
Use only numbers to represent the date/time in the YYYYMMDDhhmm format.#
date
Update date/time
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
pkgupdate
Installed package information last update date
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
- #
-
For details about how to represent the date/time and examples of date/time representation, see Table 14-26.
Table 14‒29: Items that can be specified in the condition parameter with the PKG_INFO (package attribute) template when exporting to a file in the parameter file format Item
Explanation
Setting the values and conditions
pname
Package name
Inclusion of , or > causes a syntax error.
pid
Package ID
Inclusion of , or > causes a syntax error.
cabid
Cabinet ID
Inclusion of , or > causes a syntax error.
dmcode
DM ID code#
Specify PC or WS. Any other specification causes an error.
pver
Version
Inclusion of , or > causes a syntax error.
pgen
Generation
Inclusion of , or > causes a syntax error.
cabname
Cabinet name
Inclusion of , or > causes a syntax error.
- #
-
The template does not include this item, but it can be specified in the condition parameter.
Table 14‒30: Items that can be specified in the condition parameter with the INSTLD_PKG (installed package information) template when exporting to a file in the parameter file format Item
Explanation
Setting the values and conditions
host
Name of the host where the package is installed
Inclusion of , or > causes a syntax error.
ipaddr
IP address of the host where the package is installed
Inclusion of , or > causes a syntax error. The number of periods is not checked.
pname
Package name
Inclusion of , or > causes a syntax error.
pid
Package ID
Inclusion of , or > causes a syntax error.
install
Installation
Inclusion of , or > causes a syntax error.
newver
New version
Inclusion of , or > causes a syntax error.
newgen
New generation
Inclusion of , or > causes a syntax error.
date
Installation or software search date/time
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
- #
-
For details about how to represent the date/time and examples of date/time representation, see Table 14-26.
Table 14‒31: Items that can be specified in the condition parameter with the J_STAT (job status) template when exporting to a file in the parameter file format Item
Explanation
Setting the values and conditions
folder
Folder name
Inclusion of , or > causes a syntax error.
jname
Job name
Inclusion of , or > causes a syntax error.
jattr
Job attribute
Inclusion of , or > causes a syntax error.
execdate
Execution date/time at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
execsch
Scheduled execution date/time at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
sduedate
Execution time limit at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
sregdate
Scheduled registration date/time at the server
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
dstname
Job destination name
There are no restrictions. Use ! or \ for hierarchical representation.
jtype
Job type
Inclusion of , or > causes a syntax error.
dexecdate
Job execution date/time by destination
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
pname
Package name
Inclusion of , or > causes a syntax error.
pid
Package ID
Inclusion of , or > causes a syntax error.
cabid
Cabinet ID
Inclusion of , or > causes a syntax error.
dmcode
DM ID code
Specify PC or WS. Any other specification causes an error.
pver
Version
Inclusion of , or > causes a syntax error.
pgen
Generation
Inclusion of , or > causes a syntax error.
cexecdate
Installation date/time at the client
Use numbers only to represent the date/time in the YYYYMMDDhhmm format.#
result
Result
Inclusion of , or > causes a syntax error.
status
Status
You can specify the first 1 to 6 characters of the maintenance code for Remote Installation Manager. You can use * or ? in the condition.
If you include , or >, a syntax error occurs. The following comparison conditions cannot be specified: A:X1-X2, A:X1,X2,... Xn, A<>X1-X2, and A<>X1,X2,... Xn
- #
-
For details about how to represent the date/time and examples of date/time representation, see Table 14-26.