• 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

SFTP connection using JSCH  RSS feed

 
Greenhorn
Posts: 23
  • 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: 24366
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • 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: 23
  • 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: 24366
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent!
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!