Thursday, September 3, 2026

Bob Works Better with Db2 for i When...

 When you start using any new technology, it takes a while to become efficient with that technology because you haven’t learned the best practices. The use of AI technologies is no different – even though AI is often viewed as being able to solve all of the world’s problems. While an AI tool such as IBM Bob can provide feedback on best practices for a programming language, the AI tools are not proactively telling the end user how to improve their interactions. Best practices are learned through experience and through others sharing the tricks of the trade.

 Earlier this summer, I highlighted the IBM i Database mode available with the IBM Bob Premium Package for i. In this entry, I want to highlight some techniques that should improve your efficiency when using this mode with your Db2 for i databases and applications. These tips will also apply to using the IBM i Developer mode.

I knew that the IBM i Database mode included an indexing strategy workflow because our IBM Expert Labs team shared information on our SQL performance tuning methodologies with the IBM Bob development team as they created the logic for this workflow. Thus, you can imagine my confusion when I received the following answer from Bob after selecting the IBM i Database mode to ask: What workflows can I use?















A similar experience occurred after reading about the first update to the IBM Bob Premium Package for i. The release notes highlighted that the command to review SQL statements had been renamed from /review to /review_SQL. I found no evidence of any review command in my Bob session as the following graphic shows.








I was able to use the IBM i Database mode to assist with SQL performance optimization work, but I was confused why I had no visibility to the associated workflow and commands. So, I reached out to peers with more IBM Bob experience to figure out what I was doing  wrong.  Basically, I learned that I was  missing a couple of setup steps that are critical because I was in too big of a hurry to ask Bob for help. 

The first setup step I was missing was connecting to an IBM i server.  I was asking Bob for assistance without taking the time to connect to an IBM i server. As a consultant, I don’t have the daily responsibilities of a programmer who requires a connection to an IBM i server to perform their work on a daily basis. My questions were related to general recommendations – not a specific application program or Db2 for i object. 

Speaking of IBM i objects, I also learned that the selection of the proper workspace is another important setup step.  he following figure shows the workspace choices when starting a new task with IBM Bob. The Library List and Home Directory (i.e., IFS) workspace options will only appear if an IBM i connection has been established.






If I want to work with a specific Db2 object on a server, then the Library List workspace should be selected.  And the Library List should be updated to include the library housing that Db2 object. Db2 for i database objects don’t reside in a file-based directory structure on your workstation or IFS – selecting a directory-based workspace is going to make it harder for Bob to find the Db2 object that you’re wanting assistance with. Bob can work outside the selected workspace if needed, but you will find that Bob works faster when you put his focus on the right workspace.  

Now that I’ve addressed these two important setup steps – connecting to an IBM i server & selecting the proper workspace – in my IBM Bob session, let’s revisit the database commands and workflows that I had struggled to find previously. As the following figure shows, I’m now able to find and use the /review_SQL command directly.

 


 

 





In addition, Bob returns a much longer list of available workflows including the indexing strategy workflow that I had been searching for.











 Hopefully, these two important setup steps will connect a few dots for you when using the IBM i Database (and IBM i Developer) modes provided by the IBM Bob Premium Package for i like they did for me.  More importantly, the proper configuration should also enable Bob to assist you more quickly and efficiently with your IBM i specific tasks.