Job Management Partner 1/Software Distribution Administrator's Guide Volume 2

[Contents][Glossary][Index][Back][Next]

4.12 dcmjexe.exe (executing a job)

This section explains the dcmjexe command, which executes a job. You can execute this command in the managing server system for JP1/Software Distribution Manager or JP1/Software Distribution Client (relay system).

Organization of this section
(1) Function
(2) Format
(3) Arguments
(4) Parameters in a parameter file and corresponding command arguments
(5) Command format for specifying the contents of a parameter file in terms of arguments
(6) Return codes
(7) Example

(1) Function

This command executes the job defined in a parameter file. Only one job per JOB_ATTRIBUTE tag can be executed.

(2) Format

dcmjexe.exe /i parameter-file-name /o result-output-file-name [/LC {ON|OFF}]

(3) Arguments

(4) Parameters in a parameter file and corresponding command arguments

Although the dcmjexe command requires a parameter file, you can also use command arguments to specify some of the parameter file contents used in this command. The table below shows the correspondence between the contents of a parameter file and the command arguments.

Table 4-13 Correspondence between parameter file contents and arguments (dcmjexe command)

Parameter file specification contents Description Specification Command argument
Tag Parameter
JOB_ATTRIBUTE job_generator Job name R --
jobno Job number X --
job_folder Job folder path O# --
unsuspended Whether a distribution being suspended exists X --
JOB_SCHEDULE job_entry_date Job registration date and time O /jst value
job_execution_date Job execution date and time O /jsx value
job_expiration_date Job execution limit O /jsp value

Legend:
R: required.
O: optional.
X: not required (ignored if specified).
--: Cannot be specified in a command argument.

#
By default, the dcmjexe command executes a job by searching all the folders or files that lie below the root folder.

(5) Command format for specifying the contents of a parameter file in terms of arguments

To specify the job registration date and time, job execution date and time, and job execution time limit by using the command arguments, code the command in the following format:

dcmjexe.exe /i parameter-file-name /o result-output-file-name
            [/jst job-registration-date-and-time][/jsx job-execution-date-and-time]
            [/jsp job-execution-time-limit] [/LC {ON|OFF}]

(6) Return codes

The following explains the return codes that the dcmjexe command may return:

Code Meaning Action
0 Managing server has started job. 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 values in the 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.
  • A job may have been started. Check the job status.
5 Communication failure between client and managing server system. Check the communications settings in the setup for the managing server.
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.

(7) Example

The following is an example of executing an invoice-file-0001-collection job saved in the batch-definition of the managing server system folder.

(a) Creating a parameter file

Code the folder in which the job to be executed is saved, and the job name, in the parameter file as follows, and save the parameter file under any name:

** dcmjexe Parameter File Sample
 
JOB_ATTRIBUTE{
job_generator= invoice-file-0001-collection
job_folder= \batch-definition
}
(b) Command execution

When saving the parameter file in a file named C:\Dmbat\dcmjexe.txt and acquiring an output file in C:\Dmbat\out.txt, code the following specification:

dcmjexe.exe /i C:\Dmbat\dcmjexe.txt /o C:\Dmbat\out.txt
(c) Checking the output file

Upon normal completion of the command, the job name of the job that was started, the job number, and the job storage folder path are output to the C:\Dmbat\out.txt file as follows:

JOB_ATTRIBUTE{
job_generator= invoice-file-0001-collection
jobno= JB03121113315383
job_folder= \batch-definition
}