How to get the most out of IBM PDM

The iSeries Programming Development Manager or PDM (including the workhorse Source Entry Utility or SEU) is one of most widely recognized tools for the iSeries. In order to continue getting the most from PDM this article is a review of PDM and the many powerful features. Obviously newer alternatives exist (and will be discussed later) but PDM is time tested, robust, and works for beginners and seasoned professionals. Here are a few reasons that this programmer continues to appreciate PDM.

1. PDM can handle most of the daily tasks the average RPGLE programmer performs. From here the programmer can browse, copy, delete, print, subset, search/locate, scan/replace, compare objects and source members, create new programs and display files, create printer files, create modules, etc. and, of course, edit and compile.

There are several default PDM settings which can be customized to your preferences. For example, you can choose to compile interactively or in batch, specify a default job description, specify full screen mode ("expert mode"), prompt or not when replacing objects, specify which user-defined option file to use, and allow or disallow the changing of the text and type of member.

2. User-defined options are easy to create, maintain, and reuse in PDM. The default options file is QGPL/QAUOOPT. This file can be copied (CPYF or CRTDUPOBJ) to your personal library and used in place of the default. Of course you can add options to the default file as well so that other programmer's can benefit from the same shortcuts.

From the PDM source member or object list press F16 and the "Work with User-Defined Options" screen displays. Press F6 to create a new user-defined option. For example, you might create user option 'EL' for the EDTLIBL command and you might rarely need to type the entire EDTLIBL command again. Parameters can be passed to these user-defined options so sophisticated short-cuts can be created.

For example;
Option        Command
nn                CRTDSPF FILE(&L/&N) SRCF(&L/&F)

where nn is your two character abbreviation (such as "CD" short for crtdspf), &L = Library, &N = File name, &F = Source file name. So, from a display file source member in the PDM list simply typing 'CD' will compile the display. There is no need to type the library name, source file name, and member name.

3. PDM (SEU) is integrated with several powerful tools like screen design aid or SDA, source debugging STRDBG, and the MRGSRC command (link to: mrgsrc article). There is also a link to Report Layout Utility, or RLU which is a somewhat cumbersome tool for working with printer files.

4. PDM has auto-recovery built in. It is true that power interruptions do not happen very often but when it does PDM can really help. From a disrupted session the source changes can optionally be recovered or discarded. If you need to pick up where you left off when disconnected auto-recovering previous changes means no work is lost. Also, while editing it is always a good idea to save work after making updates. In PDM, on the control line, just type 'save' while working and you can commit your latest changes without exiting the source code.

5. PDM is menu driven but also works via (promptable) calls from a command line. For example, WRKLIBPDM (F4 prompt) can be used instead of the STRPDM menu option to "work with libraries".

6. PDM understands subsets and wild-card characters or as IBM sometimes refers to them, generic names. For example to find all source members in a source file that start with the letters 'GL' ,

WRKMBRPDM file(mylib/allsource) mbr(GL*

Example of working with all objects of type SQLRPGLE;

WRKOBJPDM lib(mylib) type(*SQLRPGLE)

7. PDM Also has a 'find string' function (FNDSTRPDM) and, can search optionally case-sensitive or NOT case-sensitive.

8. SEU has powerful source editing capabilities such as copying, moving, or deleting single multiple lines and even doing multiple updates concurrently. Occasionally this will require more than one step. Obviously conflicting moves or copies will not be allowed and result in an informational error message. Inserting individual blank lines is simple and the number of lines desired can be specified so that cut-and-pasting code becomes much easier. For example in SEU update mode typing I10 means to insert ten blanks lines after the current line (where the cursor is positioned).

The SEU editor has a split-screen feature that will allow viewing source code as well spool files. The source member being viewed can be the same program that is currently being edited or any other program member, copy book, field reference, etc. To easily find compile errors just return to editing the program source code and select the split screen mode with F15=Browse options, select type two for spool files and F4=Prompt to find the compile listing which when selected will display on the bottom half of the screen. Then on the control line on the lower half of the screen (the compile listing) type *err and press F16=Repeat find. The compile listing is positioned to the first error found and pressing F16 will step the next error and so on.

Thankfully the editor and compiler no longer balk at blank source lines. Blank lines can improve source code readability and the asterisk in column seven is not required. While editing, hiding lines can bring different sections of a program together on the screen for comparison. Type 'X' to hide a single line or 'XX' for hiding blocks of lines. A simple F5=Refresh brings the hidden lines back into view.

Conclusion:
If you work for multiple clients you will appreciate the ubiquitous nature of the green-screen PDM. Some alternatives to SEU/PDM will include enhancements like web programming capabilities, PC GUI editing and compiling, colorized source code, program outlines and wizards. The future according to IBM will be much more web oriented and graphic.

We welcome opinions/articles/links/etc. regarding alternatives to PDM such as Code 400 or Rational Developer for System i (RDi) which is the replacement for Websphere Development Studio Client for iSeries (WDSc) which was the replacement for PDM. RDi includes the tools found in WDSc including the Remote System Explorer (RSE) and the source code editor LPEX, or any other PDM alternatives.