IBM i QSYS2.Services_Info and Navigator for i
The QSYS2.Services_Info service is an easy way to see all of the available services along with an example of each.
The QSYS2.Services_Info service is an easy way to see all of the available services along with an example of each. It shows both the IBM i Services and the Db2 for i Services, which are the ones specifically related to the database. This service was made available with 7.3 and added to 7.2 via PTF.
The information returned includes one row for each service that provides a variety of information about each service, including the Db2 Group PTF that introduced the service, the latest Db2 Group PTF that enhanced the service (if applicable), as well as an example SQL script for the service.
You’re probably aware Access Client Solutions has “Insert from Examples” allowing you to insert example IBM i services, but the QSYS2.Services_Info examples are somewhat different and include examples that are not in the ACS examples, ACS has examples that are not included in the QSYS.Services_Info, and some of the same examples are in both places.
What you may not be aware of is that the QSYS2.Service_info information is also available with Navigator for i, which I prefer as I find the user interface more friendly than the columns of text you get in ACS’s Run SQL Scripts.
You can view the available services in Navigator, and you can also initiate the example SQL from Navigator by using the ACS function to listen for Navigator requests; the SQL statement will be launched in Run SQL Scripts. I wrote about this capability in the article, “Integration Between Navigator and Access Client Solutions.“
You’ll find the IBM i Services task in Navigator within the System task, as the following screen capture shows:
Clicking on IBM i Services will bring up a list of services that you would get using ACS’s Run SQL Scripts with the following statement: SELECT * FROM QSYS2.SERVICES_INFO, but the sort order is alphabetical by Service Category in Navigator, and it’s not clear to me what the sort order is for ACS.
Navigator limits the number of columns that are displayed, but you can easily customize that with the Columns… dialog. You can also easily sort any column in Navigator by clicking on the column header. In ACS, you have to change the select statement yourself to customize what columns you want to display and the sort order.
In Navigator, you can select a service and either run the example SQL or look at it’s properties:
If you select Properties, you will see all of the information about that particular service, including the example SQL. You can use the Run Example SQL button from the properties panel.
Running the example SQL is where you must have ACS listening for Navigator requests; if that hasn’t been set up, Navigator will display an error.
For those of you skilled in SQL, Run SQL Scripts will probably be your preferred interface, but for those of you just getting started with IBM i Services and using SQL to access system information, the Navigator interface might be a good place to start.