Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

SFTP connection using JSCH  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using SFTP connection using JSCH library. It connected to IBM as400 server and able to transfer the files.

There is some problem in encoding the char. File contains the vietnam characters. As400 team asked me to set CCSID 1208 before transferring the file from source to destination.

I am not sure where i can set char set for CCSID in jsch.

Appreciate if anyone help on this.

My Code:
 
Sheriff
Posts: 23963
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CCSID is an AS/400 concept, so it looks to me like they want you to set the CCSID of the server job to 1208. That "server job" would be the job which runs on the AS/400 and receives the file transfer.

I'm not sure how your SFTP client would do that; I guess that you would have to connect to the server, then (somehow) run a command like "CHGJOB CCSID(1208)" on the server, and finally transfer the file.
 
vinoth sathi
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great Paul.

This solution is perfect. We did the same thing in our as400 server. Its worked.


Thank you.
 
Paul Clapham
Sheriff
Posts: 23963
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent!
 
You can't expect to wield supreme executive power just because
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!