Professional Documents
Culture Documents
Scott Klement
TN5250 is an Open-Source emulator that emulates an IBM 5250 compatible terminal over a TCP/IP network. This document is intended to explain the conguration and day-to-day use of the TN5250 emulator in a Windows environment
Table of Contents
1. The Quick-Connect dialog .......................................................................................................................................1 1.1. A quick-start with Quick-Connect .................................................................................................................1 1.2. Giving your terminal a name..........................................................................................................................1 1.3. Options available on the Quick-Connect dialog.............................................................................................1 1.3.1. Host to connect to ..............................................................................................................................1 1.3.2. Device Name......................................................................................................................................2 1.3.3. Use SSL Encryption ..........................................................................................................................2 1.3.4. Verify Servers SSL certicate...........................................................................................................2 1.3.5. Auto-copy, Right-click paste .............................................................................................................2 1.3.6. Char Map ...........................................................................................................................................2 1.3.7. Terminal Size .....................................................................................................................................3 2. Conguring TN5250 with command-line switches ................................................................................................4 3. Creating TN5250 proles .........................................................................................................................................6 4. Printer Support (LP5250D) .....................................................................................................................................8 4.1. What a funny name! .......................................................................................................................................8 4.2. A quick example of running lp5250d.............................................................................................................8 4.3. A more sophisticated example .......................................................................................................................8 4.3.1. Creating the prole for our printer settings .......................................................................................9 4.3.2. Creating a Windows Shortcut for our lp5250d session ...................................................................10 5. Using SSL with TN5250 .........................................................................................................................................11 5.1. Setting up your server...................................................................................................................................11 5.2. Telling TN5250 to use SSL for encryption ..................................................................................................12 5.3. Telling TN5250 to verify the authenticity of your server.............................................................................12 5.4. Conguring TN5250 for client certicates ..................................................................................................13 6. TN5250 Options ......................................................................................................................................................15 6.1. Options processed by the server (Telnet Environment Options)..................................................................15 6.1.1. The DEVNAME (Device Name) option..........................................................................................15 6.1.2. The TERM (Terminal Type) option.................................................................................................15 6.1.3. The KBDTYPE, CODEPAGE and CHARSET (Language) options...............................................16 6.1.4. The USER, IBMSUBSPW, IBMCURLIB, IBMIMENU, IBMPROGRAM (Auto Sign-on) options 16 6.2. Options processed by the TN5250 client .....................................................................................................17 6.2.1. The HOST (host name of server) option .........................................................................................17 6.2.2. The MAP (Character translation map) option .................................................................................19 6.2.3. The RULER (Draw lines to my cursor) option................................................................................20 6.2.4. The VERSION (Display Version and Exit) option..........................................................................20 6.2.5. The PCSPEAKER (Use PC Speaker) option...................................................................................20 6.2.6. The BEEPFILE (Special Beep Sound File) option..........................................................................21 6.2.7. The COPYMODE (Copy To Clipboard Mode) option....................................................................21 6.2.8. The UNIX_LIKE_COPY (Copy/Paste like a Unix xterm) option ..................................................21 6.2.9. The UNIX_SYSREQ (Use Ctrl-C for SysReq) option....................................................................22
iii
6.2.10. The TRACE (create trace le) option............................................................................................22 6.2.11. The FONT_80 and FONT_132 (Font) options..............................................................................23 6.2.12. RESIZE_FONTS (Re-size fonts to match window size) option ...................................................23 6.2.13. BLACK, WHITE, RED, BLUE, ETC (Color) options .................................................................24 6.2.14. BLACK_ON_WHITE and WHITE_ON_BLACK (Color Style) options.....................................25 6.2.15. RULER_COLOR (Rule Line Color) option ..................................................................................26 6.2.16. COLSEP_STYLE (Column Separator Style) option.....................................................................26 6.2.17. CARET_STYLE (Text Cursor Style) option.................................................................................26 7. LP5250D Options ....................................................................................................................................................28 7.1. Options processed by the server (Telnet Environment Options)..................................................................28 7.1.1. The DEVNAME (Device Name) option..........................................................................................28 7.1.2. The IBMMFRTYPMDL (Manufacturer Type & Model) option.....................................................28 7.1.3. The IBMWSCSTNAME & IBMWSCSTLIB (Workstation Customization) option ......................29 7.1.4. The IBMMSGQNAME & IBMMSGQLIB (Message Queue) options...........................................29 7.2. Options processed by the LP5250D client ...................................................................................................30 7.2.1. The VERSION (Display Version and Exit) option..........................................................................30 7.2.2. The HOST (host name of server) option .........................................................................................30 7.2.3. The MAP (Character translation map) option .................................................................................30 7.2.4. The TRACE (create trace le) option..............................................................................................31 7.2.5. The OUTPUTCOMMAND (direct printer output) option ..............................................................31 8. Troubleshooting & Reporting Bugs.......................................................................................................................33 8.1. The bug xing process, and how to get help ................................................................................................33 8.2. Creating a trace le ......................................................................................................................................33 9. Running TN5250 from a network share or oppy disk.......................................................................................35 9.1. Which les are needed for TN5250 to run? .................................................................................................35 9.2. Where do I have to put the les? ..................................................................................................................35 9.3. Utilizing the $loginname$ feature................................................................................................................35
iv
You can also add a "stream type" identier to the beginning of the host name. For example, if I wanted to play back a debugging trace le, I could specify:
debug:C:\tn5250\tracefile.txt
Chapter 1. The Quick-Connect dialog CCSID 37 256 273 277 278 280 284 285 290 297 420 424 500 870 871 875 880 905 1026 Windows encoding windows-1252 windows-1252 windows-1252 windows-1252 windows-1252 windows-1252 windows-1252 windows-1252 JIS_X0201 windows-1252 windows-1256 windows-1255 windows-1252 windows-1250 windows-1252 windows-1253 windows-1251 windows-1254 windows-1254 Description US, Canada, Netherlands, Portugal, Brazil, Australia, New Zealand Netherlands Austria, Germany Denmark, Norway Finland, Sweden Italy Spain, Latin America United Kingdom Katakana Extended France Arabic Hebrew Belgium, Canada, Switzerland Eastern Europe Iceland Greece Cyrillic Turkey - Latin3 Turkey - Latin5
3.
Launch TN5250 by typing the tn5250 command, followed by the name of the host you want to connect to. For example:
C:\Program Files\TN5250>tn5250 AS400.EXAMPLE.COM
4.
Notice that when you do it this way, you dont get the Quick-Connect dialog. So how do you specify a device name? Well, the device name is sent to the AS/400 using the DEVNAME environment option, which we can specify with the "env.DEVNAME" option. So, for example, to connect as DSP51 you might type:
C:\Program Files\TN5250>tn5250 env.DEVNAME=DSP51 AS400.EXAMPLE.COM
5.
You can specify different stream types and ports in your hostname here, too. For example, to connect to port 8992 using an SSL-encrypted stream, you can type:
C:\Program Files\TN5250>tn5250 env.DEVNAME=DSP51 ssl:AS400.EXAMPLE.COM:8992
Its very important that there be no spaces in the middle of a command-line argument. So, typing env.DEVNAME=DSP51 is okay, but typing env.DEVNAME = DSP51 will cause problems. If you do need to put spaces in your options, you should wrap the entire option in quotes. For example, this is perfectly legal:
C:\Program Files\TN5250>tn5250 "font_80=Courier New" as400.example.com
6.
You can use command-line mode in conjunction with the Quick-Connect dialog if you want to specify some options that cannot be given with Quick-Connect. For example, you might type:
C:\Program Files\TN5250>tn5250 +ruler "font_80=Courier New"
Because I did not give a host, above, the Quick-Connect dialog will appear to ask me which host to connect to. In addition to that, however, it will use the Courier New font, and it will draw rule lines to indicate where my cursor is.
Chapter 2. Conguring TN5250 with command-line switches There are many more options available from the command-line in tn5250. See the chapter on OPTIONS for more information. Now, lets suppose that youve gotten tired of typing all of the options that you want to use each time that you start a new session. You can set all of your command-line options in a Windows Shortcut. When you run the short cut, theyll be used automatically. 1. Open up your My Computer icon, and navigate to the directory where you installed TN5250. For example, if you installed TN5250 in C:\Program Files\TN5250, youd rst click My Computer, then C:, then Program Files, and nally TN5250. Right-click the Tn5250.exe icon and select "Copy". Close the My Computer window, and right-click your desktop. Choose "Paste Shortcut" Right click the new shortcut, and select "Rename". Rename it to something easy to remember. I called mine "DSP51". Right click the new shortcut again, and choose "Properties" On the line that says "Target:", add the options that youd like to use. For example, Im setting my Target to look like this:
"c:\Program Files\TN5250\TN5250.EXE" env.DEVNAME=DSP51 ssl:as400.example.com
2. 3. 4. 5. 6.
7. 8.
Click OK to save your changes Now when I double click my DSP51 shortcut on my desktop, it connects to my AS/400 as device DSP51, and gives me a sign-on screen. No more typing all of those options!
5.
Now that youve created this, you can utilize those settings just by typing: tn5250 profile1 Be careful of capitalization. "prole1" is not the same as "Prole1", and thats different from "PROFILE1".
6.
You can set any of tn5250s settings in the tn5250rc le. Heres a more sophisticated example:
profile1 { host = ssl:iseries.sample.com env.DEVNAME=FRED1 env.TERM=IBM-3477-FC font_80=System font_132=Terminal +ssl_verify_server ssl_ca_file=c:\certs\ca\as400_ca.pem trace=c:\windows\temp\profile1-trace.txt } profile2 { host = ssl:as400.example.com env.DEVNAME=DSP51 +ruler env.TERM=IBM-3179-2 map=285 ssl_cert_file=c:\certs\client\fredclient.pem ssl_pem_pass=wilma } printer { host = ssl:as400.example.com env.DEVNAME=PRT01 env.IBMMFRTYPMDL = *HP4
See, I wasnt kidding when I said that would be more sophisticated! This copy of tn5250rc contains 3 different proles called prole1, prole2 and printer respectively. 7. Now, you can run those proles by typing:
C:\Program Files\TN5250>tn5250 profile1 C:\Program Files\TN5250>tn5250 profile2 C:\Program Files\TN5250>lp5250d printer
Tip: You can use proles as arguments when you create a Windows shortcut as well! For example, set the "Target:" in the shortcut properties to:
"C:\Program Files\TN5250\TN5250.EXE" profile1
Just a reminder, youll want to check out the sections containing TN5250 OPTIONS and LP5250D, which show all of the options that you can use.
3.
What should happen when you run that is that lp5250d will connect with your AS/400, and become printer PRT01. When the AS/400 sends a report to PRT01, it will receive the report and send it to whatever printer is your Windows default. With this simple of a set up, every document will just be a plain text representation. It will lose any formatting that your AS/400 might include (such as fonts & graphics) and may not even be sophisticated enough to work with some printers.
Chapter 4. Printer Support (LP5250D) these settings in a prole in our tn5250rc le, and create a shortcut for the printer. Are you ready? (why do I ask these things?)
3.
Add a new prole onto the end. For our example, well create an entry for Hewlett Packard LaserJet 4 printer. So, Im going to call the prole "hp"
hp { host = as400.example.com env.DEVNAME = PRT04 env.IBMMFRTYPMDL = *HP4 env.IBMMSGQNAME = DSP51 env.IBMMSGQLIB = *LIBL map = 37 }
This is the hostname that lp5250d will connect to. You can prex this with "ssl:" if you wish to encrypt your session, or sufx it with a ":123" to select an alternate port number, just as you can in tn5250! This is the name that the AS/400 will use when creating its device description and its output queue. It should be noted that this is just a suggestion to the AS/400. It could decide to reject this name, or ignore it, or assign you a different name, depending on how your AS/400 is congured.
This asks the AS/400 to use its "Host Print Transform" function to convert the spooled les to our printers native language. For our example, weve used the *HP4 option to tell the AS/400 to put the document in the language used by Hewlett Packard LaserJet 4 printers For a list of possible values for this parameter, you should log on your your AS/400, and prompt the CRTDEVPRT command. Any value allowed for the MFRTYPMDL parm of the CRTDEVPRT command can be specied here.
This is the message queue that messages for this printer will be sent to. In our example, we are sending the printer messages to the workstation message queue for the DSP51 display This is where you specify the library of the message queue. In our example, we are using the library list to locate the message queue. This is equivalent to the "Char Map" option that was described in the "Quick-Connect" options for TN5250. It species the CCSID that you need to use. In our example, we are using a CCSID of 37. This is the correct value for the United States, as well as several other countries.
Chapter 4. Printer Support (LP5250D) 4. 5. Save your changes to the tn5250rc le, and exit back to the MS-DOS prompt. You can now run lp5250d from the MS-DOS prompt like this:
C:\Program Files\TN5250>lp5250d hp
8. 9.
Click the OK button to save your changes. To test it out, double-click on the PRT04 icon!
10
Digital Certicate Manager, option 34 of OS/400 (5769-SS1) IBM HTTP Server for AS/400 (5769-DG1) IBM Cryptographic Access Provider (5769-ACx or 5649-ACx)
The rst two options are included on your OS/400 CDs. The Cryptographic Access Provider must be ordered from IBM, and you may get a different option, depending on the laws in your country regarding encryption, and the model of AS/400 you have. At the time of this writing, IBM supplies the C.A.P. at no charge. If youre given a choice, youll want to install 5769-AC3, as it has the best cryptography. 2. Start the HTTP *ADMIN server in order to congure your Digital Certicate Manager. From the AS/400, type:
STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN)
3. 4. 5. 6.
With a web browser, connect to your AS/400s admin server: http://as400.example.com:2001 Click "Digital Certicate Manager", then "Certicate Authority (CA)" then "Create a Certicate Authority." Fill out the forms, etc. Click "System Certicates". IF you havent done so already, click "Create new certicate store" and follow the prompts for creating the *SYSTEM certicate store. Select "Work With Secure Applications". Select "QIBM_QTV_TELNET_SERVER", then click the "Work with system certicate" button. It should tell you that your telnet server has your system certicate assigned to it. IF not, you can assign it here. Now you have to start your telnet server on the AS/400. If it is already running, youll have to end it, and start it again.
7.
11
8.
Now, verify that your SSL-enabled Telnet server is running. on the AS/400, type NETSTAT *CNN. Press F14 to display the port numbers. Look for a server thats in "Listen" state on port 992. This is the SSL telnet server.
If you have problems, or need more detailed information on how to set up the TELNET-SSL server on the AS/400, see the TCP/IP conguration area of the iSeries Information Center. Heres a link to the TELNET section of the Information Center online: http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/RZAIWGETSTART.HTM Click "Telnet server and SSL" to get started.
Or, if youre using the "Quick-Connect" dialog when you start tn5250, check the "Use SSL Encryption" box. At this point, the data that you exchange with the AS/400 is being done using an encrypted channel. However, no authentication is being done!
2. 3.
Connect to the Admin server with a web browser: http://as400.example.com:2001 Click "Digital Certicate Manager", then "Certicate Authority (CA)" then "Install CA certicate on your PC", then click "Copy and paste certicate"
12
Chapter 5. Using SSL with TN5250 4. Highlight the certicate that is displayed with your mouse. Make sure that you include the "----BEGIN CERTIFICATE-----" and the "----END CERTIFICATE-----" in the selection. Then choose "Copy" from your web browsers Edit menu. Open a utility such as Notepad and paste the certicate into it. Then save the document as C:\Program Files\TN5250\as400_ca.txt (or, if you like, some other name) Add the "ssl_ca_le" option to your tn5250rc le, so that TN5250 knows where the AS/400s certicate is. Heres an example prole:
ssltest { host = ssl:as400.example.com env.DEVNAME = SSL1 +ssl_verify_server ssl_ca_file = C:\Program Files\TN5250\as400_ca.txt }
5. 6.
7.
The +ssl_verify_server keyword tells TN5250 that you want it to verify the authenticity of your AS/400. The ssl_ca_le keyword must point to the certicate that you just downloaded from the AS/400.
2. 3.
Connect to the Admin server with a web browser (I used Netscape Navigator 4.77 in my tests and I do not know exactly how youd do it with a different browser, so good luck...) http://as400.example.com:2001 Click "Digital Certicate Manager", then "Certicate Authority (CA)" then "Install CA certicate on your PC", then click "Receive certicate"
13
Chapter 5. Using SSL with TN5250 4. 5. 6. 7. 8. 9. Netscape brings up the "New Certicate Authority" wizard. Follow the prompts, until you can nally click "Finish". Click "User Certicates", then "Request a new user certicate", Fill out the form and click OK. Netscape brings up the "Generate A Private Key" wizard. Follow the prompts. The password you assign it is only temporary, but you should assign it one. Maybe "tn5250" is a good password. After lling out your password, and waiting a second or two, you should come to a screen that says "User Certicate Created Successfully". Click "Receive Certicate". The certicate should be downloaded into your web browser. It may not tell you that it did anything, so dont be surprised if nothing seems to happen. On the Netscape "Navigation Toolbar" click the "Security" button. (This is the button that looks like a padlock). Then under "Certicates", click on "Yours".
10. The certicate that you just generated should appear, along with any other private-key certcates that you have in your browser. Highlight the cert that you just generated, and click "Export". 11. It asks for a password. Type the password that you used in step 6. 12. It asks for a new password. Type the same password again. Then type it one more time to verify it. :) 13. Save the exported certicate to a le called "tn5250.p12" It will tell you that the certicate has been successfully exported. Good work! 14. Unfortunately, Netscape likes to save the certicate in pkcs12 format, which doesnt do us much good. We need it in PEM format! Back at your MS-DOS prompt type:
C:\Program Files\TN5250>openssl pkcs12 -clcerts -in tn5250.p12 -out tn5250.pem
15. It asks for the "Import Password". This is the same password that you assigned it in Step 12. 16. It says "Enter PEM pass phrase". This is, yet another, password. However, this is the important one that you will be using from this point on. You might want to write it down. 17. Now, nally, to tell tn5250 to use this certicate that you just received, use the ssl_cert_le keyword. Youll also need a PEM passphrase, (this is the password that you typed in Step 16) which you can specify with the ssl_pem_pass keyword. Heres an example:
ssltest { host = ssl:as400.example.com env.DEVNAME = SSL1 +ssl_verify_server ssl_ca_file = C:\Program Files\TN5250\as400_ca.txt ssl_cert_file=C:\Program Files\TN5250\tn5250.pem ssl_pem_pass=tn5250 }
14
Whenever TN5250 is given an option that begins with env., it will send it to the AS/400 without interpreting its value. So, if IBM ever adds more options, you can specify them without needing to upgrade your copy of TN5250
Note: A special feature of TN5250 allows you to place your Windows login name into the device name of your session. Heres an example:
C:\Program Files\TN5250>tn5250 env.DEVNAME=$loginname$S1 as400.example.com
If you signed on to your Windows session as "MATT", the name sent to the AS/400 would be "MATTS1", but if JANE were signed on to the Windows machine, it would instead send "JANES1".
15
Terminal Type IBM-3477-FC IBM-3477-FG IBM-3180-2 IBM-3179-2 IBM-3196-A1 IBM-5292-2 IBM-5291-1 IBM-5251-11 Example:
Description 27x132-capable color 27x132-capable mono 27x132-capable mono 24x80-capable color 24x80-capable mono 24x80-capable color 24x80-capable mono 24x80-capable mono
Default Yes
Yes
Example:
profile1 { host = as400.example.com env.DEVNAME = DSP07 map = 273 env.KBDTYPE = AGB env.CHARSET = 697 env.CODEPAGE = 273 }
16
6.1.4. The USER, IBMSUBSPW, IBMCURLIB, IBMIMENU, IBMPROGRAM (Auto Sign-on) options
These options can be used to specify your User-ID and Password, and optionally your Current Library, Initial Menu and Program/Procedure (respectively) so that you can bypass the initial sign-on screen.
Note: TN5250 does not currently support using IBMSUBSPW (substitution password) with the IBM substitution password encryption scheme. (You can only use it for unencrypted passwords) If you wish your password to be protected from spying by 3rd parties, we recommend using SSL.
Example:
autosignon { host = as400.example.com env.DEVNAME = DSP01 env.USER = my-user-id env.IBMSUBSPW = my-password } automenu { host = as400.example.com env.DEVNAME = DSP01 env.USER = my-user-id env.IBMSUBSPW = my-password env.IBMCURLIB = QSYS env.IBMIMENU = CMDDSP env.IBMPROGRAM = *NONE }
Important: There are some security risks involved in placing your password in a text le on your PC. Anyone who can get access to your hard drive can then proceed to use your AS/400 account. If you decide to use this option, make sure that it does not violate your companys security policies
17
Note: The host keyword is the only manditory option when running TN5250. All other keywords are optional. Therefore, if the host keyword is not specied, TN5250 will open up the "Quick-Connect" dialog to nd out which host you wanted.
The host= keyword is only specied when you are creating a tn5250rc prole. When you are specifying the host at the command-line, you omit the "host=" part, and always put the hostname at the end of the command line. The STREAM-TYPE is optional. If not given, the default value is "telnet:" The possible values for STREAM-TYPE are: Stream-Type telnet: tn5250: ssl: telnets: debug: Description The 5250 data is sent over the standard TCP/IP telnet protocol. This is an alias for "telnet" The 5250 data is sent over an SSL-encrypted TCP/IP telnet session. This is an alias for "ssl" Stream data is read from a trace le.
Note: For more information on the debug: stream, see the "The TRACE (create trace le) option" and the section on "Troubleshooting"
This is the name or IP address of the AS/400 youre connecting to. If you are using the "debug:" stream type, this is where you specify the name of the trace le. This is the TCP/IP port number that TN5250 will attempt to use to connect to the AS/400s telnet server. If this option is not specied, TN5250 will use port 23 for the telnet: stream type, or 992 for the ssl: stream type
Command-line Examples:
C:\Program C:\Program C:\Program C:\Program C:\Program Files\TN5250>tn5250 Files\TN5250>tn5250 Files\TN5250>tn5250 Files\TN5250>tn5250 Files\TN5250>tn5250 as400.example.com telnet:devel.example.com ssl:iseries.sample.org telnet:donut.tasty.net:8023 trace=C:\debug.txt ssl:iseries.example.org:1234
18
19
Chapter 6. TN5250 Options CCSID 280 284 285 290 297 420 424 500 870 871 875 880 905 1026 Example:
C:\Program Files\TN5250>tn5250 map=880 as400.moscow.ru
Windows encoding windows-1252 windows-1252 windows-1252 JIS_X0201 windows-1252 windows-1256 windows-1255 windows-1252 windows-1250 windows-1252 windows-1253 windows-1251 windows-1254 windows-1254
Description Italy Spain, Latin America United Kingdom Katakana Extended France Arabic Hebrew Belgium, Canada, Switzerland Eastern Europe Iceland Greece Cyrillic Turkey - Latin3 Turkey - Latin5
20
Tip: This mode can be useful when youre writing documenation. Try setting the copymode to bitmap (as shown above) and logging on to your AS/400. Then, highlight the screen and copy it to the clipboard. Now, open up Microsoft Word in another window. In Word, press Ctrl-V to paste the clipboard. Presto! A perfect image of the screen in your Word document.
21
Chapter 6. TN5250 Options In addition, you can paste text into the emulator by right-clicking in the TN5250 window, instead of pressing Ctrl-V or clicking EDIT/PASTE This is similar to the way text is copied/pasted on Unix systems. One difference, however, is that Unix uses the middle mouse button to paste, instead of the right mouse button. Unfortunately, its harder to access the middle button in Windows, so I used the right-button. Example:
C:\Program Files\TN5250>tn5250 +unix_like_copy as400.example.com
Example:
C:\Program Files\TN5250>tn5250 +unix_sysreq as400.example.com
Example:
C:\Program Files\TN5250>tn5250 trace=C:\debug.txt as400.here.net
22
Chapter 6. TN5250 Options See the section entitled "Troubleshooting & Reporting Bugs" for more information on trace les and getting support.
This is the name of the font to use. Its important to use a font that has a xed-width. A proportionally spaced font (which are very popular with Windows currently) will yield strange-looking results. Here (instead of the letter W) you type the width of the font. If you specify a width that does not exist, Windows will pick the closest width that it can nd. You do not have to specify a width. Here (instead of the letter H) you type the height of the font. If you specify a height that does not exist, Windows will pick the closest height that it can nd. You do not have to specify a height.
Examples:
C:\Program Files\TN5250>tn5250 font_80=System as400.example.com C:\Program Files\TN5250>tn5250 font_80=Terminal-10x6 as400.example.com fonttest { host = as400.example.com env.TERM=IBM-3477-FC font_80=Terminal-10x6 font_132=System env.DEVNAME=DSP01 }
23
Note: Most fonts can only be displayed at specic sizes. If your screen is set to a size that doesnt exist, TN5250 will let Windows pick the next closest size. If this doesnt give you satisfactory results, try setting a different font with the font_80 and font_132 keywords.
Each color can be re-mapped by setting the corresponding 5250 color keyword to a new color. To specify a color, you give a hexidecimal color code in this format:
5250 color name = #rr gg bb
The 5250 color name to re-map. (The color sent by the AS/400) The red component of the color to display. This must be a 2-digit hexidecimal number from 00 - FF The green component of the color to display. This must be a 2-digit hexidecimal number from 00 - FF The blue component of the color to display. This must be a 2-digit hexidecimal number from 00 - FF
In addition to specifying the color as a hexidecimal Red Green Blue (RGB) number, TN5250 will also accept the following symbolic names: Color Name white yellow lightmagenta Hex Color Code #FFFFF0 #00FF00 #FF00FF
24
Chapter 6. TN5250 Options Color Name lightred lightcyan lightgreen lightblue lightgray gray brown red cyan green blue black Hex Color Code #FF0000 #00FFFF #00FF00 #0000FF #808080 #C0C0C0 #808000 #800000 #008080 #008000 #000080 #000080
For example, perhaps most of your TN5250 session normally displays as green. Now youre tired of green, and would like a nice bright magenta instead, youd specify:
C:\Program Files\TN5250>tn5250 green=#FF0000 as400.example.com
or:
C:\Program Files\TN5250>tn5250 green=lightmagenta as400.example.com
Note: The +black_on_white setting is equivalent to setting the black 5250 color to be displayed as white in TN5250, and setting all of the other 5250 colors to be displayed as black.
Note: The +white_on_black setting is equivalent to setting the black 5250 color to be displayed normally in TN5250, and setting all of the other 5250 colors to be displayed as white.
25
Tip: The +black_on_white setting is very useful when you plan to make screen captures that you want to insert into your documentation. It works especially well when combined with the copymode=bitmap option!
Description (default) A vertical line is drawn between each character dots are drawn to the left and below each character No column separators are drawn
26
27
Whenever LP5250D is given an option that begins with env., it will send it to the AS/400 without interpreting its value. So, if IBM ever adds more options, you can specify them without needing to upgrade your copy of TN5250
28
Examples:
printtest { host = as400.example.com env.DEVNAME=PRT02 env.IBMMFRTYPMDL = *HP4 } plaintext { host = as400.example.com env.DEVNAME=PRT02 env.IBMMFRTYPMDL = *WSCST env.IBMWSCSTNAME = QWPDEFAULT env.IBMWSCSTLIB = *LIBL }
29
Example:
C:\Program Files\TN5250>lp5250d env.DEVNAME=PRT01 ssl:as400.example.com
30
Example:
C:\Program Files\TN5250>lp5250d trace=C:\debug.txt as400.here.net
See the section entitled "Troubleshooting & Reporting Bugs" for more information on trace les and getting support.
The output type species the type of device that the data from the AS/400 will be written to. The possible output types are "le:" and "printer:"
This signies either the lename that you wish to write the output to, or the printer name that you wish to print the output on.
Examples:
printer { host = ssl:as400.somewhere.net env.DEVNAME = PRT11 outputcommand = file:C:\printouts\report.txt } printer2 { host = ssl:as400.example.com env.DEVNAME = P1 outputcommand = printer:Canon BJC-620 }
31
Tip: The printer name must exactly match the name that Windows knows your printer by. If you open up the My Computer icon, and then select "Printers", you can get a list of which printers are congured.
Important: This option may change, as some of the developers are not completely satised by the way that it works.
32
Currently, all support for this project is handled by E-mail. Keep in mind that all of the developers have full time jobs that are not related to maintaining this emulator. We simply cant provide you with a phone number to call for support. Having said that, however, most of the bugs reported to the mailing list are xed promptly. (Usually within one week.) and questions are answered even more promptly. (Usually within one day.)
33
Chapter 8. Troubleshooting & Reporting Bugs Then, youll want to use the emulator to reproduce the bug that is causing problems for you. Just do whatever it takes to make the bug manifest itself, and then sign off and exit the emulator. Now that your session has been logged to the trace le, you can re-play that session by typing:
C:\Program Files\TN5250>tn5250 debug:tracefile.txt
When you do this, the emulator will start up again, but this time you wont actually be connected to your AS/400. Instead, you will be re-playing the trace le. While the trace le is playing, each time you press a key, the emulator will do the next "event" that happened during the session that you traced. If you keep pressing a key, the session will play back, much like youre watching a movie.
Note: FIXME: Is that clear?
When you send the trace le to the developer, he will also be able to step through your session, and see exactly what you saw when things went wrong. The trace le is just an ordinary ASCII text le. You can view it on your system in any text editor. For example, if you wanted to look at it in the MS-DOS editor, you might type:
C:\Program Files\TN5250>edit tracefile.txt
However, unless youre a developer, the contents of this le probably wont be very helpful to you. (Still, it might be worth looking at!)
Important: Please dont ever send a trace le to the Linux5250 mailing list. Trace les can be large, and the mailing list is read by a lot of people. When a developer needs you to send him a tracele, please send it to the developer directly!
Important: Trace les log everything that happens during your session, including your user name and password. For this reason, it is a good idea to change your password after youve created a trace le.
34
is necessary if you want to do terminal emulation. is necessary if you want to have printer support.
lp5250d.exe
This documentation.
When Windows loads tn5250.exe or lp5250d.exe, it has to be able to nd the lib5250.dll le. It does this by rst looking in your "current directory", and then if its not found, it searches your PATH Therefore, you can copy everything to a oppy, and run it from the oppy, just as long as you switch your current directory to the oppy drive before starting tn5250.exe
When you run tn5250 or lp5250d and try to use a conguration prole, tn5250 will look for the tn5250rc in the same directory that tn5250.exe is in.
35
Chapter 9. Running TN5250 from a network share or oppy disk This is particularly useful when running TN5250 from a network share because you can use it to set a different device name for each user, while still having only one tn5250rc le. For example, you might use this prole:
userdisplay { env.DEVNAME = $loginname$S1 host = as400.example.com }
This way, each user gets their own device ID when they connect.
36