This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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:
 
Marshal
Posts: 24191
54
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
Marshal
Posts: 24191
54
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!