23
Sat, Nov
1 New Articles

Programmer's Toolbox: The DSPOBJD2 Command

CL
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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

Programmer's Toolbox: The DSPOBJD2 Command

Figure 1: The DSPOBJD2 Display


BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: