14.8 dcmjexe.exe (executing a job)
This section describes the dcmjexe command, which executes a job.
Function
This command executes a job defined in the parameter file. You can specify only one job to be executed in the JOB_ATTRIBUTE tag.
Format
dcmjexe.exe /i parameter-file-name /o output-file-name
Arguments
-
/i
In the argument /i, specify the full path name of the parameter file to be used.
You can also use the output file output by the dcmcoll command (with /s specified), the dcminst command (with /s specified), or the dcmsusp command (with /s specified) as the parameter file.
-
/o
In the argument /o, specify the full path name of the output file. When this command ends normally, the items listed below are output to the specified output file. Any data already contained in the output file is overwritten.
-
Job name
-
Job number
-
Path name of job storage folder
The job number (jobno value) identifies the job that is started. When you need to delete the job or check the job status, write the jobno value to the parameter file. The output file can be used as a parameter file for the dcmjbrm, dcmrtry, dcmstat, and dcmstsw commands.
-
Correspondence between the specification contents of parameter file and command arguments
This command always requires a parameter file. Some contents of the parameter file, however, can also be specified in command arguments. The following table shows the specification contents of the parameter file and the command arguments corresponding to them.
Specification content of parameter file |
Content |
Whether to specify |
Command argument |
|
---|---|---|---|---|
Tag |
Parameter |
|||
job_generator |
Job name |
Y |
-- |
|
jobno |
Job number |
N |
-- |
|
job_folder |
Path name of job storage folder |
Y/N# |
-- |
|
unsuspended |
Whether to distribute during suspension |
N |
-- |
|
job_entry_date |
Job registration date and time |
Y/N |
/jst value |
|
job_execution_date |
Job execution date and time |
Y/N |
/jsx value |
|
job_expiration_date |
Job expiration date |
Y/N |
/jsp value |
Command format to be used when the contents of the parameter file are specified in command arguments
The following shows the command format to be used when you specify the job registration date and time, job execution date and time in command arguments.
dcmjexe.exe /i parameter-file-name /o output-file-name [/jst job-registration-date-and-time] [/jsx job-execution-date-and-time] [/jsp job-expiration-date]
Return codes
The following table lists the return codes that are output when the dcmjexe command is executed:
Code |
Meaning |
Action to be taken |
---|---|---|
0 |
The managing server started the job. |
None |
1 |
The parameter file cannot be opened, or the file format is incorrect. |
Check the specification of the parameter file or its description format. |
2 |
An invalid value was specified in the parameter file. |
Check the values specified in the parameter file. |
3 |
Connection to the database failed. |
Check database settings in the setup of the managing server. |
4 |
The output file cannot be opened. |
|
5 |
Connection to the JP1/IT Desktop Management 2 service failed. |
Check whether the service of JP1/IT Desktop Management 2 - Manager has started. |
12 |
Restoration of one or more archive files failed. |
Reference the event log. |
Example
The following example shows use of this command to execute the Collect-slip-file-0001 job stored in the batch-definition folder in the managing server.
- Creating the parameter file
-
Specify the folder storing the job to be executed and the name of the job as shown below, and then save the parameter file under any name.
** dcmjexe Parameter File Sample JOB_ATTRIBUTE{ job_generator= Collect-slip-file-0001 job_folder= \batch-definition }
- Executing the command
-
To store the created parameter file as C:\Dmbat\dcmjexe.txt and acquire the output file as C:\Dmbat\out.txt, specify the command as follows:
dcmjexe.exe /i C:\Dmbat\dcmjexe.txt /o C:\Dmbat\out.txt
- Contents of the output file
-
When the command ends normally, the job name and job number of the executed job and the path name of job storage folder (storing the executed job) are output to the file C:\Dmbat\out.txt as follows:
JOB_ATTRIBUTE{ job_generator= Collect-slip-file-0001 jobno= JB03121113315383 job_folder= \batch-definition }