-
Notifications
You must be signed in to change notification settings - Fork 20
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
HEX / Text Source Code Editing #183
Comments
Hi, Personally, I think the use of hex characters directly in the sources should be avoided. VS Code, and Z Open Editor, is a source code editor (source programs editor). It is not a data file editor. The files handled must only use displayable characters. You must use the X'nn' syntax in COBOL, or equivalent in other languages, to introduce hex values in the source codes. However, EBCDIC characters x'4F ', x'6F' should be converted to UTF8 (or ASCII) and displayed correctly in VS Code / Z Open Editor. For me, they are converted to x'7C', x'3F' in UTF8 / ASCII. There seems to be another problem with your configuration. Otherwise to see the values of hexa or non-displayable characters in VS Code, see the extension Gremlins tracker for Visual Studio Code. |
Yes, on the VS Code side we are working with UTF-8 only. Conversions are handled for us by z/OSMF or RSE API. Microsoft has a Hex extension as well, but this will not help much here I guess. I would not think that we would try this any time soon for Z Open Editor. As you might know we are also partnering with other companies for data editing for our other editors, but unfortunately VS Code support is behind. |
Hi, For EBCDIC / UTF8 character conversions, see See also if you have the PTFs on z/OSMF which addresses the character conversions problem (by past z/OSMF only worked with IBM-1047, ccsid USS), and if you also have a version of Zowe CLI which supports character conversions (--encoding). |
For RSE API users there is documentation on conversion options here: https://ibm.github.io/zopeneditor-about/Docs/mvs_encoding.html If you find any conversion problems with RSE let us know here as well. |
Thank you! I just realized you had questions above that I didn't answer. |
This is probably the origin of the problem. If you convert from EBCDIC IBM-037 to ASCII IBM-437, it's an error. If you use "ind$file" look at parameters of your emulator, (ftp should be a better solution). I think you can use Zowe CLI "zftp" without z/osmf. Otherwise use client ftp of your workstation. |
PS : If you want to do an FTP transfer directly with z/OS, you may encounter problems because the z/OS FTP server does not accept to switch from single-byte encoding (IBM-037) to multibyte encoding (UTF-8 / IBM-1208). One solution would be to transfer via FTP from IBM-037 to IBM-1252, then apply a local transformation to UTF8, for example by opening the transferred file in VS Code in Windows-1252 and then saving it in UTF-8. |
I remain convinced that we cannot transfer a file containing non-displayable characters (binary data or packaged decimal) and apply an encoding translation to it, (go from EBCDIC to UTF8 and vice versa). Nevertheless, the editing of (small) data files remains a common need, (for large data files it is better to turn to a specific tool which is no longer direct file editing). For this, I made two proposals for the development of the Zowe Explorer for VS Code extension, which you could consider and support by voting:
Thanks. |
Description of the enhancement requested
Environment
Version: 1.62.0 (user setup)
Commit: b3318bc0524af3d74034b8bb8a64df0ccf35549a
Date: 2021-11-03T15:23:01.379Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.17763
Text / Hex Editing View
I would like to see the source that I am editing with the hex equivalent below each character like the mainframe has in it's editor. An example is seen below. I understand there are dump style extensions but I would prefer a hex editor like the mainframe has. There are times when coding MFS or assembler or even COBOL programs that may have embedded hex values, that are non-displayable in the source.
Hex Editing MFS Source example that has embedded hex values

MFS Source code that contains Hex values

The text was updated successfully, but these errors were encountered: