Help getting .txt files from IFS (IBM AS400 iSeries) to local server

I have 2 .txt files that auto-generate daily and go to IFS folder. I need them to leave "IBM World" so that a WinSCP script can then automatically pickup and send to 3rd party SFTP site. I have tried using script from IFS to SFTP but it is not working. I thought I could try SQL script but I don't know anything about it. I have looked online but I keep seeing xp_cmdshell and I don't know what that is either. The sites that have different options use commands that keep getting spit out when I attempt. I have gotten it to run, but with errors and nothing moved from IFS to destination folder on server, so while it's progress I am not having much luck. Any and all assistance is appreciated at this point. Someone mentioned using 'netserver' that iSeries sees as IFS, but is actually on local server so WinSCP script could operate there without authentication issues happening, but I know nothing about that either... thoughts? ideas? TIA!

iSeries has a built in ftp client which is capable of doing sftp, why not use that?
IFS is like Windows Shares (or linux' samba), so you should be able to make a persistant/permanent map to that share (if you have the right credentials), and so it would be a matter of copying/moving the file to a local folder, and then do your WinSCP stuff.

I'd prefer the first option to avoid "another source of break down".

Why? What error(s) do you get?

bitsmed: thank you or reaching out! Let me put it this way - I am a glorified "middle man" at my company. I have zero IT background (or any other related topics...) and I am just a sort of liaison between my company and our vendors / third party admins.

Sooo I guess to answer your question - the issue so far with "IFS to SFTP" is that the credentials keep getting booted/disabled, which is obviously a hindrance to the bottom line: automating the process.

Now - the built in "ftp client" ... can you provide more detail on this? I am game to try literally anything at this point if it will make these 2 files upload to the SFTP without me manually moving everyday. If it is a thing, then I will try it, I just need direction as I am a "user" and not familiar with the back end. However, if you can explain the general process for me I will absolutely try to figure it out or get my "iSeries guy" in on the action.

I do know we tried to run the WinSCP script (authentication issues/disabling often), we then tried a security key (provided by SFTP site side) and this theoretically should work, but all we got was an error saying 'partial...' (not fully accessible, and not fully denied). Since then SFTP site techs have basically quit trying as they do not understand iSeries.

I just figured if I can get the files to land off of IFS/iSeries instead of withing, then I should be able to connect WinSCP script easily to automatically upload to SFTP site. I hope this even makes sense and I REALLY appreciate your help/interest. I just think there has to be a way to make this happen, but I do not have the knowledge!

They must know (otherwise how can they call them selves iSeries admin) :slight_smile:

If I was to set it up, I would:

  • make sure the destination sftp server can be reached and is stable (this can be done from Windows with FileZilla)
  • read this and make sure, you can establish connection from your iSeries to the destination (and test that it's stable)
  • make your iSeries admin put it in the job scheduler

You forgot the URL in the anchor tag for:

  • read this and make sure, you can establish connection from your iSeries to the destination (and test that it's stable)
    I'm just curious as the other link is so helpful.

Sorry - here's the link

1 Like

Thanks bitsmed, useful info indeed.

1 Like