Bat file returns invalid command in datastage
Moderators: chulett, rschirm, roy
Bat file returns invalid command in datastage
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 ???
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 ???
Is drive "E" a local drive or a remotely mounted one?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Strange indeed. Are you passing a constant string value for "hostname" in your DS job?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
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?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>