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
MGET return code
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 150
- Joined: Tue Mar 13, 2007 1:17 am