Have you ever gotten frustrated by the system Display Object Description (DSPOBJD) command? You don't get to a display with information when you enter the command as this:
DSPOBJD OBJ(xxx) OBJTYPE(*yyy)
Instead, you get a subfile type display with options to display the "Full" or "Service" attributes.
If you ask for Full, the first page displayed has information about who created the object and what system was used. This is probably not what you wanted to see, so you end up rolling to one of the other pages. These pages have some good things to show (such as the change and usage dates, the size, and the save/restore information), but no information about the source member used.
The source information is on the Service side of the command, so you have to back out to the subfile display and then use the Service option. What does the source information have to do with servicing the system? Well, about 20 years ago, someone decided it did, and we have been stuck with it since.
If you are trying to figure out what is wrong with an object, the information you want is spread over multiple displays. You may find that what you really need is the next level of detail about the object or to access the authority information. You can't get there from DSPOBJD. You have to back out and enter another specific command.
After being frustrated with DSP-OBJD, I decided to write a command that does what I want: DSPOBJD2. It takes all the important information and jams it on a single display. For example, to display a program, you would enter a command like this:
DSPOBJD2 + OBJ(TAADATAC) + OBJTYPE(*PGM)
A single display appears, as shown in 1.
A single display appears, as shown in Figure 1.
Command keys at the bottom allow you to access DSPOBJD in all its details, or you can use the F9 key to directly access the authorization information.
Because we are looking at a program object, the F8 command key says F8 = DSPPGM. This is a dynamic function depending on the type of object being displayed, and it allows you to go to the next level of detail about the object.
The DSPOBJ2 utility is part of the TAA Productivity Tools (for more information, see the "Where to Find DSPOBJD2" sidebar). If you prefer to write your own version of this utility, I'll give you some information that can help you get started.
You obviously need a display file. I use a CL program to drive the display file and access the information from the Retrieve Object Description (RTVOBJD) and Retrieve Member Description (RTVMBRD) commands. You have to translate some of the return variables to make the information more meaningful on the display.
The F8 command key support at the bottom is more difficult. You have to determine the object type you are dealing with in order to get the right text to display and then, when the user requests F8, you have to use the appropriate display command. My code supports about 14 object types.
Most of the display commands are system supported such as Display Program (DSPPGM) or DSPJOBD. But some are other tools within the TAA Productivity Tools, like Display Data Queue Description (DSPDTAQD) and Display Output Queue Attributes (DSPOUTQA).
The other function keys are fairly straightforward. To make a good utility, you have to do a good job of handling errors. Altogether, there are over 500 lines of code in the tool, plus code is used from other tools.
Like all utilities, you need to keep it up to date. I've been adding information such as the following since the tool was first released:
o Basic help text
o More object types
o The display now shows whether the "Day used" information has been reset. It also shows if you can change the object using the QLICOBJD API (see also the CHGOBJD2 front-end TAA Tool).
o The F8 description for database files is now the new DSPF TAA Tool. This provides a series of subfile displays for what you see on DSPFD and other database commands. DSPFD is a tough command to work with on a complex database file. The DSPF displays help you focus on the data you want to see, and you can display the format information, database relations, and even the data itself using both system and TAA Tools. I'll show the specifics on DSPF in another article.
If you like seeing everything together and being able to access more information with command keys instead of entering a command, DSPOBJD2 is a good tool to have.
Jim Sloan is president of Jim Sloan, Inc., a consulting company. Now a retired IBMer, Sloan was a software planner on the S/38 when it began as a piece of paper. He also worked on the planning and early releases of the AS/400. In addition, Jim wrote the TAA tools that exist in QUSRTOOL and is now the owner of the TAA Productivity Tools product. He has been a speaker at COMMON for many years.
Programmer's Toolbox: The DSPOBJD2 Command
Where to Find DSPOBJD2
The DSPOBJD2 command can be found in TAA Productivity Tools, a licensed product from Jim Sloan, Inc. The product is based on the tools provided in QUSRTOOL but provides many additional tools such as the one described in this article. TAAProductivity Tools are also easier to use than QUSRTOOL. For example, it ships with both source and object code already created.
For more information about TAA Productivity Tools, contact
Jim Sloan, Inc.
c/o Barsa Consulting Group, Inc.
914-939-6100
fax: 914-939-1165
LATEST COMMENTS
MC Press Online