cancel
Showing results for 
Search instead for 
Did you mean: 

FTP/move a xls file from Iseries(application) server to Windows location

Former Member
0 Kudos

Hi,

I need to ftp a excel file from Iseries server to a location on Windows. For e.g. the file abc.xls is stored at IFS path \usr\sap\tmp on my Iseries SAP server. I need to move this file to a windows path i.e. D:\data folder. If on my SAP server I use FTP as:

ftp <Windows-IPaddress>

then it says 'cannot open connection for <Windows-IPaddress>'.

Although I can ping the windows system using IP adddress but cannot login for FTPing.

The reason maybe the difference in Operating system because I can FTP to another AS/400 server.

As an alternative, on windows server, I tried to create batch/script file for FTP as:

======================================

ftp

open <AS/400-IPaddress>

qsecofr

<password>

cd usr\sap\tmp

lcd D:\data

ascii

get abc.xls

quit

======================================

This script runs fine if I execute it manually i.e. in foreground and the file is moved as desired. But if I execute it in batch, it gives me the prompt to enter the logon credentials, inspite of specifying the username and password.

The requirement is that this file copying/moving shall happen in background at fixed time in the midnight.

I tried to seek almost all the help from my ABAP team to execute this in background using BDCs or report for Tcode CG3Y but it doesn't work as the AS/400 server is incapable of identifying the windows server share location.

Is it required that I have to do any host table entries or modify any OS config.? How can I get a Windows file share on Iseries such that I can use the path in ABAP code and execute it in background? Else suggest me how can I execute FTP from Iseries to Windows in batch.

Thanks! in advance.

Regards,

SAI R.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks! for all the help.

Former Member
0 Kudos

Hello Nick or Sai,

You cannot ftp from iSeries to Windows, likely you didn't install IIS on that Windows server, or didn't enable the ftp service there...

On the other hand, you should be able to map a Windows share driver under QNTC on iSeires. Just use same user/password between iSeries and Windows domain, and it will work.

The last piece is just to copy from /usr to QNTC as a scheduled jon on iSeires.

Best regards,

Victor

Former Member
0 Kudos

Victor,

Thanks! for the update

Can you please elaborate as how I can achieve this? Else please provide me any URL where I can find steps to perform the FTP from Iseries to Windows. I hope this can be done using QNTC but how I don't know. Please help.

Regards,

Nick

Former Member
0 Kudos

Hello Nick,

For ftp from iSeries to Windows, you need Windows to be "ftp server", typically it means installing IIS, then enable ftp service.

For QNTC, in short

1. create same user/password on iSeries and Windows

2. share Windows directory that user

3. map a subdirectory under QNTC to that share with that user

4. schedule a background job to move the file as that user

http://www.redbooks.ibm.com/redbooks/pdfs/sg242164.pdf (Chapter QNTC file system)

http://www.itjungle.com/fhg/fhg081005-story03.html (option 1 QNTC with further 4 links)

Note that some documents details certain service has to be started, and CCSID options, etc.

Sorry that this message is not detailed enough!

Best regards,

Victor

Former Member
0 Kudos

Victor,

Thanks for all the help. Please note that I can transfer files from the SAP IFS path to windows share location as mentioned earlier. But this has to be done manually either by running a Z program in SAP or FTP on OS level.

But, I want this to happen in batch everyday. It should run as a Z job in background but as the system has no windows NT/XP drive mapped to it, the background job executes but the file is not moved to the windows path. The links you provided tell the possible ways to do this but I want this to happen in background with no user intervention.

Regards,

Nick Ron.

Former Member
0 Kudos

Hi Nick,

If you want to scheudle a SAP background job, just make sure user <SID><instance_number>, like PRD00, can access \QNTC\<windows_host>\<shared_name> as well.

Best regards,

Victor

Former Member
0 Kudos

Victor,

Thanks! for all the help. Well, the QNTC stuff seems to be complex as I have to modify my current network setup.

But to my surprise as a workaround, I can do this using FTP on windows. The difference is that now I'm using:

FTP -i -s: ftp.txt

where ftp.txt contains the script for FTPing.

So simple but I had to wait till I understand.

Regards,

Nick

volker_gldenpfennig
Active Participant
0 Kudos

Hi,

sorry, but XLS files are BINARY files !!!!

=> BIN instead of ASCII ...

Regards

Volker Gueldenpfennig, consolut international ag

http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de