Page 1 of 1

MGET return code

Posted: Tue Oct 22, 2013 6:05 am
by satheesh_color
Hi,

I am finding difficulty to capture return code of MGET(ftp) command.

We are using the unix script to ftp multiple files from remote server to DS server and process it.

Scenario1: If there were files, we check the below status and continue processing

Status Check:(index(Cmd_Ftp_Master.$CommandOutput, 'File send OK', 1) > 0) Or (index(Cmd_Ftp_Master.$CommandOutput, 'bytes received in', 1) > 0) Or ((index(Cmd_Ftp_Master.$CommandOutput, 'Transfer completed successfully', 1) > 0) Or (index(Cmd_Ftp_Master.$CommandOutput, 'Transfer complete', 1) > 0))


Scenario2: If there we no files on it, we need to check the below status and create a dummy file in order to continue the process to complete to avoid job termination.

Status Check:(index(Cmd_Ftp_Master.$CommandOutput, 'The system cannot find the file specified', 1) > 0) Or (index(Cmd_Ftp_Master.$CommandOutput, 'No such file or directory', 1) > 0)

We were not able to capture the scenario2 values. Kindly let me know your thoughts on the same.


Satheeh

Posted: Tue Oct 22, 2013 8:27 am
by priyadarshikunal
Please let us know about the error message and what have you tried so far.

Posted: Tue Oct 22, 2013 10:19 pm
by hitmanthesilentassasin
Please post your mget script and the execute command activity command