In client/server computing, the client requests a service, and the server performs the request. Client Access/400 (CA/400) evolved from PC Support/400 in response to the demand for a more robust, seamless client/server configuration. The CA/400 servers include the original PC Support/400 servers and the new optimized CA/400 servers.
The IBM CA/400 offering provides an extremely robust suite of client/server tools for connecting your AS/400 to PCs. CA/400 enables end users and application programmers to maximize data integration and to leverage applications and resources across an entire enterprise. It includes support for several industry standards, including ODBC, messaging application program interface (MAPI), and a growing list of third-party add-ons. The features of CA/400 as shipped from IBM include file transfer, API capabilities, a GUI interface, network printing, and PC5250 emulation, which is the focus of this article (see the AS/400 Client Access Family of Products for a good overview of CA/400).
PC5250 emulation not only gives your users a familiar interface to the AS/400 but also vastly extends the functionality of the "green-screen" environment. Unlike the GUI interface, the PC5250 screens allow the user to perform tasks as they normally would on a regular dumb terminal, without having to learn any new tricks. PC5250 allows users to interact easily and transparently with AS/400 data and applications, yet it provides many of the benefits of the GUI- type interfaces. You can take advantage of CA/400's powerful tools to customize the display and keyboard and to provide an almost limitless number of new functions that can be accessed through a variety of methods. I used CA/400 version 3, release 1, modification level 2 (V3R1M2) for this article. IBM recently released a beta version of CA/400 V3R1M3. This new beta includes many new wizards and other enhancements. It's available for downloading at the AS/400 homepage (www.as400.com).
In this article, I'll give you a brief overview of the components of CA/400, point you to the easiest connection method, and explore the PC5250 functional environment in depth. Specifically, I'll show you how to create a colorful, productive work environment, using the
menus and options supplied with a PC5250 session.
CA/400 is a complex subject with some very intriguing (but difficult to master) concepts.
The menu bar at the top of the PC5250 session allows access to most of the commands available in CA/400. The File menu bar option uses Windows 95 standards to allow functions such as open, save, save as, and printer setup. An additional File command that involves API settings details the emulation high-level language application programming interface (EHLLAPI) and Dynamic Data Exchange (DDE) commands, which are far beyond the scope of this article.
The Edit menu bar commands also mirror Windows 95 standards, with cut, copy, paste, and clear. The Transfer menu bar command allows you to configure file transfers to and from the host. A Communication menu bar command allows connection options. Help and Window menu bar commands again follow Windows 95 standards. This article will describe the Appearance and Assist menu bar commands in detail. These are the options that allow customization of all aspects of the PC5250 session.
To start a PC5250 session, you must first install the CA/400 licensed programs on your AS/400 and any PCs you're going to use for emulation. You can use Windows 3.1, OS/2, DOS, or Windows 95/NT for a PC operating system. I'll be talking about Windows 95 in this article. The best book that I've found for installation instructions (for Windows 95) is the Redbook Inside AS/400 Client Access for Windows 95, which is referenced at the end of this article.
I use TCP/IP for a protocol, but there are a number of other options, including NetSoft NS/Router, IPX/SPX, and Microsoft SNA Server. Wizards walk you through connection steps for all protocols. Once you have your connection set up, right-click the connection icon, and choose 5250 display emulation for your connection type (otherwise, the session may default to a graphical mode). Now, you can open the session through the connection drop-down menu (CA/400 provides support for as many as 26 concurrent display and printer sessions; use the Window menu bar to jump between sessions).
Once you establish a PC5250 connection, you're ready to start creating a unique work environment. You can configure sessions for your users or allow them to configure their own sessions. Or you can just accept all of the IBM defaults and go with a straight vanilla environment. This option still gives you plenty of features that aren't available on a dumb terminal, but if you want to supercharge productivity and add some zip to your display, CA/400 gives you more than enough tools to create a unique and powerful working environment.
As a 5250 artist, you must choose a style and general presentation for your creation. Once you've established a PC5250 session, click on the Appearance menu bar command. This initiates a drop- down menu (Figure 1) that allows you to customize the presentation and functionality of the session. Clicking on the first item, Display Setup, brings up a window (Figure 2) that presents some general screen characteristics that you can use to customize a display.
First, you'll want to decide how the cursor appears (similar to a regular 5250 session). The default shape of the cursor is underline, but I prefer the block cursor; it's easier to see, and it won't disappear when it sits on a line. I also prefer to have the cursor blink, even though the default is no blinking. The second display option allows you to configure the mouse pointer as a cross or an arrow. The default is an arrow, and I always keep it this way. The third display option
configures your rule line. The default for the rule line is off, which I usually keep, but you may decide to have a rule line, in which case you can display a horizontal, vertical, or crosshair rule and have it follow the cursor if you want. This may come in handy for text editing, especially if a user's eyesight is poor. The fourth display option allows you to set up the behavior of the trimming (editing) rectangle on the screen. Your can set the sizing handle and decide whether you want it to remain on the screen after an editing operation. I usually leave the default of no, since the sizing handle is useful only when there's a lot of editing to do.
The remaining display options deal with sound, column separators, and the color palette. I always go with the defaults, but you may want to turn off the alarm, change the shape of the column separator, or use the IBM custom color palette for text, although I've found no reason to change this setting. (The color palette is dependent on the type of video you're using.) There is one other display option, but it's used for double-byte character set (DBCS) keyboards only, so it has no meaning for those of us using English.
Now that you've decided on the general appearance of your PC5250 session, you can add some pizzazz to your session by using the second Appearance command: Color Mapping. Click on this command, and you'll be presented with a window like the one shown in Figure 3 so that you can exert your artistic creativity by adding color to your session.
You can change colors using two methods. You can drag the color indicator to the preferred color with your mouse, or you can right-click the color desired and, holding the right mouse button down, drag the color to the part of the screen you want to color and release the mouse button to drop it. This is the easy way to change colors; nudging the color bar is a more delicate operation.
You can change the default field colors, the different indicator colors, the divider line colors, and the screen colors. In fact, you can change the color of virtually every part of your screen. Background and foreground colors are differentiated if applicable. Use color mapping to create a pleasing presentation, but don't overdo it. A riot of colors may be great for impressionists, but a typical user may not appreciate an overabundance of contrasting hues.
The third command on the Appearance menu (Figure 1) allows you to change the screen font within prescribed limits. You can't use the Font command if the display is maximized; you need to minimize the session, change the font, then remaximize it. You can choose whether the font will be automatically sized or will be a fixed size. You can choose the type and size of the font you want. Some fonts allow bold or italicized letters. I've found this command to be of limited value, but a large, bold font can increase readability for those with eyesight problems.
The fourth Appearance command, Window Setup, is shown in Figure 4. This command controls the appearance of the menu bar, scroll bar, window title, and icons. You can display all elements of the session in the window title or blank the whole title (I display most elements). You can name your session with something meaningful or leave the default, PCSWS. You can change the title and style of the icon that is displayed on the taskbar. If you have a number of sessions opened, it may be important to have different icons and descriptions to differentiate between the sessions. CA/400 supplies many icons from which to choose (but if you feel creative, you can create your own icon using a paint application). Clicking on Change Icon allows you to either highlight the icon you want to use or click Browse, which allows you to find the icon that you
want to represent the session when it's minimized (icon files have an extension of .ico). If you happen to turn off the menu bar in this window and can't remember how to get it back, don't despair. You can right-click on the session icon on the taskbar. This gives you the option to either show the menu bar or display the pop-up menu bar, where you can turn the menu bar back on.
Before I go on to the subject of the tool bar, I'd like to introduce you to the concept of macros. Since macros (as well as many other functions) can be executed from the tool bar, it's important to understand their use and implementation. Macros are usually created from the Assist drop- down menu on the menu bar (Figure 5). The final commands on the Assist menu (and probably the most important) are the Macro Setup, Start Recording Macro, and Start Playing Macro options.
Macros are really little programs that can be used for all kinds of simple tasks. In their simplest form, they are merely records of keystrokes, similar to the record and play functions of a 5250 keyboard. Macros can be assigned to keys, the pop-up keypad, the mouse, or hot spots. You can also configure an auto-start macro that is executed automatically when a session is started.
First, you'll want to record some simple, yet functional, macros. Click the Start Recording Macro option. Name your macro file (the extension is .mac), give it a description, and click OK. CA/400 will record every keystroke you press until you click Cancel Recording Macro, Pause Recording Macro, or Stop Recording Macro. If you cancel the macro, it will be lost. If you pause a recording macro, you may continue recording it later. If you stop recording, it will be saved just as you keyed it. Typed strings are prefixed with a double quote. For example, if you record the Work with Objects (WRKOBJ) command, it will appear as "wrkobj *all" in the macro. Unfortunately, CA/400 does not recognize mouse clicks when recording a macro. This would be a nice feature; we can only hope that IBM will add it in the future.
Besides recording keystrokes, macro statements can be used almost like a separate computer language. You can call macros from within a macro, use wait conditions, branch within a macro, or call PC applications from within a macro. The CA/400 help text gives a good explanation of macro commands. The Client Access/400 PC5250 User's Guide V3 also explains macros in detail.
After you've recorded some macros, click the Macro Setup command on the Assist menu. This shows a list of available macros, with the current auto-start macro at the top (Figure 6). The most useful auto-start macro is a sign-on macro, but if you do configure this type of macro, make sure you force the user to enter a password that is not displayed on the screen.
The Macro Setup command allows you to customize existing macros and create new macros by directly keying in commands. The way CA/400 displays macros is somewhat confusing, because it always defaults to the auto-start macro you configured. Just remember that the Macro Setup command is merely a way of accessing, changing, and creating macros. If you select a macro from Figure 6 and press the Customize button, you'll be presented with a window similar to Figure 7. This display shows you the macro that's selected (in this case, a macro to vary on one of my lines), but you can open another macro or create a new macro through the File menu, which behaves like all Windows 95 file menus. After you select a macro, you can add statements, strings, functions, or other macros to it. Use the Edit menu like any Windows 95 edit
menu to cut, paste, or copy commands. After you're done, save the macro as you would any Windows 95 object.
You can also create macros through word processing applications like Notepad. You'd create it with an extension of .mac and probably save it to the Client Access folder. If you're really proficient with macros, you may prefer this method of creation. As you'll see, macros can be executed from a number of functions and can really enhance user productivity.
The last Appearance option controls the functions and style of the toolbar (Figure 1 includes the toolbar menu). Like all CA/400 functions, you can leave the default Tool Bar, which includes all functions needed for most occasions. You can, however, easily add some powerful functions to it through a drag-and-drop method.
Figure 8 shows the Tool Bar Setup window. You can add functions by right-clicking on the top bar and dragging the function to the current bar. Keystrokes, macros, pop-up keypads, spacers, and CA/400 commands can be added to the toolbar in this fashion. To remove items from the toolbar, you can right-click and drag them from the current toolbar to the Delete icon.
When you add an item to the toolbar or drag a current item to the edit button, a window similar to the one in Figure 9 appears. In this case, I dragged the send icon to the edit button. You'll notice that the send button is pressed, indicating that this is the item being customized.
The Visual window appears when you click on the Visual button. This window allows you to change the text, description, and appearance of the toolbar item. CA/400 supplies a default icon for each item, but you can edit the graphic or create your own graphic by left-clicking the appropriate button on the visual window. Because I removed the check from the Default box, a crosshatch pattern has replaced the icon, and the Load File, Edit, Create, and Delete options are available. If you remove the default check mark, you can left-click on the Create or Edit button to start the PAINT program (supplied with Windows 95) with which you can draw your own graphic for the toolbar. If you already have a bitmap in another directory, you can use the Load button to retrieve it. You may never use this, but you should be aware that you can change the toolbar graphics if you want to.
The Tool Bar Styles window (Figure 10) controls the general appearance (such as color, font, size, and text options) of the toolbar items. You can also control the pop-up descriptions that appear when the mouse passes over the toolbar item. As you can see, CA/400 gives you complete control of all aspects of the toolbar. If you do change the defaults, you can use the Save command from the Tool Bar menu to save the configuration (CA/400 allows you to save a number of its elements as well as the overall session). The saved file has a file extension of .bar and can reside in any directory you choose. Once you've saved the toolbar configuration, you can load it to a different session or use the Load command on the same menu to restore it to the same session.
CA/400 allows customization of both the keyboard and the pop-up keypad (the keypad is accessed by right-clicking anywhere in the PC5250 screen). To customize the keyboard or keypad, use the Assist menu bar option shown in Figure 5. The Keyboard/Macro command allows you to execute a selected macro or function without using the keyboard. It is executed at the current cursor position-regardless of whether it has an existing key assignment.
The next Assist command performs the same action as right-clicking in the display: It displays the Popup Keypad. This seems redundant, and it's easier to right-click in the display. But IBM has provided it in this menu for some reason.
The Keyboard Setup command appears next on the Assist menu and allows you to choose the keyboard layout (United States, in this case), the keyboard buffering options, and the keyboard file name if you're not using the IBM default. You can customize your own version of the keyboard by left-clicking the Customize button. This brings up a screen like the one in Figure 11.
Here, you can assign macros, functions, or characters to any key or combination of keystroke and action (Shift, Ctrl, Alt, etc.). For instance, if you don't like the position of the Enter key, you can change it to correspond to the key that you're familiar with by choosing Enter as the function, left-clicking the key you want, and clicking the button to the left of base.
Macros can be assigned to a key the same way, after choosing a macro from the list provided. The Actions menu helps find, copy, or swap key assignments. As with the toolbar, you can save your keyboard configuration for future use. After you've set up the keyboard the way you desire it, use the Save or Save as... function from the File menu to save the configuration. Keyboard files have an extension of .kmp and, like all CA/400 files, can be saved either in the Client Access directory or in a directory of your choice.
The Popup Keypad Setup command shown in Figure 5 brings up a window similar to the Keyboard Setup window. Here, you define the pop-up keypad used in this session. You can browse for an existing keypad configuration if you don't want to use the IBM default. You also use this window to configure the pop-up keypad as "sticky," meaning that it will remain on the display until you explicitly close it.
When you left-click the Customize button, you're presented with a window like the one in Figure
12. Here, you change the color (click the Actions menu bar command), functions, and size of the pop-up keypad. There are four pads available. You can configure the pads to have up to 64 actions each. I've configured this pop-up keypad for 12 actions. The actions can be a mix of functions, macros, or characters. I configured my pop-up keypad to include most of the commonly used AS/400 commands, like Work with System Status (WRKSYSTS), Work with Active Jobs (WRKACTJOB), and Work with Submitted Jobs (WRKSBMJOB). Lots of functionality is just a mouse-click away if you properly configure the pop-up keypads. Figure 13 shows my example pop-up keypad, which uses a combination of macros, functions, and keystrokes. Use the Save options as previously mentioned to save the configuration (the file extension is .pmp), just as you did with the toolbar and the keyboard.
Hot Spot Setup is the next command available on the assist menu. A hot spot is an area of the workstation window in which you left-click to execute a command or function. (Obviously, you must use a mouse to activate hot spots.) Hot spots provide a way of bypassing the keyboard. The default enables command key hot spots. You can left double-click a command key function with the mouse, and it will immediately be performed. You can also configure hot spots to execute a macro that has the same name as the word you click, execute a selected word, or act as if the Enter key were pressed. For instance, if you have a macro defined as "work" and have the Point- and-select box checked, you can click on any string spelling work on the screen to execute the macro. Hotspots are great if you like using the mouse better than the keyboard.
Mouse Setup is the next Assist command. Choose this function to customize the mouse buttons to perform a function or execute a macro. You can also assign characters to mouse buttons. Since Client Access/400 gives you the option to customize only two mouse buttons, this is obviously of limited value, but you may find a use for this option. You can save the mouse file using the file menu (with extension of .mmp).
Now that you've put all this work into configuring and saving the different elements of the PC5250 session, how are you going to save the whole thing for a user to access? Click the File menu on the menu bar. Select Save as... and choose a meaningful name (the file extension is
.ws). If you want the session to be displayed in the Client Access program folder, save the file to the Client Access directory. Click OK. A message box appears with the following text: PCSWS022 - do you want to add an icon for this session to a folder? Click yes, and an icon will be added to the folder you have chosen-in this case, the Client Access folder. Now, when the Client Access folder is opened, an icon representing this customized PC5250 session will appear. The icon and text come from the icon you specified under the Appearance option in Window Setup.
You can create as many different sessions as you like and put them in the folders you desire. Make sure that the text is descriptive, and use unique icons to indicate different sessions. For all the latest information on CA/400, visit the AS/400 Client Access home page at http://www.as400.ibm.com/client/cahome.htm. Here, you can find feature articles, announcements, abstracts, service packs, and lots of tips.
Give your users extra power and a stimulating environment. Be a PC5250 Rembrandt, and you'll have some satisfied customers.
D. Ellis Green is a technical editor at Midrange Computing. He has over 14 years experience programming medical, manufacturing, and fiscal applications on IBM midrange computers. He can be reached at green@ midrangecomputing.com.
AS/400 Client Access Family of Products (SC41-3560-01, no CD)
Client Access/400 PC5250 User's Guide V3 (SC41-3552-00, CD-ROM QBKAKB00)
Client Access/400 PC5250 Reference Guide V3 (SC41-3553-01, CD-ROM QBKAK601)
Client Access/400 PC5250 Setup Guide V3 (SC41-3555-00, CD-ROM QBKAK800)
Client Access/400 for Windows 95 Setup V3 (SC41-3512-01, CD-ROM QBKACN02)
Client Access/400 Programmer's Guide V3 (SC41-3554-01, CD-ROM QBKAK701)
Inside AS/400 for Windows 95 (SG24-4748-00, CD-ROM EZ30HF00)
LATEST COMMENTS
MC Press Online