FTP Issue

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
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

FTP Issue

Post by Smeitei »

HI

I am running a before job subroutine perl script to FTP and get file from mainframe . I have also put an entry of the user id and password in the .netrc file so that the when the FTP to mainframe is done it doesn't ask for user id/password .

I ran and tested the script manually by running the script but when the script is ran as a before job subroutine from DS job it is failing and giving this issue

*** Output from command was: ***
ftp: ioctl I_PUSH ttcompat: No such device or address
ftp: ioctl(TIOCGETP): No such device or address

Has anyone face this issue
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Could it be that the parameters aren't being passed the way you expect when you call the script from DS instead of running it manually? Try hardcoding everything so that the script doesn't use parameters, or perhaps you could echo your parameters in the script to see if that is where your problem lies.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps you should post your script?

The vast majority of problems we see where scripts 'run fine' from the command prompt but not from DataStage are where the script writer make too many assumptions about their environment.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

Post by Smeitei »

problem solved..

.netrc is defined in my home directory and when the ftp runs the unix settins sets the home as / and not home directory so it goes and check for the .netrc file at / instead of checking at home directory . Hence it is not able to pick up userid/password of mainframe server from the .netrc file
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So how exactly did you resolve it? I vaguely recall a way to tell it where to find the .netrc it needs, but wondering specifically what you did for this. Thanks.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dkmorgan
Premium Member
Premium Member
Posts: 1
Joined: Fri Apr 27, 2007 8:46 am
Location: Boise, ID

Post by dkmorgan »

chulett wrote:So how exactly did you resolve it? I vaguely recall a way to tell it where to find the .netrc it needs, but wondering specifically what you did for this. Thanks.
Typically, one does this by sourcing their user environment at the beginning of the script.
Douglas Morgan
Post Reply