Page 1 of 1

AFT 7 Return codes?

Posted: 18 Jan 2012 4:19
by bsglover
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.

Posted: 19 Jan 2012 1:27
by gglau
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.

Posted: 19 Jan 2012 9:26
by bsglover
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.

Posted: 20 Jan 2012 7:49
by sukie
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.

Posted: 20 Jan 2012 8:59
by bsglover
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.

hi

Posted: 22 Jan 2012 8:25
by Rashid
upgrade AFT to 7 version, AFTP job will be not ok if the files are not there.

Posted: 22 Jan 2012 2:08
by bsglover
Im already using the AFT 7.

AFT 7

Posted: 23 Jan 2012 7:16
by Rashid
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.

Posted: 23 Jan 2012 9:08
by Walty
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

Posted: 31 Jan 2012 1:21
by bsglover
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.