The defjob utility imports job processing definitions directly into the Control-M/EM database. To import the job using the defjob utility, see Importing jobs into existing folders using the defjob utility.
The utility reads job processing definitions from a plain text input file written in XML format, see defjob XML file rules.
The defjob utility validates the XML rules folder according to the validation process in Control-M/EM version 9.0.19 and above. By adding the switch -vv 2, the utility validates the jobs/folders, which is similar to job/folder validations in Control-M client/Control-M Web. It also validates site standards (includes warnings based on strictness levels), improved error messages descriptions, and updated field names.
NOTE: By default, the utility validates the XML file in accordance with the EmdefValidationVersion system parameter in the CCM (Validation version 2). You can change the value in the CCM without the need to add the switch to the command, which may be preferable if you have many scripts that use a particular validation version.
For an example of the validation processes see emdef validation service error message example.
Each job processing definition in the Control-M/EM database has a JOBISN field that contains a job ID number. JOBISN is the JOB_ID field in the def_job folder. Many jobs can have the same JOBISN number. However, the JOBISN number is unique in each Folder. Use Control-M client Monitoring Domain to determine the job ID. Select the job in the Monitoring domain to see jobs IDs.
If a job that is being imported contains a JOBISN number that already exists in the Control-M/EM database, defjob overwrites the existing job processing definition with the new job processing definition. If a JOBISN value is not specified, defjob imports the job processing definition into the database as a new job.
Parent Topic |