Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the management of codepages conversions #83

Open
Tracked by #1833
FALLAI-Denis opened this issue Jun 17, 2021 · 9 comments
Open
Tracked by #1833

Add the management of codepages conversions #83

FALLAI-Denis opened this issue Jun 17, 2021 · 9 comments
Labels
enhancement New feature or request priority-low

Comments

@FALLAI-Denis
Copy link

FALLAI-Denis commented Jun 17, 2021

The possibility of transferring mvs or uss files by controlling the conversion of characters according codepages seems essential to us.
However, this functionality is not available in the zowe-cli-ftp-plugin.

Confer. #68.

It would be necessary to add at least the management of two options:

  • the possibility of specifying the local codepage
  • the possibility of specifying the remote codepage

You might need to manage other options to differentiate between single-byte conversions and multi-byte conversions.

This information should be able to be specified at the profile level, and at the level of each command.

Regarding the FTP transfer on z/OS, this concerns several (quote) site options:

  • ENCODING=SBCS|MBCS
  • SBD=(remote,local) or MBD=(remote,local)
  • UNICODEFILESYSTEMBOM=ASIS|ALWAYS|NEVER
@tiantn
Copy link
Collaborator

tiantn commented Jun 22, 2021

Hi @FALLAI-Denis , thank you. We may have a proposal to add a --site option to zftp commands to let users write their SITE commands. On one hand, this is very flexible for users to change or customize their site configuration. On the other hand, it is easy to maintain the zftp plugin for us. Thank you!

@FALLAI-Denis
Copy link
Author

Thanks for your feedback.

The --site option will have to accept multiple parameters, and even the reference to a file, as the number of options can be large.

Even though the configuration of the FTP server on z/OS can be changed (and it is not a simple operation, administratively), there cannot be one configuration that meets all the needs anyway. So you have to be able to specify the options at the client level, therefore at the Zowe CLI level.

@andiknie
Copy link

Hi, setting only the server encoding via site-command dosn't seem to be enough. I can set the remote codepage via a ftps.rc-file on the host and get ios8859-1-encoding on the pc-site. That works good, but it's not possible to set a multi-byte-encoding (like UTF-8) if you have to use fixed block files/libraries on host site.
Unfortunality this is the standard format for VSCode and it's always used when pushing changes to the host (dataset).
A real encoding between local files and received/sent files during the transfer-process could fix this problem very easy - I already made a fork and tested this (but only hard coded, not via a configuration setting), check here: https://github.com/andiknie/zowe-cli-ftp-plugin
This change works for me, but I did not manage to create the VSCode-Zowe-FTP-Extension, so I can't use/test it with the VSCode. That's desperatly needed for me to use zowe in germany with the special characters (the umlaute äöüÄÖÜß)

Thank you for your support and this fantastic tools.

@tiantn
Copy link
Collaborator

tiantn commented Sep 20, 2022

Thank you @andiknie.

For the multi-byte-encoding, you can try to specify the following ftp commands in the ftps.rc-file:

site encoding=mbcs               
site mbdataconn=(utf-8,Latin_1) 

Could you help to test in your environment? Thank you very much!

@FALLAI-Denis
Copy link
Author

Hi,

z/OS FTP has limitations regarding conversions between single-byte encoding and multi-byte encoding. It seems to me that this is only possible on variable format files.

@andiknie
Copy link

andiknie commented Sep 21, 2022 via email

@FALLAI-Denis
Copy link
Author

Hi,

FYI, I open a RFE for this issue on 2020, December 16:
FTP - Submit a JOB from a UTF-8 encoded file
It is now tracked on IBM Ideas:
FTP - Submit a JOB from a UTF-8 encoded file

@andiknie
Copy link

andiknie commented Oct 11, 2022 via email

@jhonatan1090
Copy link

I'm using the ftp extension and I'm not able to download/upload files with SBD=(IBM-1047, ISO8859-1)... Does anyone have any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low
Projects
Status: Low Priority
Development

No branches or pull requests

6 participants