Date: Tue, 5 Oct 93 16:27:46 EST From: Clark GaylordTo: IR OS/2 subscribers, etc. Subject: Part 3 of n: Clipping from mainframe sessions Now for another in the series of miscellaneous notes about using OS/2. Today, let's look at how to clip text from a mainframe session and print it and save it to a file. The first part of this is either easy or impossible, depending on how you connect to the mainframe. There are two 3270 terminal emulation programs with the current version of TCP/IP: PMANT and TN3270. (Note that some of the information in this document may change slightly, hopefully for the better, when we upgrade our TCP/IP license.) The way to tell which one you use it to look at the icon that you click to get the mainframe. Does it have a terminal with "PM" written on it? If so, you use PMANT. Otherwise, you use TN3270. PMANT: If you use PMANT, then clipping text is very easy -- just drag your mouse over the text you want to clip while holding mouse button 1 (left button). Once the text is selected, you click on Mark -> Copy to clipboard. TN3270: If you use TN3270, there are two ways you can do so: full screen and windowed. Your session is windowed if it runs "on top of" the WPS; you have a title bar, pull down menu (upper left corner), minimize and maximize buttons (upper right corner), and can use the mouse. If you run full screen, TN3270 takes over your screen completely, and therefore you do not have the use of the mouse, and cannot clip text. If you want to clip text from your mainframe session and are using TN3270 fullscreen, you must logoff and login in a window (or PMANT). However, if you are in a window, click (*once*) the button in the upper left corner. This pulls down a menu, one of the items of which is Mark. Click that, and then you can mark text in your window. Hitting enter copies the marked text to the clipboard. The clipboard is a part of system memory used to temporarily store data. You can only store one set of data in the clipboard at a time. If you have data on the clipboard, and copy more data there, the former is wiped in lieu of the latter. To get data off the clipboard, you "paste" it. One natural place to paste text is into an edit session on your PC. After clipping some text from a mainframe session onto the clipboard, open an edit session (Desktop -> OS/2 System -> Productivity -> Standard Editor or Enhanced Editor). Once in your edit session, you can paste by selecting Edit -> Paste. This will insert your clipped text automagically in your edit session. Now save the text to a file; for simplicity, lets save it to your desktop: "C:\Desktop\Clipboard.example" Now you can exit your edit session. Notice that the document appears on your desktop (it may take a few seconds for it to show up; you can expedite it by clicking Refresh on the Desktop menu.) To print the file, pull up its object menu (remember: right mouse button click) and select "Print". If you click "Print" it will send it to your default printer; if you click the little arrow next to "Print", you can select other printers (if you have them -- Lore: this is one way to print to the laserprinter). You will then get a message box asking what type of file this is; choose "Plain Text". Voila. Away it goes. Now, a couple notes. You can also print by dragging your file onto the desired printer object. However, these two methods only work for text files and print image files. Specifically, this is not how you print a Word Perfect document or Lotus 1-2-3 spreadsheet. To print a file of one of these special application specific formats, you need to have the program active and tell it to print the document/spreadsheet/etc. Pasting back to a mainframe session is somewhat dicier. My recommendation is to paste to a file on your PC, and upload the file using FTP. We will discuss transferring files between computers more in the next installment. Enjoy. Clark K. Gaylord Senior Research Analyst Office of Institutional Research and Planning Analysis and Department of Statistics Virginia Polytechnic Institute and State University Blacksburg, Virginia 24061-0433 internet: Clark.Gaylord@vt.edu voice: 703/231-7922 fax: 703/231-7219