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
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 2:58 am
To import multible ftp files I created bat file:
ftp -s:E:\data\PROD\TEMPFILES\FINTRANS\GETFINTRANSMD.parm hostname
parm file holds the following content:
username
password
text
cd correct_path
prompt
mget File*.EXP
bye
running bat file from cmd (outside datastage) works perfect
From DS Job tried two things.
cmd stage calling the bat file - which I expected to work with no problem
but it returns
FTPTEMPLTEST..Command_Stage_0: User (hostname:(none)): Invalid command.
Interactive mode Off .
Then I tried file stage with BeforeJobRoutine as
both bat file, as well as with full string :
ftp -s:E:\data\PROD\TEMPFILES\FINTRANS\GETFINTRANSMD.parm hostname
Both returns
*** Output from command was: ***
User (hostname:(none)): Invalid command.
Anybody has the magic touch ???
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Nov 13, 2009 3:32 am
Is drive "E" a local drive or a remotely mounted one?
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 3:33 am
ArndW wrote: Is drive "E" a local drive or a remotely mounted one?
A local physical drive
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Nov 13, 2009 3:35 am
Strange indeed. Are you passing a constant string value for "hostname" in your DS job?
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 3:36 am
ArndW wrote: Strange indeed. Are you passing a constant string value for "hostname" in your DS job?
No - it is only listed in the batch file
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 3:38 am
ArndW wrote: Strange indeed. Are you passing a constant string value for "hostname" in your DS job?
No - it is only listed in the batch file
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Fri Nov 13, 2009 3:40 am
If you put an echo in the bat file does that print out to the log, i.e. does the BAT file get called correctly?
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 4:18 am
empty entry
Last edited by
jinm on Fri Nov 13, 2009 4:19 am, edited 1 time in total.
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 4:18 am
RESOLVED
Removed hostname from bat file and started params file with open host.
and removede TEXT
TEXT was what initiated the "invalid command"
new param file:
open hostname
username
password
cd correct path
prompt
lcd Targetdirectory
mget FILES*.EXP
bye
Thanks for the promp assistance
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Nov 13, 2009 7:34 am
What was 'text' supposed to accomplish? Did you perhaps mean 'ascii' instead?
Please mark your post as Resolved using the button at the top of the page. Thanks.
-craig
"You can never have too many knives" -- Logan Nine Fingers
jinm
Premium Member
Posts: 47 Joined: Tue Feb 24, 2004 1:59 am
Post
by jinm » Fri Nov 13, 2009 7:37 am
Thought I had marked it already
TEXT = ASCII