AFT 7 Return codes?

Everything about Control-M Control Modules
Post Reply
User avatar
bsglover
Nouveau
Nouveau
Posts: 14
Joined: 01 Dec 2011 12:00

AFT 7 Return codes?

Post by bsglover » 18 Jan 2012 4:19

Has Anybody know the kind of return codes i can receive when the AFT goes KO?
I just tried a regular copy of a file which was not existent, and i receive COMPSTAT=0

------------------------
the sysout produced:
------------------------
"+ Job started at '0117 15:46:52:941' orderno - '0j87a' runno - '00003'
Number of transfers - 1
+ Host1 'Local'[Windows-LOCAL] username 'USER' - Host2 'ftp.pow.com'[Windows-FTP] username 'USER'
Local host is: FTP_SERVER - Windows 2003 Service Pack 2 build 3790 - x86 Family 15 Model 4 Stepping 1, GenuineIntel
+ ********** Starting transfer #1 out of 1 ***************
Connection to FTP server on host ftp.pow.com was established
No matching files for pattern 'FRO*.zip'
Transfer #1 completed successfully

Job executed successfully. exiting.

Job ended at '0117 15:46:53:394'
Elapsed time [1sec] CPU usage [0.1sec][/b]"

-----
Log:
-----
"ENDED AT 20120117154654. OSCOMPSTAT 0. RUNCNT 3"

There is something i can do to obtain a Return code? or i just need to work on the steps looking for every kind of possibly msgs printed into the sysout?

Thanks in advance.
Last edited by bsglover on 22 Jan 2012 2:09, edited 1 time in total.

User avatar
gglau
Nouveau
Nouveau
Posts: 317
Joined: 13 Jun 2007 12:00

Post by gglau » 19 Jan 2012 1:27

No matching files for pattern 'FRO*.zip'
Transfer #1 completed successfully

Job executed successfully. exiting.
It isn't AFT job not providing proper return code, but that the return code for your successful job is zero. Take away * in the filename and it will fail with non-zero return code. However, if you have multiple transfers within a job, return code does not help much.

Tell BMC that we want job to fail if file not found, whether filename is a specific name or a search pattern. I have failed to convince BMC.

User avatar
bsglover
Nouveau
Nouveau
Posts: 14
Joined: 01 Dec 2011 12:00

Post by bsglover » 19 Jan 2012 9:26

Thanks for the answer, i think AFT its a great way to move files but the big problem seem to be the return code, i don't understand why they didn't think its a necessity, without it how we should control the execution?

I can't take away the * from the file name because i don't know if i will have to move 1 or more files daily, plus every file has a kind of random code that i can know before so i must use the * to get all of them.

Can anybody else give me advices to know what kind of standard msgs i should try to find into the sysout (using the steps) to force the job to finish in the way it should?

I will write to BMC for this problem to, hopefully we will have it "fixed" soon.

User avatar
sukie
Nouveau
Nouveau
Posts: 11
Joined: 15 Nov 2011 12:00

Post by sukie » 20 Jan 2012 7:49

Why don't you use ON conditions to trap the 'No matching files for pattern' message in the output and then DO NOTOK if it's present in the output.

User avatar
bsglover
Nouveau
Nouveau
Posts: 14
Joined: 01 Dec 2011 12:00

Post by bsglover » 20 Jan 2012 8:59

I know i have to intercept this test on the steps because it just happened, and it will work only for this case, but what about the other kind of error messages which can appear?
Is not good to have to wait for every run and read the sysout manually though the desktop to get to know what happened. For now i know only one case, but i don't know what msg if will receive if the destination host has no space on the file system, or the user has not the granted, or if the ftp connection went down ecc.

I cant believe this module work like this without any internal control. With no Return code is not really useful, maybe i will back to use my own scripts, they could be slower but they work like they should.

User avatar
Rashid
Nouveau
Nouveau
Posts: 56
Joined: 31 Oct 2009 12:00

hi

Post by Rashid » 22 Jan 2012 8:25

upgrade AFT to 7 version, AFTP job will be not ok if the files are not there.

User avatar
bsglover
Nouveau
Nouveau
Posts: 14
Joined: 01 Dec 2011 12:00

Post by bsglover » 22 Jan 2012 2:08

Im already using the AFT 7.

User avatar
Rashid
Nouveau
Nouveau
Posts: 56
Joined: 31 Oct 2009 12:00

AFT 7

Post by Rashid » 23 Jan 2012 7:16

It should fail with 7 return code,

In the job log, if the OSCOMPSTAT parameter is 7 it indicates that file watch failed.

i guess you are not watching the files in AFT job, only the FTP doing, right?

if so you will not capture in step tabs.

share your agent details.

let me know if you need any other info.

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

Post by Walty » 23 Jan 2012 9:08

Hi,

I tryed the AFT option : Watches the file until it reaches a certain size or passes a time limit, and then transfers the file from Host1 to Host2

Value used : Minimum detect size=0,Time Limit=2 minutes,Transfert all matching files

Files matches, Rc=0
No files matches, Rc=7
Best regards
Walty

User avatar
bsglover
Nouveau
Nouveau
Posts: 14
Joined: 01 Dec 2011 12:00

Post by bsglover » 31 Jan 2012 1:21

I solved the problem looking for this text "*No matching files for pattern*" through the steps, there are not other kind of messages i should intercept.

Now i have this problem:
a) I have a aft ftp job which will be restarted max 20 times on the KO
-1-How can i do to send an email only when the last rerun (the 20th) finish KO?

I tried with the job steps "*00020*" since i noticed Control-M doesn't allow "*runno - '00020'*" because the special chars, so with "*00020*" it doesn't send any email...there is any kind of thing i can do to obtain what im looking for?

Thanks so much.

Post Reply