Job Management Partner 1/Software Distribution Administrator's Guide Volume 2
(1) Function
This command creates and executes the following types of jobs that are related to remote collection:
- Collect files from client
- Collect files from client to relay system (JP1/Software Distribution Manager only).
- Acquire collected files from relay system (JP1/Software Distribution Manager only).
- Delete collected files from relay system (JP1/Software Distribution Manager only).
It also restores collected archive files.
JP1/Software Distribution Client (relay system) can only create and execute remote collection jobs, and restore archived files.
JP1/Software Distribution Client (relay system) can execute jobs only up to one level below it.
(2) Format
dcmcoll.exe [processing-key] [/G] [/Z] [/s]
/i parameter-file1 [parameter-file2]
/o result-output-file-name
[/LC {ON|OFF}]
(3) Arguments
- processing-key
This key specifies the type of job to be executed. Specify one of the following five processing keys after the command name; the default is NETM_COLLECT:
- NETM_COLLECT
This processing key executes a Collect files from client job. Specify the destination, the files to be collected, and the directory for the collected files in a parameter file or with command arguments.
This argument can be specified in both JP1/Software Distribution Manager and JP1/Software Distribution Client (relay system).
- NETM_COLTOS
This processing key executes a Collect files from client to relay system job. Specify the destination, the files to be collected, and the directory for the collected files in a parameter file or with command arguments.
This argument can be specified only in JP1/Software Distribution Manager; when specified in JP1/Software Distribution Client (relay system), it may cause an error.
- NETM_COLTOM
This processing key executes a Delete collected files from relay system job. Specify the destination (relay system) in a parameter file or with command arguments.
This argument can be specified only in JP1/Software Distribution Manager; when specified in JP1/Software Distribution Client (relay system), it may cause an error.
- NETM_COLRESET
This processing key executes a Delete collected files from relay system job. Specify the destination (relay system) in a parameter file or with command arguments.
This argument can be specified only in JP1/Software Distribution Manager; when specified in JP1/Software Distribution Client (relay system), it may cause an error.
- NETM_UNARC
This processing key restores collected archive files (files with a dmz extension). Specify the names of the files to be restored, the target directory, and the source directory in a parameter file or with command arguments.
This argument can be specified in both JP1/Software Distribution Manager and JP1/Software Distribution SubManager.
- /G
If the processing key is NETM_UNARC, this argument directly stores the restored file in the directory specified as the restoration destination. If the processing key is not NETM_UNARC, this argument, if specified, is ignored.
When /G is not specified, a directory with the same name as the destination host name is automatically created under the directory specified as the storage destination for restored files.
Do not specify this argument if the destinations must be distinguished.
- /Z
If the processing key is NETM_UNARC, this argument deletes the archive file at the same time as restoring the file, without deleting the directory in which the archive file is stored.
If the processing key is not NETM_UNARC, this argument, if specified, is ignored.
- /s
This argument creates and saves a job without executing it. If the processing key is NETM_UNARC, this argument, if specified, is ignored.
When this argument is specified, the output file produced by the execution of the command does not contain a job number.
- /i
Specify one or two full paths for the parameter file to be used. The two paths must be separated with a space. Specifying three or more paths causes the command to fail.
If two parameter files are specified, JP1/Software Distribution interprets by concatenating their contents. By specifying information about destinations and information about collection and restoration in separate parameter files, you can conveniently modify one of the files to re-execute the job.
Note that because any unneeded parameters are ignored, you can share the parameter file for collecting and restoring files. Specifying the same parameter in both files can cause an error.
- /o
Specify the full path for the output file.
If the processing key is NETM_UNARC, this argument is ignored. In other cases, this argument is required.
The following items are output to a specified output file upon normal completion of the command, overwriting any previously existing output file.
- Job name
- Job number
- Job storage folder path
The job number (value of jobno) identifies the job that has been started. When deleting this job or verifying its execution status, you should code the value of jobno in the parameter file. Note that specifying the value /s in a command argument suppresses the output of job numbers.
An output file for which /s is specified can be used directly as a parameter file for the dcmjexe command. If /s is not used, the output file can be used as a parameter file for the dcmjbrm, dcmrtry, dcmstat, and dcmstsw commands.
- /LC
Specify ON or OFF to indicate whether the command's processing is to continue after logging off from Windows when Task Scheduler or JP1/AJS is used to execute commands in the background.
- ON
Continues command processing even after logging off from Windows.
- OFF
Forcibly terminates command processing once Windows is logged off.
This argument is effective when the command is executed from a service under any of the following OSs:
- Windows NT 4.0
- Windows 2000
- Windows XP
- Windows Server 2003 (excluding Windows Server 2003 (IPF))
Do not specify /LC ON when you execute the command from the command prompt, because in this case the command is executed as a foreground program.
You can use a registry setting to specify whether command processing is to continue after Windows is logged off. For details about the registry setting, see the following sections:
- Executing the command in JP1/Software Distribution Manager
4.6 Registry settings (JP1/Software Distribution Manager) in the manual Setup Guide
- Executing the command in JP1/Software Distribution Client (relay system)
5.4 Registry settings (JP1/Software Distribution Client (relay system)) in the manual Setup Guide
Note that operation may differ depending on the combination of the /LC specification and the registry setting. For details, see 4.28 Command operation at logoff that depends on a registry setting and logoff option.
(4) Parameters in a parameter file and corresponding command arguments
You can also use command arguments to specify the contents of the parameter file used in this command. The table below shows the correspondence between the contents of a parameter file and the command arguments.
Table 4-7 Correspondence between parameter file contents and arguments (dcmcoll command)
Parameter file specification contents |
Description |
Specification |
Command argument |
Tag |
Parameter |
JOB_DESTINATION |
directory_com |
Directory information (computer hierarchy) |
R#1, #2 |
/dc value |
directory_group |
Directory information (group hierarchy) |
R#1, #2 |
/dg value |
directory_ou |
Directory information (organizational unit (OU) hierarchy) |
R#1, #2 |
/do value |
group |
Host group name |
R#1, #2 |
/g value |
host_name |
Host name |
R#1, #2 |
/h value |
lower_clients |
Whether any destination is specified |
X |
-- |
JOB_DESTINATION_ID |
destination_id |
ID name |
R#1 |
/X value |
FILE_COLLECTION |
source_path |
Collection-file name |
R#3 |
/y value |
dmz_path |
Storage folder for collected files (for collection) or source file/folder (for restoration) |
R#4 |
/z value |
unarc_path |
Destination folder for restored files |
R#5 |
/r value |
JOB_ATTRIBUTE |
job_generator |
Job name |
O#6 |
/j value |
jobno |
Job number |
X |
-- |
job_folder |
Job folder path |
O |
/l value |
unsuspended |
Whether there is a suspended distribution |
X |
-- |
JOB_SCHEDULE |
job_entry_date |
Job entry date |
O#7 |
/jst value |
job_execution_date |
Job execution date |
O#7 |
/jsx value |
job_expiration_date |
Job expiration date |
O#7 |
/jsp value |
SCHEDULE |
expiration_date |
Package expiration date in the relay system |
X |
-- |
expiration_days |
Package retention days in the relay system |
X |
-- |
installation_date_and_time |
Installation date and time |
X |
-- |
installation_timing |
Installation (collection) timing |
O |
/tS or /tN |
OPTION |
compress |
Compression, yes/no |
O |
/uY or /uN |
compress_type |
Compression method |
X |
-- |
restore |
Restore operations during version upgrades |
X |
-- |
encipher |
Encryption yes/no |
X |
-- |
reboot |
Reboot after installation |
X |
-- |
processing_dialog |
Display the processing dialog during installation |
X |
-- |
USER_PROGRAM_INSTALLATION_CONDITIONS |
external_program_executed_before_installation |
External program that is started before installation (collection) |
O |
/b value |
external_program_executed_after_installation |
External program that is started after installation (collection) |
O |
/a value |
external_program_error_handler |
External program that is started upon error during installation (collection) |
O#8 |
/e value |
external_program_handler |
External program handler |
X |
-- |
exit |
Results-notification method for external program processing |
X |
-- |
action |
Disposition of processing error |
X |
-- |
wait |
Monitoring method |
X |
-- |
timeout |
Monitoring time |
X |
-- |
wait_code |
Wait code |
X |
-- |
- Legend:
- R: required.
- O: optional.
- X: not required (ignored if specified).
- --: Cannot be specified in a command argument.
- #1
- JOB_DESTINATION and JOB_DESTINATION_ID are mutually exclusive. One of the parameters /g, /h, /dc, /dg, and /do which cannot be specified together with /X, must be specified.
- If the processing key is either NETM_COLTOM or NETM_COLRESET, the only ID that can be specified as a destination is an ID registered as an ID management. The processing key NETM_UNARC, if specified, is ignored.
- #2
- You cannot specify group or host_name (/g or /h) together with directory_com, directory_group, or directory_ou (/dc, /dg, or /do). However, you can specify group and host_name (/g and /h) together. You can also specify any combination of directory_com, directory_group, and directory_ou (/dc, /dg, and /do).
- #3
- Required if the processing key is NETM_COLLECT or NETM_COLTOS.
- #4
- Required if the processing key is NETM_COLLECT, NETM_COLTOS, or NETM_UNARC.
- #5
- Required if the processing key is NETM_UNARC.
- #6
- If you omit job_generator or /j, processing-key+job-execution-date-and-time is automatically set as the job name. If you execute multiple commands with the same processing key, job names may be duplicated and jobs may not be executed correctly. If you execute multiple commands with the same processing key, Hitachi recommends that you specify different job names using job_generator or /j.
- #7
- Ignored if the processing key is NETM_UNARC.
- #8
- Not specifiable for collecting files from a UNIX client.
(5) Format of the command without using a 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:
- Collecting files from a client
dcmcoll.exe {[NETM_COLLECT] | NETM_COLTOS} [/s]
{[/g host-group] [/h host-name] | [/dc computer-hierarchy][/dg group-hierarchy]
[/do OU-hierarchy] | /X ID-name}
/y collection-file-name /z storage-folder-for-collected-files
[/j job-name] [/l job-folder-path]
[/jst job-registration-date] [/jsx job-execution-date]
[/jsp job-execution-limit]
[{/tS|/tN}] [ {/uY|/uN}]
[/b external-program-that-is-started-before-collection]
[/a external-program-that-is-started-after-collection]
[/e external-program-that-is-started-upon-error-during-collection]
[/o result-output-file-name]
[/LC {ON|OFF}]
- Collecting files from a relay server or deleting collected files from a relay system
dcmcoll.exe {NETM_COLTOM | NETM_COLRESET} [/s]
{[/g host-group] | [/h host-name} | /X ID-name}
[/j job-name] [/l job-folder-path]
[/jst job-registration-date] [/jsx job-execution-date]
[/jsp job-execution-limit]
[/o result-output-file-name]
[/LC {ON|OFF}]
- Restoring files
dcmcoll.exe NETM_UNARC [/G] [/Z]
/z source-file-or-folder-for-restoration
/r destination-folder-for-restored-files
[/LC {ON|OFF}]
(6) Return codes
The following explains the return codes that the dcmcoll command may return:
Code |
Meaning |
Action |
0 |
Managing server started job, or the archive files were successfully restored. |
None. |
1 |
Unable to open parameter file. Invalid file format. |
Check the parameter file specification or coding format. |
2 |
Invalid value in command argument or parameter file. |
Check the settings for the command argument or parameter file. |
3 |
Error during connection to managing server. |
Check the version of the managing server. |
4 |
Unable to open output file. |
Check the specification for the output file. |
5 |
Communication failure between client and managing server. |
Check the communications settings in the setup for the managing server. |
7 |
Restoration of one or more archive files failed. |
Check the archive file path.
Full path of the restored file (storage directory for restored file + created directory (archive file storage directory) + file name or directory name for the restored file) might exceed 259 single-byte characters. |
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.
- Number of destinations and collection files specified
- For each execution of the dcmcoll command, you can specify in the parameter file a maximum of 200 destinations (hosts, host groups, ID groups) or directory information items (OU hierarchies, group hierarchies, computer hierarchies). In addition, you can specify up to 100 collected files or associated directories for an increment of 200 destinations.
- When specifying destinations and collection files by means of command arguments, you can specify only one destination and one file.
- Multiple destinations and collection files specified in a parameter file are all ignored if the same items are specified using a command argument.
- Destination path
You can specify a destination path. If the same destination is specified in terms of multiple paths, only the first definition takes effect.
- Jobs with a relay system destination
Acquire collected files from relay system and Delete collected files from relay system jobs require the specification of a relay system as a destination. If you specify a client for the destination of this job, an error occurs or the system remains in execution underway status.
- Collection target and restoration destination directories
- When a file is to be collected, a directory with the same name as the destination host name is automatically created under the directory specified as a source directory. The file is archived when it is collected and stored under the directory with the host name as an archive file, with a .dmz extension.
- When an archived file is to be restored, as with file collection, a directory with the same name as the destination host name is automatically created under the directory specified as a source directory. When multiple archive files are to be restored in a single operation, and if files of the same name are contained in separate archive files, the files are overwritten. Therefore, when restoring multiple archive files containing identically named files, you should execute the dcmcoll command specifying separate source directories.
- If the /G option is specified in a command argument during the restoration process, the file is directly expanded under the directory specified as a source directory. If you restore files collected from multiple destinations at the same time, all files are overwritten and it becomes impossible to differentiate the files by destination. To restore only one archive file, use /G.
- If the /G option is not specified in a command argument during the restoration process, a directory with the same name as the destination host name is automatically created under the directory specified as the storage destination for restored files. However, if the directory containing the files to be restored is specified in /z or the dmz_path parameter of the FILE_COLLECTION tag, a directory is not created, and the file is expanded directly.
If you need to distinguish the restored files by destination, in /z or the dmz_path parameter of the FILE_COLLECTION tag, specify the same directory that you specified during file collection.
- Specifying the job storage folder path
If you execute the command with specification of a job storage folder path for a folder that has not been defined in the Job Definition window, the specified folder is created. The job storage folder that is created is not deleted and remains after the command has executed. If you do not plan to use this folder, you should delete it after the job is completed.
- If you do not use the parameter file:
- If the collection destination is WS (in a UNIX system), specify any drive for the drive that contains the collection destination directory. During collection, the specified drive will be ignored, and the files will be collected according to the directory specification. In the following example, c: will be ignored:
c:/user/tmp
- Specifying an external program
- If the collection destination is WS (in a UNIX system) and you specify an external program, use the parameter file to execute the command.
- Executing a remote collection job or restoring archived files
See 5.1.4 Notes on execution of remote collection in the manual Administrator's Guide Volume 1.
(8) Examples
The following is an example of collecting files from the directories SDerror.dir, SDerror2.dir, and SDerror3.dir under C:\temp from hosts dmp491 and dmp492, on which JP1/Software Distribution Client (client) is running. The command is specified so that it starts the collection process when the client is started, and starts external programs before collection, after collection, and in the event of an error.
(a) Creating a parameter file
Code the attributes of the host and the collection file as follows, and save the parameter file under any name.
** dcmcoll Parameter File Sample
JOB_DESTINATION{
host_name=dmp492
host_name=dmp491
group = \grp\gname1
group = \grp\gname2;\grp\gname3
}
SCHEDULE{
installation_timing = S
}
OPTION{
compress=Y
}
USER_PROGRAM_INSTALLATION_CONDITIONS{
external_program_executed_before_installation = "C:\test B.exe"
external_program_executed_after_installation = C:\testA.exe -x "a aa"
external_program_error_handler = "C:\test E.exe"
}
FILE_COLLECTION{
source_path= C:\tmp\SDerror.dir
source_path= C:\tmp\SDerror2.dir;C:\tmp\SDerror3.dir
dmz_path= C:\temp\collect
}
(b) Command execution
When saving the parameter file in a file named C:\Dmbat\dcmcoll.txt and creating an output file in C:\Dmbat\out.txt, specify the command as follows:
dcmcoll /i C:\Dmbat\dcmcoll.txt /o C:\Dmbat\out.txt /j temp collection
(c) Checking the output file
Upon normal completion of the command, the job name, job number, and the path for the job storage folder are output to the C:\Dmbat\out.txt file as follows:
JOB_ATTRIBUTE{
job_generator= NETM_COLLECT_03_12_11_13_34_36
jobno= JB03121113315383
job_folder= \
}
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.