IBM i Global

IBM i 

A space for professionals working with IBM’s integrated OS for Power systems to exchange ideas, ask questions, and share expertise on topics like RPG and COBOL development, application modernization, open source integration, system administration, and business continuity.


#Power


#IBMi
 View Only
Expand all | Collapse all

Transferring files from IFS to SFTP server

  • 1.  Transferring files from IFS to SFTP server

    Posted Fri March 18, 2022 04:13 PM

    I can't seem to find anything on this, and I thought it a pretty basic issue, so I feel pretty stupid. I am trying to send a text file from the IBMi IFS to our parent companies SFTP server. I have set up Expect to use scripting, but when I send the file to the server, it gets there with everything changed to unreadable characters.

    I thought it was the CCSID of the stream file that I create on the IFS. So I changed that to CCSID 367...still nothing, I changed the SFTP session to ASCII, and that also did nothing. I'm at a lose...is there a simple trick for sending a file from the IFS to a server and having it still readable?





    #SupportMigration
    #IBMi
    #Support


  • 2.  RE: Transferring files from IFS to SFTP server

    Posted Thu July 14, 2022 03:38 PM

    Have you tried alternating the Transfer type using the 'binary' or 'ascii' command within the script?

    When transferring files with FTP: ASCII and BINARY. ASCII files are plain text files. They can have extensions like .txt or have no extension at all. BINARY files are programs or other non-text files saved in the file format of the application that created them or archived or compressed file formats.

    BR

    Sean





    #Support
    #SupportMigration
    #IBMi