Need help with Windows .bat

All questions about Control-M jobs definitions
Post Reply
User avatar
kotaikote
Nouveau
Nouveau
Posts: 13
Joined: 11 Feb 2008 12:00

Need help with Windows .bat

Post by kotaikote » 15 May 2008 11:12

I need to run a batch file in windows to FTP data. The problem is when I schedule it, the job will only ended ok after 1 hour +. The sysout of the job showed that the ftp is completed, but the job status in Control-m still executing. I'm new with this. Please help.

My Ftp.bat contains;

c:
cd \ICCSData\PDDATA
inward.exe
copy 5014*.INW DPS.DAT

ftp -s:C:\ICCS\FTP\scriptftptobh.ftp 10.200.212.20

del DPS.DAT
del inward.exe
del 5014*.INW

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 15 May 2008 4:39

Which Control-m Server and Agent version?

User avatar
kotaikote
Nouveau
Nouveau
Posts: 13
Joined: 11 Feb 2008 12:00

Post by kotaikote » 15 May 2008 6:31

Control-m server and Agent 6.2.01

I really need help in this. I've read some topic in the forum but it doesnt give much help. Really don't know how to utilize the _exit code...... can u help?

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 15 May 2008 10:21

It seems quite the same things that the following link, you must verify fixpack level.

So about _exit code, here is BMC documentation
_exit
This utility is similar to the UNIX exit built-in shell function.
The utility is located in the <CONTRL>\EXE directory path that was
created during the installation procedure.
Format
The variable <exit> is any whole number Š 0 Default: 0
The program exits with %errorlevel% = <exit>
Examples
_exit 0 in a script causes the job to end with %errorlevel% 0.
_exit 1 in a script causes the job to end with %errorlevel% 1.
_exit [<exit>]
ctmcreate -tasktype command -cmdline "_exit 0"
ctmcreate -tasktype command -cmdline "_exit 1"

User avatar
kotaikote
Nouveau
Nouveau
Posts: 13
Joined: 11 Feb 2008 12:00

Post by kotaikote » 16 May 2008 3:34

I try to follow the documentation, but I'm really lost on how to implement the _exit function. I've installed the Fix Pack 3 Patch 05. I'm really new with this Control-M.

Post Reply