Return code from Before Telnet Command

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
lkthoma
Participant
Posts: 21
Joined: Wed Mar 08, 2006 8:47 am

Return code from Before Telnet Command

Post by lkthoma »

I have a server job that includes an FTP stage to retrieve a file to the DataStage server. Before it ftp's this file we have a 'Before Telnet Command' execute a unix shell script to sort the file before the ftp. Our issue is that occasionally the shell script fails due to lack of space or the file not being there but this does not cause the job to abort!?!?

Has anyone seen this and know of a solution or does an error in a Before Telnet Command NEVER return and error?

Thanks
lkthoma
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Does your shell script return a non-zero status when it has issues?
-craig

"You can never have too many knives" -- Logan Nine Fingers
lkthoma
Participant
Posts: 21
Joined: Wed Mar 08, 2006 8:47 am

Post by lkthoma »

Yes, I specifically check the error codes and have code that forces the script to return a 99 if there is an error. I have tested this functionality and ensured it is returning a non-zero return code.
lkthoma
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Specify a temporary directory (-t option) for the sort command. A directory with lots of free space.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lkthoma
Participant
Posts: 21
Joined: Wed Mar 08, 2006 8:47 am

Post by lkthoma »

Thanks for the response Ray.
I can definitely do that, but do you know if a "Before Command' ever returns a non-zero return code or will cause the job to abort?
lkthoma
lkthoma
Participant
Posts: 21
Joined: Wed Mar 08, 2006 8:47 am

Post by lkthoma »

As an FYI, IBM stated that the Before Telnet Command does not return or check for commands that fail.
lkthoma
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's good to know, but... unfortunate. :(
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply