How to change your TSO/ISPF 3270 screen size. Remap keyboard keys, change Code Page / character set, and other appearance-related TSO ISPF screen settings. Discusses both ISPF option 0 settings and PC3270 configuration . . .
This is our second article on ISPF option zero settings. It discusses changes related to the general appearance or format of the screen, such as screen dimensions and character sets, in particular the ISPF settings that require you to make related changes to the settings you use for IBM PC3270 Emulation.
The emulation software package (aka 3270 terminal emulator) is the part that runs on the PC. This discussion assumes you are using IBM Personal Communications 3270 Terminal Emulator (also called PC3270 and sometimes TN3270).*
If you want to use one of the standard screen sizes (24×80, 32×80, 43×80, 27×132), you can select one of those from the emulator configuration settings You are not limited to those choices, however. For this discussion, let’s assume you want more out of life — you want to change your screen size to a nonstandard value. The maximum permissible size is 255 x 255. Some people use that, but if you want to use 255×255 you do need to have either very good vision or a pretty big screen. Let’s say today we just want to set the size to 43 x 142; you want your screen to have 43 lines and you want the width of the lines to be 142 characters. That makes it easier to see your compile listings in SDSF without scrolling right and left. Since that is not one of the standard choices offered by the 3270 emulator pre-set list, we’re going to use a more straightforward method to change it: We’ll just edit the configuration settings file on the PC.
The basic settings for your PC3270 emulator are saved on the PC as a .ws file; That file can be edited using Notepad, Notepad++, or a similar unformatted editing tool. We'll assume Notepad here, because it comes with Windows. (Notepad++ is quite nice and can be downloaded free, and you might want to try it; but discussing that now would be a digression…)
How do you find your .ws file, you ask? Whenever you do the mouse click on the icon to start your 3270 (TSO) session, that icon points to the .ws file. So find the icon on your desktop, and do a right-hand mouse click instead of an ordinary index-finger left-hand mouse click. Then, from the drop-down selection list, select Properties. Under the General tab within Properties, it will give the basic name of the file in the first box near the top. If the icon represents a shortcut to the .ws file, then the file name in the General tab will be appended with the notation “– Shortcut”. In that case, select the next tab over, called Shortcut, and look in there at the box titled “Target”. That will give the complete long name for the file. Right-click in that box and select Copy to capture the complete file name, which you will later Paste into the File Name for editing.
Logoff TSO and close your 3270 emulation window/session before you begin editing your .ws file.
Before making any changes to the .ws file, first make yourself a spare copy of your .ws file (establish a fallback position) so you can easily recover the pre-change version if you need to do so.
Open the Notepad editor, click File, then Open…, and then, for “File name:”, paste in that long file name you just copied.
Within your .ws file, find the line that says [Telnet3270] ; That is a heading to indicate that the lines following it comprise section Telnet3270. That section might or might not contain the following line:
Add that line into the Telnet3270 section if the line is not already there.
Next find section  in your .ws file, and within that section change the value on the ScreenSize line as follows:
Of course you can pick some other dimensions if you prefer, up to 255×255.
Note that some programs that run under TSO might not support all possible screen sizes. In fact some of the simpler ones might only support 24×80 (the original 3270 screen size from way back when). Personally I’ve run into very few and minor glitches using IBM products with alternate screen sizes, but I have seen software from other vendors that had limited support for other screen sizes. The problems really are few and far between, but you should realize it is a possibility. (You did save that backup copy of your .ws file, didn’t you? Just joking, you probably won't need it.)
Save the .ws file using “Save as…” to create an alternate file name, thus leaving your original .ws file intact. Grab a copy of the new file name for later pasting. Close the Notepad session.
Create a shortcut to your modified .ws file. You can do this as follows, if you don’t happen to know already. Right-click in some empty place on your desktop; From the menu that appears, select New, and then select Shortcut. In the box marked “Type the location of the item”, paste the name of the new file that you just saved in the last paragraph. Press Enter, and on the next screen provide a short name that will appear on the desktop. Click finish.
Start the 3270 emulation window by clicking on the icon you just created. Logon TSO and go into ISPF.
Within ISPF, select option 0 (zero) to change your ISPF Settings.
Find section Terminal Characteristics on the ISPF Settings screen. This has two sub-headings, Screen Format and Terminal Type. You might have to page down to find some of the choices on this screen.
For Screen Format select 3. Max
For Terminal Type select 6. 3278T
Setting 3278T uses the Text character set. This enables better handling of special characters such as square brackets. If you find that special characters still do not display as you want them, even using 3278T, you may also want to change your Code Page, which is discussed considerably further down in this article,
There are a number of special characters, actually. Not all of them are represented by keys on an ordinary keyboard. Later, once you have 3278T active, take a minute to go to ISPF browse and look at 'SYS1.MACLIB' member IARV64 and/or CSVQUERY (and page down a bit). Those members, which come from IBM, make graphic use of some of the characters available in the Text character set.
But before you go there, while we’re still back in ISPF option 0, you can change some other settings too, as long as you’re here.
One setting related to special characters is the choice of the “command delimiter”, which defaults to the semicolon(;). The command delimiter allows you to enter multiple primary commands at the same time in the ISPF command => field, separating the commands by whatever character you choose as the command delimiter. For example,
Command => Find “Label1:”; Find “X = Y”; Change “X = Y” “X = Y + 2”
The above example causes the two Find commands to be executed one after the other, followed at the end by the Change command. A nice capability to have, but perhaps you might think (as I do), that the Semicolon is an inconvenient choice for command delimiter; Possibly you prefer to be able to use the semicolon within text or program code. If you leave it set to semicolon, you will find it places a limitation on what strings you can Find or Change from the command line in Edit – That is, you cannot specify any string that contains a semicolon. Bummer if you ask me.
Usually I set command delimiter to the tilde, the squiggle that usually appears on that extra key to the left of the digit 1 on the row of keys with all the digits, at or near the top row of the keyboard. That key also contains an odd-looking left-leaning apostrophe, and sometimes I use that. The point is to choose a key you don’t normally use for anything else. So do consider choosing a good command delimiter key while you’re here on the ISPF option 0, ISPF Settings screen. Just overtype the semicolon default with the character you choose, and you’re laughing.
While we’re here, you may as well put a slash (/) to the left of the choice Long message in pop-up to select that option:
/ Long message in pop-up
Yes, this is the segue into another digression; this one is about error messages.
Displaying error message numbers on TSO ISPF error messages …
Normally when you get an error message under ISPF, the actual message (in the ISPF message library) contains text for both a short message and a long message. The short message is the frugal error text that appears in the upper right-hand corner of your ISPF screen when an error occurs. Often that is the totality of error information you are given. Often you want to know more.
As you may (or might not) know, if you press the HELP key when you first see that short message text, then you will be shown the long message (if one exists). (The HELP key is usually F1 or F13.) By default the long message, when it is displayed, appears at the bottom of the ISPF screen, which in many cases is not so great a choice. Selecting the “Long message in pop-up” choice will cause the long message text to be displayed in a pop-up box instead of at the bottom of the screen. Try it; you’ll like it.
Maybe you are curious what might happen if you press the HELP key yet again after seeing the long message? If the actual ISPF message specifies the name of a HELP/Tutorial panel, then that HELP screen will be displayed if you press the HELP key again after the long message.
Back on that ISPF Option 0 screen, glance up to the right at the very top of the screen, where it says Identifier followed by Help. (You might remember it’s called the action bar.) Move the cursor up to Identifier and then press enter. You’ll get a drop-down menu.
Specify 1, to choose Message identifier.
Within the next set of choices, turn on both Display message identifier and Default setting for message identifier. The first one only controls your current ISPF session. If you want the setting to be turned on automatically all the time, you need to turn on both choices.
After you turn those settings on, any long message text displayed by ISPF will include the ISPF message number at the start of the text. When you get an error, you can Google-search on that message number and possibly find information, discussions, IBM problem reports and the like.
This feature can also be temporarily activated and deactivated by issuing MSGID ON or MSGID OFF on the command line, but you need to do the Option 0 thing to turn it on as your permanent default.
End of digression about displaying TSO ISPF message numbers.
Now that you’ve used the action bar to set the Message ID on, you’ll have noticed that, besides Message identifier, you can also toggle on and off the System name, User ID, Panel identifier, and Screen name. Those work differently from the Message ID. They control what is displayed in the 17-character field near the upper left of the screen, at the start of the line where the screen title usually appears. While they are not exactly mutually exclusive, they cannot all be displayed in the same 17-character field at the same time, so you won’t see them all. If you use multiple systems or multiple user ids, turning on SYSNAME or USERID provides a handy reminder of which system or which user id you’re using at any given time. Each of these options also has a companion ISPF primary command that can be used to turn the feature on or off temporarily, similar to MSGID ON or OFF. These commands are SYSNAME, USERID, PANELID, and SCRNAME.
Yes, there are even yet many more ISPF option 0 settings you can change, but that’s all we’re planning to look at today.
One more thing about the PC3270 settings I’d like to mention to you briefly, because it also affects the processing of special characters such as the square brackets and that NOT sign. It is: Code Page.
The basic choices of interest (if you’re in the USA) are 037 and 1047.
You might want to have available the NOT sign (¬) used in PL/I and/or the square brackets [ ] used with languages in the C family.
The 1047 code page gives you the square brackets, but it does not provide the PL/I NOT sign. The 037 code page is the opposite: you get a working NOT sign but you don’t have the square brackets.
Notice that you can still enter a missing character such as the NOT sign by finding an existing place where the character exists and then doing copy-and-paste. Alternatively, in Edit, try this: Find an existing copy of the character; Up on the command => line, you can type HEX ON to see the hex code for the character; You can then overtype the existing hex code in the place where you want to put the character. . . . A blank is hex '40', and in the basic HEX ON display the code will appear vertically on the two lines directly under the character vertically: Directly below the blank will be the digit 4, and directly beneath that the zero. Hence you can find the corresponding (underlying?) hex code for any character you find in the text you're editing.
Also PC3270 allows you to customize your keyboard setup to map the meanings of the individual keys, which you can use to map the square brackets [ ] and/or the NOT sign to any other keys of your choosing. We won't go into that in detail here, but let's outline the basic process.
The keyboard setup lives in a file with the .kmp extension, and your .ws file will specify its complete file name. You can again edit the .ws file in Notepad and change it to point to a different .kmp file if you wish. As usual, I recommend you make a backup copy of your .kmp file before you make changes to it, and do the same for your .ws file.
The ordinary PC3270 configuration settings mechanism is fairly straightforward and easy to use. Get to it from the dropdown menu at the top of the PC3270 emulation window, by clicking the sequence Edit -> Preferences -> Keyboard on the PC3270 configuration choices. It will show you a map of the keyboard. You can click on an individual key within the map, and then the lower-right hand corner of the screen will show you a box with the current values for that key as well as its combination values when pressed in conjunction with SHIFT and/or CTRL,or ALT. You can overtype the values shown, or select new values from one of the lists shown near the bottom left of the screen. You can scroll through the values list to find the exact syntax for specifying a function (such as Home, F7, Enter and so on). Not only can you map a key to many values such as Cut and Paste, you can also map a key to execute keystrokes in a saved file. (The saved file is produced by using the PC3270 Record function to record keystrokes and save them into an executable file. See how one tangent can lead to another? The Record function can be used to reduce tedium (and mistakes, and elapsed time) when you are repeatedly executing some testing scenario that always begins with a fixed pattern as a lead-in.) Anyway, after you make changes to the keyboard settings, before you leave the Keyboard Settings screen, you want to click File in the upper left corner and then either select Save to save your changes in the same .kmp file, or select Save As to save the changed keyboard to some new .kmp file .
If you decide to try keyboard mapping, remember while you’re there to map ctrl-C to copy text, ctrl-x to cut text, and ctrl-v to paste text. Also make your life easier by mapping the Page Up key to F7, and the Page Down key to F8. Make yourself PA1 and PA2 keys while you’re at it, specifying those functions as Ctrl or Alt combinations for some other keys. You do remember that PA2 is used to redisplay a scrambled screen, or any screen on which you've overtyped stuff inadvertently, as long as you have not yet pressed the enter key or any other F-key or function key / control key. And you remember that PA1 works like Break or Attn. Anyway . . .
One more thing we want to do here now before we go is to show a quick example of how you set the code page in PC3270.
The process might vary a little from one release of PC3270 to another, so you may have to wing it a little, but it shouldn’t be very much different.
First finish whatever you’re doing on TSO; Exit ISPF and Logoff from TSO; changing the code page is going to cancel and restart your 3270 session.
Go to the dropdown menu at the top of the PC3270 emulation window, and select
And from there select
Click the Session Parameters… selection box
Next scroll through the choices to "1047 United States" (or whatever code page you want to use).
Click OK three times (to the 3 popups you’ll be shown).
Your emulation session will cancel itself and will automatically restart with the code page you selected. You can Logon TSO and go back into ISPF. This would be a good time to browse that ‘SYS1.MACLIB(IARV64)’ to see what the special characters there look like now.
To make your Code Page selection permanent,
Go again to the dropdown menu at the top of the PC3270 emulation window
Until later, then.
*When I've heard people complain about limited capabilities in TSO, it has often turned out that the things they disliked were really just limitations in their (cheap version of) 3270 emulation software. In my own experience, IBM Personal Communications (PC3270) is the only full function emulator I've seen. (I do not work for IBM if you're wondering, and they didn't pay me to say that; it just happens that the IBM product seems to be the best by far that I've seen, and if you are using some other 3270 emulation product that offers less functionality, I recommend you consider trying to get the IBM 3270 emulator. I makes sense, right? The 3270 was itself an IBM product, so wouldn't they know what to put into an emulator? If you're undecided about which 3270 emulation software to get, compare features carefully if you're considering a non-IBM version. I'm guessing that to make best use of your time on TSO you'll want to have a PA2 key, you'll want to be able to click on a url or a "hot spot", you'll want to be able to use CTRL+C for text copy and CTRL+P for paste, you may want to be able to record a long set of keystrokes into an executable macro on the PC, and so on. Just friendly advice.)
For reference, here’s a link to an IBM 3270 emulation manual:
3270 Emulator User’s Reference
Personal Communications for Windows, Version 5.7
Updated 17 April 2016