Heard in the Lab

An Everyday Tool

by Jim Hoopes

 

PhotoWelcome to "Heard in the Lab." With the products flying in and out of the lab at all hours of the day, I often get some of the latest product news available, which I’ll pass on in this biweekly column.

Some people might consider what I’m discussing in my column this time to be too obvious to be worth mentioning. Before a recent event, I probably would have agreed. However, a situation I encountered proved me wrong and led me to talk about this product — DBU from ProData Computer Services.

As a part of my consulting work, I went in to help a company out with some database problems it was having. There are times when you need to make direct changes to a database file. Maintenance programs may not be working correctly or you may need to maintain files that are only updated in batch. In any case, it’s very common that programmers are in a file adding, changing, and deleting records.

The question is, how do you go about that? There’s good-old OS/400’s UPDDTA, of course. UPDDTA uses DFU to create a maintenance program on the fly. Anybody who has used it often quickly realizes its shortcomings. If you’ve used UPDDTA, you probably echoed Kermit the Frog’s thoughts when he said those immortal words, "I hope that something better comes along."

There are a number of data file maintenance utilities available on the market. However, for as many years as I can remember in my career, I’ve used ProData Computer Services’ DBU, and I was especially glad to have it for this consulting job. So I thought I’d spend this Web column describing DBU.

DBU for Dummies — Wait! There’s Nothing Fancy Here

If you know what DFU is, then you have the general idea of what DBU is. DBU is a utility that lets you add, change, delete, and display records in a file without creating a program. The starting point for using DBU is the DBU command (click here to see the DBU command prompted). Once you enter the name of a file and library, the main DBU display is shown (click here to see DBU in action).

One of the first things you might notice if you look at the previous screen capture is that DBU supports 132-column displays. That’s handy — especially in situations where you have large fields.

The top of the DBU screen is a menu bar that gives you access, through the F10 key, to all the DBU functions. Next on the screen is the file, library, member, and record format that are open. DBU also lists the record length, the access method the file is open in (keyed, in this case), and the mode the file is open in (display, in this case.)

Next is the control field, which lets you, among other things, navigate the file. You can enter "T" to move to the first record, "B" for the last record, or a +/- number of records. Using the control field, you also have access to many of the menu functions. For example, you can type "CMD" to get a command line window displayed.

The F6 key lets you pull up records based on a full or partial key. You can also perform search-and-replace operations based on the entire record, a field, or a part of a field (click here to see the search/replace setup screen). You can run searches in batch and also find and fix decimal data errors.

There are also several different ways you can format the display of data on the DBU screen. You can display the data in one, two, or three columns. You can also display the hex data (click here to see hex data display).

Finally, there are multiple print options as well. You can print a single record, the file structure, and database relations. Now let’s get into some of the more advanced options.

DBU's Advanced Features

One of the more advanced features that I use the most is the ability to display multiple files. Ordinarily, to do that you’d need a terminal that supports multiple sessions, or you'd need to start multiple sessions on your PC. DBU can display up to four files at the same time (click here to see DBU browsing two files). This is handy in situations where you have a header/detail file relationship.

DBU supports creating "applications." A DBU application stores information about the file(s) you accessed, the format of the screen as you set it, and so on. So when you start the DBU application, all your settings return to the way you had them.

Often, during the process of conversion, for example, there’s a need to have a number of people keying data into many database files, such as master files. The actual maintenance programs may not be available yet, so DBU is an easy answer as a data file maintenance program. However, when you have people doing simple data entry like that, you often want a record of what they’ve done.

DBU supports printing an audit log of changes made to the database. "Before" and "after" versions of changed records are shown, and new records added and records deleted are listed too. This provides a useful paper trail in many different situations, such as when you "fix" data during the middle of the night (click here to see the DBU audit log). I never remember what I did at 2:00 in the morning, so the audit trail really helps me out.

You can also override users' authority to a file. The DBU command lets you revoke authority to add, change, or delete records during a DBU session, even if users otherwise have that authority to the file. You could use the revoke authority feature on a menu, so that users could have access to DBU but not be able to perform functions they’re not authorized to do.

Speaking of security, DBU is very secure. There’s a command called DBUAUT that lets you set security and other settings by user. That way, you don’t need to specify a user’s authority on the DBU command. You can set whether the user is allowed to add, change, delete, or even display records for all files. You can set whether the user defaults to display, add, change, or delete mode. You can also set whether DBU produces an audit log by default (click here to see the DBUAUT maintenance screen).

You Don’t Have It, Give DBU a Try

I’ve barely introduced you to DBU. ProData’s Web site has additional descriptions of DBU's capabilities. If the tool interests you, but you’re still not sure, you can download a trial copy. I suspect that once you give it a run through, you’ll be convinced that DBU needs to be in your toolkit.

Jim Hoopes is the lab manager and a senior technical editor for NEWS/400.

DBU access to the System i AS/400 database is available thru the traditional green screen, our graphical user interface and even thru IBM's Systems Navigator and WDSc. Just let us know what you are most comfortable with & we will get you up and running!

[an error occurred while processing this directive] [an error occurred while processing this directive]
[an error occurred while processing this directive] [an error occurred while processing this directive]