04/24/2012
Though we can use native CL commands and SQL statements to create and manage physical file triggers, we still lack a CL command for listing and working with the triggers defined for a physical file. One easy workaround is to use the Retrieve Database File Description (QDBRTVFD) API and User Interface Manager programming techniques. To find out how you can use QDBRTVFD to access details about the triggers associated with a specified physical file, read on.
03/28/2012
Ensuring that digital certificates are up-to-date is essential to keeping your enterprise's Internet business transactions running smoothly. Although the IBM i provides no automated notification of certificate expiration, the Retrieve Certificate Information API provides a means for accessing information useful for certificate management. Carsten Flensburg uses the API to simplify the task of managing digital certificates on the IBM i, by creating three useful commands that let you check the
02/15/2012
The Retrieve Journal Information (QjoRetrieveJournalInformation) API provides a wealth of information about journals, including journal receiver directories, journaled objects, and associated remote journals. Because remote journals to a great extent are employed in solutions providing replication and disaster recovery facilities, it has increasingly become vital to get access to current information detailing remote journal configuration and status. This APIs by Example article shows how to
01/05/2012
IBM normally introduces new APIs as part of a release upgrade, but at times IBM also employs PTFs to add new APIs between releases. The new Retrieve IOA Cache Battery Information (QSMRTVBTC) API is offered for the three most recent releases, including IBM i release 5.4. I use the new QSMRTVBTC API as the backbone for three new CL commands: Work with IOA Cache Battery Status (WRKCCBSTS), Display IOA Cache Battery Data (DSPCCBDTA), and Check IOA Cache Battery Status (CHKCCBSTS).
12/08/2011
IBM recently announced that zip and unzip file support has been developed and PTF'd for release 7.1. This support comes in the form of two ILE APIs, QzipZip and QzipUnzip. After a quick study of the zip APIs' documentation and header files, I knew that it would be useful to create a couple of CL command interfaces to make the zip and unzip services immediately available, wherever and whenever the common requirement of zipping or unzipping a file or directory on IBM i was encountered. So I've
12/07/2011
Back in 2008 I wrote an article collecting all the utilities I had created for the Systems Management Newsletter in the preceding four years. Despite the fact that it definitely feels no more than one, now three more years have passed. I thought I'd take this as an opportunity to look back at the systems management utilities presented since the last time I settled the scoreboard.
11/16/2011
In my recent article presenting the Copy User Authority (CPYUSRAUT) and the Start Program Adoption (STRPGMADP) commands, I mentioned a requirement I was facing some time ago. As part of an attempt to streamline the move-object-to-production process, I wanted to create a function that would set the object ownership, object primary group, object authorization list and object private authority to the same values as defined by a specified reference object. This effort led me to create the Update
10/27/2011
Today, I complete the article series covering the Server Support APIs and that so far has brought you a number of NetServer CL commands based on these APIs. The NetServer command at this point missing in the aforementioned collection is the Work with NetServer (WRKNETSVR) command. The WRKNETSVR command employs the Open List of Server Information (QZLSOLST) API discussed in detail in the recent installment of APIs by Example, and further provides an interface to NetServer-related functionality,
10/19/2011
I sometimes need to grant a user profile private authority to one or more objects, based on another user’s private authority to the same or a different object. While the Grant Object Authority (GRTOBJAUT) command allows you to assign private authorities to an object as a result of private authorities associated with a reference object, the GRTOBJAUT is only capable of doing so on an all-or-nothing basis. If you specify a reference object on the GRTOBJAUT command, this results in all private
10/05/2011
The IBM command Work With Registration Info (WRKREGINF) shows information about exit Points and exit programs. Exit programs allow you to hook your own custom logic into IBM processes.
For example, the IBM Exit Point QIBM_QSY_CRT_PROFILE allows you to perform your own custom processing whenever a user profile is created. You register your exit program at the exit point using the command Add Exit Program (ADDEXITPGM). In a previous newsletter article, Dan Riehl presented an exit program for
09/22/2011
Last time, I presented the three Server Support APIs capable of Starting and Ending the IBM i NetServer as well as retrieving information about the IBM i NetServer ("Server Support APIs Providing NetServer Management Facilities," August 25, 2011, article ID 66153 at SystemiNetwork.com). Today's installment of APIs by Example focuses on the Server Support APIs available to change the NetServer configuration information on your IBM i. Whereas a single API is responsible for retrieving the
09/07/2011
If you want to monitor and control the database server jobs running on an IBM I, there’s now a Work with Database Server Jobs (WRKDBSJOB) command that I've written to help you manage those tasks. Database server jobs perform the actual database access and data processing for various clients connecting to your system, including DDM/RDB, SQL, and JDBC /ODBC clients.
In many situations it's very useful to be able to quickly locate the specific jobs that are currently accessing the databases on
08/25/2011
The IBM i Support for Windows Network Neighborhood, also known as IBM i NetServer, lets you access IBM i file and print resources directly from your PC through file and printer shares. This facility enables you to map IBM i file systems and directories to network drives on your PC as well as direct PC printer output to IBM i–configured printers. Information about your system's NetServer configuration can be retrieved by using the Navigator for i interface, which also supports the associated
08/03/2011
It may have escaped your attention, but some time ago IBM released three PTFs for IBM i OS releases 5.4, 6.1, and 7.1, respectively, providing a convenient method of gathering battery cache information for service purposes. I've added links at the end of this article taking you to the APARs and PTF cover letters associated with the PTFs.
These PTFs add a program named QSMBTTCC to library QSYS. When the program is run, it displays a spooled file containing the battery cache information for
07/28/2011
The Display History Log (DSPHSTLOG) command I presented in the preceding installment of APIs by Example introduced an enhanced interface to the system history log messages (June 23, 2011, article ID 66046). The command supports new selection criteria in contrast to the native Display Log (DSPLOG) command, letting you easily filter to see only the messages of specific interest, and many message attributes were added to the DSPHSTLOG command's list panel's alternate view, including message ID,
06/23/2011
Release 6.1 included a new Open List of History Log Messages (QMHOLHST) API, which in itself offers program access to the contents of the system history log but also further enhances the filtering options compared to the selection parameters offered by the old Display Log (DSPLOG) CL command. In previous installments of APIs by Example, I've presented a number of APIs and accompanying utilities that demonstrated the enhancement opportunities that more recent APIs often make available to API
06/15/2011
In the May 18, 2011, issue of the newsletter I presented the Compare Object Authority (CMPOBJAUT) command which, true to its name, compares the authority-related attributes of two specified objects. Given the situation in which you want to perform such a comparison for a group of objects, there’s now another new command that can help you accomplish this task in a single execution: the Work with Object Authority (WRKOBJAUT) command.
The WRKOBJAUT command allows you to select a generic group
05/26/2011
Today's APIs by Example continues the coverage of APIs that provide details or shortcuts to information not easily accessed otherwise. One example of such information is a job's current client IP address, which defines the IP address of the client currently connected to the job in question. Another example is the need to quickly spot the most recent entry in a job's job log without having to actually open the job log and navigate to the bottom of it. The former requirement is met by, for
05/18/2011
Managing object authority requires control of a number of object attributes: object ownership, object private authorities, object primary group, and object authorization list, just to mention the most common properties involved. In addition, database file objects support field-level authority, and program objects define how the program interacts with adopted authority. As for the latter, programs are capable of both inheriting adopted authority from previous call levels as well as adopting
04/28/2011
In the preceding installment of the APIs by Example column, I showed an example of how APIs at times offer access to more detailed information than corresponding system CL commands. I also demonstrated how you, as an API programmer, can add more functionality and other enhancements when you create your own API-based versions of system CL commands. The Display Job Open Files (DSPJOBOPNF) command presented last time is today accompanied by yet another example of exploiting system APIs' access to