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
  • 1.  Issue with Encrypted File During SFTP Transfer via WinSCP

    Posted Mon January 06, 2025 09:33 AM

    Hello,

    I am facing an issue with file transfers from my IBM i . Here are the details:

    When I download a physical file from the IBM i to my PC using WinSCP via SFTP, the file appears unreadable or seems encrypted when I open it on my PC.
    However, when I perform the same transfer via FTP, the file is perfectly clear and readable.

    Could you help me identify the cause of this issue and find a solution?



    ------------------------------
    slimani mohammed
    ------------------------------


  • 2.  RE: Issue with Encrypted File During SFTP Transfer via WinSCP

    Posted Mon January 06, 2025 12:10 PM

    Hello

    This is probably because the physical file stores data using an EBCDIC CCSID.
    The IBM i FTP server converts data from EBCDIC to an ASCII CCSID. Checkout CHGFTPA command (https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/chgftpa.html) or type ftp server subcommand (https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/rzaiq/rzaiqtypet.html).
    sftp uses ssh which does not have this conversion process. The result is that you get the file on your PC with EBCDIC CCSID, so not readable.
    You have to convert first the data to ASCII on the IBM i into an IFS stream file, with CPYTOSTMF or CPYTOIMPF commands, then initiate the sftp transfer from it.



    ------------------------------
    Marc Rauzier
    ------------------------------



  • 3.  RE: Issue with Encrypted File During SFTP Transfer via WinSCP

    Posted Tue January 07, 2025 01:42 AM

    Dear Slimani

    Why do you use WinSCP while IBM i ACS provides the same function with perhaps more features and convenience?  Do a Google search with "ibm i acs data transfer" and you will find plenty information on this.



    ------------------------------
    Satid S
    ------------------------------