W dniu 10.10.2023 o 18:18, jgmauta...@yahoo.com.ar pisze:
Hi!
I want to understand how TN3270 emulation works regarding convertion of 
characters (between EBCDIC and ASCII, and viceversa).
This is how I think it works (more or less), but I am not sure at all. So 
please let me know about any mistakes.
Let suppose that you use a TN3270 emulator program to access the ISPF browser to display a dataset. 
Let also assume, to simplify, that it contains just a single character, an "A".In DASD, 
what is indeed stored is X'C1' or, to be more accurate, BINARY'1100 0001'. When you BROWSE the 
dataset, then the Mainframe sends to the TN3270 PC client exactly X'C1' (BIN'1100 0001'). No 
convertion is done at the Mainframe side. Then, when the TN3270 client receives X'C1', because it 
knows that this is a TN3270 session and that its configured CODEPAGE is say 500, it realizes that 
X'C1' corresponds to an "A" displayable character. And, before sending the instruction to 
display it on the PC screen, it converts X'C1' to X'41'.
Is this more or less how this works?
Thanks in advnace for your help,

Yet another explanation.

When you type a key - let's say A a code is sent to the host. What code?
Assuming default keyboard definition and no capslock it will be lowercase "a" - but it is "EBCDIC a", which means x'81' code.
So, you pressed a key, the x'81' code was sent.


Usually, i.e. when typing command you see the characters you typed. However it is *not* the code you sent. Host received you x'81' and sent same x'81' to the terminal. But there is no physical terminal, we have emulator here. PCOMM as many (all?) other emulators use OS (Windows) font, which is ASCII-based. So, PCOMM use translation table for that. The table is straightforward, that means x'81' is translated to x'61'. PCOMM allows you to customize the translation table (XLT files), so if you want, the x'81' may be translated to i.e. x'3D'. x'3D in ASCII table looks like '='. So we created ridiculous translation you type 'a' and see '=' However system understood 'a'. It can be first letter or ALU command.

Note: it doesn't matter what application you use. It can be ISPF, browse, z/VM XEDIT, MVS console, etc. Everywhere when typing is allowed and visible (password is not).

What about codepages? Well, we have *two* codepages. One for your PC (Windows, Linux, Mac) and the other for the host. However you don't set host codepage in z/OS - there is no such setting (z/OS, not DB2 or other applications). Where is it set? In your emulator. Both ends. Usually emulator recognize PC codepage and you have to set host codepage. Host codepage is needed for translation table for display. Host and PC codepage is needed for keyboard setup.

HTH

--
Radoslaw Skorupka
Lodz, Poland

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to