An Introduction to WDSc Table Views
January 26, 2005 Bruce Guetzkow
Although Programming Development Manager has always been a powerful green-screen tool, IBM has been pushing programmers to move from PDM to WebSphere Development Studio client. The reason for this push is that IBM will no longer be enhancing PDM or Source Entry Utility (SEU), and is instead concentrating its efforts on WDSc. To make the transition to WDSc easier, I’ll compare and contrast the iSeries Table view and PDM. You’ll see that there are many similarities between the two, as well as a few notable differences.
The iSeries Table View
The tree structure of the Remote Systems view, of the Remote Systems Explorer perspective, is similar to the look and feel of Windows Explorer. To expand an item, you click the plus (+) sign to the left of the item. To perform an action on an item, you right-click the item and select from a menu.
The iSeries Table view is similar in appearance to PDM. There is a column with object or member names, followed by other columns with object or member attributes (such as type, attribute, and text). Unlike PDM, which uses an entry column to enter an option code, you right-click and select from a menu in order to perform an action on an item in the table. The differences between the Remote Systems view and the iSeries Table view are that the table allows you to see more information about each object or member, and an additional menu option is available in the table: PDM Options (more about this later).
Adding Items to the iSeries Table View
To add items to the iSeries Table view, right-click any filter under the iSeries Objects subsystem and click Show in Table. Each item in that filter will now appear as a separate line in the iSeries Table view. If the view isn’t already open, WDSc will automatically open it for you. As I indicated above, in addition to the item name you will be able to see object or member attributes. You can repeat this process as many times as you like to get multiple tables of objects or members, all in the same view. This allows you to switch between different lists of items by use of Previous and Next arrows near the upper-right corner of the view. A Refresh icon is available to the left of the Previous arrow, which can be used to update the contents of a particular table, much like F5=Refresh is used in PDM.
A drop-down box can be accessed from the icon list with additional view options. The Work with . . . option is another way to select libraries, objects, or members to be added to a table. A pop-up window is presented where you can specify the items to add to the table. You can indicate specific items or use the asterisk (*) to indicate patterns.
The Subset . . . option is similar to using F17=Subset from PDM, although the subset options available are not identical to those in PDM. There is also a Position to . . . option that can be quite handy for long lists, much like PDM’s Position to field. The Print . . . and Export to File . . . options are much like F21=Print List in PDM, where the contents of the current table can be sent to a printer or text file, respectively.
There is also a short-cut option to table-specific preferences available in the drop-down menu. You can specify the columns to appear in the view and their order; whether to open the view with the last table contents; and whether to enable a command line for commands specific to table entries.
Working in the iSeries Table View
Once you have populated a table, you can use it to see the attributes of those items or perform actions on those items by right-clicking an item to display the content-menu. You can edit a source member in the LPEX editor, CODE editor, or (for files) CODE Designer. Source members can also be opened in the LPEX or CODE editor in browse mode. There are options for rename, copy, move, and delete, although I have never found the copy option to work. Depending on the source member type, there are appropriate options for verify and compile.
Two very powerful options are the PDM Options and User Actions. Many of the same options available in PDM are also available in the iSeries Table view, including Copy-to, which, unlike the copy option described above, does work. User Actions are similar to user-defined PDM options. Unlike PDM options, however, you aren’t limited to a two-character identifier. You can name these options with very descriptive names, like Delete File, instead of DF, for the Delete File (DLTF) command.
The only drawback to using User Actions is that you must restrict yourself to defining commands that do not have an interactive panel or you must use the Start RSE Server (STRRSESVR) command on a green-screen session, so that WDSc can direct interactive output to an iSeries interactive session. To me, this defeats the purpose of using a graphical interface if my output still has to be directed to a 5250 session. Even the alternative available for many commands of specifying *PRINT to direct output to an output queue is less than ideal. IBM needs to create a mechanism to make its commands work from within WDSc without having to leave the graphical view to see the results. Until then, User Actions will be a nice but under powered option.
Yet Another Table View
For tables containing files, save and restore options are available to execute the commands Save Object (SAVOBJ) and Restore Object (RSTOBJ), respectively. Perhaps the most interesting option available for physical files is another Show in Table option. This one has two options associated with it: Members and Fields. Selecting Members adds another table to the current view with a list of the members for the selected physical file.
Selecting Fields opens another view: the iSeries Field Table view. This view contains a single list of the fields for the specified file. Unlike the iSeries Table view, if another physical file is specified and Show in Table, and then Fields, is selected, the iSeries Field Table view is cleared and then replaced with the list of fields from the most recently selected file.
The list of fields contains the following columns: field name, record format name, type (character, zoned decimal, etc.), length, text, and alias. By right-clicking a field and selecting Field Properties, you can display a pop-up window with additional field information, including column headings and editing information.
Using the Table Views
Now that you’ve seen what the table views can contain, it’s time to put them to work. I like to create tables with lists of physical file names for a specific application. I can use the drop-down selections to specify Work with, and then Objects; then indicate the library name, a pattern to identify the files from the application, object type *FILE, and attribute pf-dta. To produce a table containing all of the files used in the Accounts Receivable application, for example, I might specify the following:
- Library – TESTDTA
- Object – AR*
- Object type – *FILE
- Object attribute – PF-DTA
I can create a second list from Work with, and then Member, with the following, for all RPGLE modules in the same application:
- Library – TESTPGM
- File – QRPGLESRC
- Member – AR*
- Member type – *
With these two lists, I can easily switch between test copies of source members and physical files. I can select a module, open it for editing, and use the text column from the list of files to remind myself of the contents of files, or show the list of fields in the fields table to get additional information.
Put It to Work for You
The iSeries Table view is very much like PDM, with much of the same functionality and power needed to make you an efficient developer. You can have multiple tables at your fingertips without having to start multiple 5250 sessions. You can drill down from libraries to objects to members and even to database fields with just a few clicks.
With easy access to selected lists of source members, you can quickly edit those members using the LPEX editor, CODE editor, and CODE Designer tools, enhancing your development efficiency. Put the table views to work for you, and find new ways to do even more.
Bruce Guetzkow has programmed on the AS/400 and iSeries since 1990, in manufacturing, distribution, and other industries. He is currently the IS director at United Credit Service in Elkhorn, Wisconsin. Click here to contact Bruce by e-mail.