Page 1 of 1

Help on ctmcreate

Posted: 15 Oct 2009 12:05
by Bobby005
I am trying to build a script which utilizes ctmcreate with error catching. As an example,

ctmcreate adasdasdas
RC=${?}
if [ ${RC} -ne 0 ] ; then
echo "FAILED"
else
echo "SUCCESS"
fi
exit ${RC}

This should output FAILED and exit with a number other than 0 as the ctmcreate statement is wrong but it always would output SUCCESS and 0.. Please help.

Please tell me how I could catch all possible errors with the ctmcreate statement and exit with a number other than 0 if wrong..

Thanks.



Even this fails..


[xxxxx@ethp1234:/home/xxxxx]
$ ctmcreate asdadad
Invalid parameter:
usage: ctmcreate
….
..


[xxxxx@ethp1234:/home/xxxxx]
$ echo $?
0

Posted: 15 Oct 2009 12:58
by ranger67
Bobby, which version of the agent and server are you running? I am running a 6.3 and 6.4 server with 6.3 agents. A ctmcreate issued at either the agent or server side does issue an RC of 1 upon on unsuccessful run.

I would verify that your server and agents are fully patched. If that is the case, I would open a case with BMC.

Posted: 18 Oct 2009 2:46
by Bobby005
Hi,

I am using 6.1.0.3. If this version of Ctrlm does not issue return codes, what can I do to catch the erros of ctmcreate within the script?

Posted: 19 Oct 2009 9:11
by Walty
Hi,

A ctmcreate (with no parameters) executed from the agent or the server return an RC=1 upon on unsuccessful run.

Version tested:

V6.1.03.xxx

Control-M/Server Solaris 6.1.03.400 rc=1
Control-M/Agent Solaris 6.1.03.301 rc=1
Control-M/Agent AIX 6.1.03.300 rc=1

V6.3.01.xxx

Control-M/Server Solaris 6.3.01.500 rc=1
Control-M/Server AIX 6.3.01.401 rc=1

Control-M/Agent Solaris 6.3.01.400 rc=1
Control-M/Agent AIX 6.3.01.400 rc=1

Posted: 23 Sep 2012 8:07
by Allison
It could be the number of batch slots (or no. of concurrent jobs you can run at one time), or the number of (. ..... In which all way Control M is better than other tools? ...... just modified the batch file to just do one thing:<br> <br> exit 0<br