Replace email address in Steps tab of multiple jobs

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
AmitSh
Nouveau
Nouveau
Posts: 1
Joined: 13 Jul 2010 12:00

Replace email address in Steps tab of multiple jobs

Post by AmitSh » 13 Jul 2010 8:53

Hello,

I need to replace old domain email address which is currently added in the steps tab of multiple jobs with the new domain ex from 1234@abc to new 1234@xyz, so first need to check all jobs which have that old domain email and then second step would be to replace it,would some one be able to assist me how to proceed on this?

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 14 Jul 2010 12:24

Hi,

Suggestion is to use <exportdeftable> or <exportdefjob>
This utilities first export the data from CONTROL-M/Enterprise Manager database to a flat file (xml format)
Then make the required changes from outside of CONTROL-M in in the flat file (by owner script or using text editor like UltraEdit)
The next step is to import the flat file back into the CONTROL-M/Enterprise Manager database using the <deftable> or <defjob> utility.
More information on these utilities is available in the CONTROL-M/EM Utility Guide.

Or use the <ctmexdef> utility
The ctmexdef utility exports job processing definitions from the CONTROL-M/Server database to a flat (ASCII) file.
Then make the required changes in this file.
This file can then be used as input for either the <ctmcreate> utility or the <ctmdefine> utility.
More information on this utility is available in the CONTROL-M/Server Admin Guide.
Best regards
Walty

User avatar
dineshb
Nouveau
Nouveau
Posts: 9
Joined: 22 May 2009 12:00

Update of Existing job

Post by dineshb » 21 Oct 2010 11:46

Hi

you are talking about updating an existing job using ctmdefine
but as per documentation it says -

If the job name specified when using this utility already exists in a
job processing definition in the Scheduling table, the new job
processing definition does not overwrite the existing one. Both job
processing definitions will appear in the table, each with a different
internal job number.

so basically it is creating one more job, i personally didn't try it so not sure if it will update the existing job or create a new job

i also need to know a way to update the existing job, i need to update the time of a job and wants to use the command instead of gui

-Thanks
rel

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 22 Oct 2010 11:35

Hi dineshb,

In order to make such changes to your Job Definitions the best way is to use the Control-M/EM utilities:

1) Export the Job/Tables Definitions (exportdeftable / exportdefjob),
2) Make the modification from outside of CONTROL-M (ie: ultraedit)
3) Import the changed Job Definitions back in (deftable / defjob)

Note:
Regarding your comment on ctmdefine, that is relevant but does not apply to our working method because the table is automatically deleted and recreated.
Best regards
Walty

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 22 Oct 2010 4:26

Hi,
Why don't you simply use the find/update desktop utility ?
You can use the replace substring option
ex:
launch all the concerned jobs by it's DRAFT in Desktop
launch find/update
in find enter:
find "statement type" like *@test.com
replace "statement type" replace substring @test.com @external.test.com



Regards
Philmalmaison

User avatar
dineshb
Nouveau
Nouveau
Posts: 9
Joined: 22 May 2009 12:00

Post by dineshb » 24 Oct 2010 2:22

Thanks Walty & philmalmaison

@Walty - I didn't try exportdefjob/defjob. I assume defjob will overwrite the existing detail with the new detail. Let me try it.

@philmalmaison - Usually we run ctmexdef to take the back of table and then manually makes the changes via desktop.
we want to avoid manual steps and use some scripts as scripts can be tested in testing environment before changes are made in production environment

Post Reply