Launch job that is not shell script

Everything about Control-M agents installation or setup.
Post Reply
User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Launch job that is not shell script

Post by kambiante » 11 Mar 2010 8:11

Hi I have a problem to launch controlm jobs.

I have this job with task type job:

#!/bin/env /opt/myshell.sh
echo ok

When I launch it, the controlm execute: /bin/sh -x myjob

I want that controlm execute: myjob (without /bin/sh)

Can someone help me?

hipikll

Post by hipikll » 12 Mar 2010 12:19

make it a tasktype of "command" instead of "job" and as cmdline ./myjob

User avatar
th_alejandro
Nouveau
Nouveau
Posts: 188
Joined: 26 Nov 2008 12:00
Location: Bogotá

Just write the command in the command option

Post by th_alejandro » 12 Mar 2010 12:29

Do not use a shell to run a single command. Simply, type your command in 'Command' (General tab) and Select 'Task Type' as 'Command' from selection list.

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 15 Mar 2010 5:47

If the task type is command, I can not modify my job from CONTROLM/Enterprise, this is the problem.

User avatar
th_alejandro
Nouveau
Nouveau
Posts: 188
Joined: 26 Nov 2008 12:00
Location: Bogotá

why not ?

Post by th_alejandro » 15 Mar 2010 5:54

Why you can't change this from EM GUI ?.

Check your autorizathion profile. :wink:

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 15 Mar 2010 8:58

Because CM/Enterprise can not modify a job with task type command.

User avatar
th_alejandro
Nouveau
Nouveau
Posts: 188
Joined: 26 Nov 2008 12:00
Location: Bogotá

of course you can.

Post by th_alejandro » 15 Mar 2010 9:07

Of course you can.

- Simply, hold your job.
- Doble-click to edit properties
- Click on general tab
- Check your 'Job Type' is OS.
- Type the new command in '*Command:' entry.
- Click on Save & Close button
- Free your job
- Rerun your job

This operation only work until the next new Day. To make changes for all day, you must edit ypour job using Desktop and re-save the table.

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 16 Mar 2010 9:22

Sorry, I dont want modify the task type, I want to edit jcls from CM/Enterprise interface. When we click right button over job, I can choose the option edit jcl but if the job is COMMAND the option dont work.

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 16 Mar 2010 11:07

kambiante,

Refer to "Specifying the shell type" in the "control-m administrator guide" (V6.4.xx) or "control-m agent for Unix and Microsoft Windows administrator guide", if you use V6.3.xx.
According to the information specified here, it looks like controlm expects YOU to specify either /bin/sh, ksh, csh or tcsh.
This is not what you specify in your example, so ctm should apply a default of /bin/sh ( I could not identify where from).

If you read a bit further, the table "Shell parameters" tells that you can adjust the behaviour of the shell. The "n" option seem to address
your request. Please note the restriction attached to this parm.

Tell us the results

Nicolas Mulot

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 17 Mar 2010 6:47

Hi,

I dont understand you. I read the tab "Shell parameters" and the option "n" doesnt work.

Do you know other options?

Thanks.

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 18 Mar 2010 9:26

kambiante,

I have no opportunity to test your case.
Did you set the "Bourne Shell Flags" to "n" using the ctmagcfg utility ?

If so, I cannot help you any further and, as mentionned previously, it seems that controlm does not siupport other shels than the 4 listed in the agent admin guide

Cheers
Nicolas Mulot

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 26 Mar 2010 5:35

Hi,

Could I modify some binary file to change the "/bin/sh -x" for my /opt/myshell.sh ?

Thanks.

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 26 Mar 2010 9:56

fearless kambiante,

Pls refer to bmc for this request. Honnestly, I dont think you will get a positive answer.

Cheers
Nicolas Mulot

User avatar
kambiante
Nouveau
Nouveau
Posts: 7
Joined: 11 Mar 2010 12:00

Post by kambiante » 29 Mar 2010 1:58

Hi,

I have found a possible solution for my problem.

If I put my job as tasktype- Detached , I can edit/view my job and it runs without /bin/sh.

Thans for your help Nicolas!!

Post Reply