Rerun a job from Unix script

Several scripts
Post Reply
User avatar
bicycleor
Nouveau
Nouveau
Posts: 4
Joined: 05 Dec 2006 12:00

Rerun a job from Unix script

Post by bicycleor » 15 Dec 2008 11:37

I need to constantly nag a different team to rerun a failure job.

So I am thinking creating a shell script that can run by us and do the job.

Can I do this in a Unix script? Which Utility should I use? When I call the command, are there special environmental variable that I have to set first?

Appreciated for any help.

User avatar
bicycleor
Nouveau
Nouveau
Posts: 4
Joined: 05 Dec 2006 12:00

Post by bicycleor » 16 Dec 2008 12:27

I found the utility that can do the job, it's

ctmpsm -UPDATEAJF $orderid RERUN

Do you guys know what environmental variables I should care about?

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

Post by Walty » 16 Dec 2008 7:51

Hi,

see the CONTROL-M/Server for Unix Administrator Guide.
You find all informations in : Utilities\Define Variable in the User's Environment if you execute this utility by user other that 'controlm'.
Best regards
Walty

User avatar
bicycleor
Nouveau
Nouveau
Posts: 4
Joined: 05 Dec 2006 12:00

Post by bicycleor » 17 Dec 2008 4:56

Thanks for the reply.

I did have a read and paste here the variables that are required for easy reference:

CONTROLM_SERVER
CONTROLM_USER
CONTROLM_DATABASE
CONTROLM_MIRROR_USER
CONTROLM_MIRROR_DATABASE
CTM_DATABASE_TYPE
MIRROR_DB_SERVER
machine=Solaris
LIBPATH, or LD_LIBRARY_PATH, or SHLIB_PATH

Sybase: LD_LIBRARY_PATH ~<controlm_owner>/ctm_server/exe_Solaris:~<controlm_owner>/sybase/OCS-12_5/lib
Oracle: LD_LIBRARY_PATH ~<controlm_owner>/oracle/product/<DB_ver>/lib:~<controlm_owner>/ctm_server/exe_Solaris

set path=($path ${ORACLE_HOME}/bin ~<controlm_owner>/ctm_server/exe_<OS_ID>)

~<controlm_owner> : The default full path name of the UNIX user account home directory under which CONTROL-M/Server is installed.
<DB_ver> : Version of the Oracle database. Valid value: Oracle 10.1.0.2

The executable directory of CONTROL-M/Server must be added to the path of the
user. This path must include: ~<controlm_owner>/ctm_server/scripts

-- For Oracle
ORACLE_BASE
ORACLE_HOME
ORACLE_SID
NLS_LANG

-- For Sybase
SYBASE
DSLISTEN
DSQUERY
DSCONSOLE
MIRROR_DSLISTEN
MIRROR_DSQUERY
SYBASE_OCS, with the value OCS-12_5

The user must have the following read/write permissions:
Read permission for file : <controlm>/.controlm
Read and Write permission for all files in directory : <controlm_owner>/ctm_server/prflag
If mirroring is enabled, Read permission for file : <controlm>/.controlm_mirror

You must provide security access to these files as follows:
- Give group controlm read permission for the files.
- All users who require access to CONTROL-M utilities should belong to group controlm.

csh/tcsh example:
setenv CONTROLM_SERVER /home/ora_ctm/ctm_server
setenv ORACLE_HOME /home/ora_ctm/oracle/product/10.1.0.2
setenv ORACLE_SID ctrlm
setenv ORACLE_BASE /home/ora_ctm/oracle
setenv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1
setenv CONTROLM_USER ctrlm
setenv CONTROLM_DATABASE ctrlm
setenv MIRROR_DB_SERVER ctrlm_mirror
setenv CTM_DATABASE_TYPE ORACLE
setenv LD_LIBRARY_PATH /home/ora_ctm/ctm_server/exe_SuSE:
/home/ora_ctm/oracle/product/10.1.0.2/lib

Post Reply