MGET return code

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
satheesh_color
Participant
Posts: 182
Joined: Thu Jun 16, 2005 2:05 am

MGET return code

Post 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
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Please let us know about the error message and what have you tried so far.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

Please post your mget script and the execute command activity command
Post Reply