Day: May 27, 2020

Using Visual Explain in Access Client Solutions to Enhance the Performance of SQL Processing

Our monthly newsletter topics here at iTech Solutions typically zero-in on purely technical subjects related to IBM i hardware/software and system-level functionality, but every now and then a topic comes along that is more development-related in nature but is also so technically noteworthy that it has both development-level and technical-level relevance, and this is one of those topics.

The SQL tsunami has long since taken over the IBM i world with most every shop doing some form of SQL development, it could be in the form of embedded SQL in ILE RPG programs, creating SQL stored procedures, etc., or deploying 3rd-party apps that use native SQL for all of their database I/O.  While most IBM i shops are now doing some form of SQL development work, most installations do not have a database administrator on staff and thus the task of “tuning” the SQL environment on IBM i for optimal performance sometimes falls onto an applications developer who may not be aware of the very powerful DB2 database performance tooling that is available right now that’s baked-into the IBM i software environment, and one of those powerful tools is Visual Explain in IBM’s Access Client Solutions client software.…

Saving IFS Objects: How to Specify a Device or Save File

Savings objects from the Integrated File System (IFS) is not quite as straightforward as saving them from the QSYS.LIB file system using commands such as SAVOBJ and SAVLIB. For example, a SAVLIB command has a parameter called DEV where you can simply specify the name of the device you want to use for the save. This could be a tape drive like TAP01 or a tape library like TAPMLB01. It could also be a save file, in which you would specify *SAVF and then the name of the save file on the SAVF parameter.


Examples of a SAVLIB command.

We save our customers hundreds of hours and thousands of dollars each year.

The team at iTech has over 40 technical certifications, boasts 3 IBM Champions, and has a team with over 900 years of combined IBM i experience.

The SAV command is used to save IFS objects, as well as QSYS.LIB and DLO objects. In other words, it can be used to save any object on the system regardless of which file system it is in. The key to using it is being able to specify the correct device when saving to a device or a save file.

You first have to understand where your devices and your save files are located on the system. All devices on IBM i have a device description that is located in a library called QSYS. All other libraries on IBM i are nested inside of library QSYS. That’s as far as the nesting goes – you can only nest libraries in QSYS. With that said, here are some examples of devices and save files and their SAV command equivalents:

SAVOBJ DeviceSAV Device
Tape Drive – TAP01/qsys.lib/tap01.devd
Tape Library – TAPMLB01/qsys.lib/tapmlb01.devd
Save File – QGPL/MYSAVF/qsys.lib/qgpl.lib/mysavf.file

As you can see, the device names on the SAV command are a little more cumbersome to type. You see that we have to start by typing /qsys.lib, since that is the beginning of the file path for any object in the QSYS.LIB file system. All device descriptions are located in QSYS, so now we just need to type the name of the device and its .devd file extension. For tape drive TAP01, this would be tap01.devd.

Example of SAV command specifying a tape drive.

Specifying a save file only takes a little more work. So we start

Finding Pending Job Logs

After a recent iTech Sips and Tricks, I was speaking to David Larsen from Cabinetry by Karman in Utah, and he had a great tip that he wanted to share with everyone.  So, he sent me some information that I reformatted as a technical tip for our newsletter.  Thanks, David !!!

If you have ever used the Display Job Table (DSPJOBTBL) command to see the number of jobs on your system, you might have seen more jobs than you can account for. There can be more total jobs than actual jobs in the system when there are PENDING job logs. There is no output in the out queues, making the system appear to have “phantom” jobs in the system.  You can have this problem if the system value QLOGOUTPUT is sent to *PND, and not *JOBEND, or the job description has JOBLOG *PND, instead of *JOBEND. Changing the value to *JOBEND will produce a joblog. When the value is *PND, the job log will not be produced.  The job log remains pending until removed.…

Startup Program for MIMIX

Here’s a command for your startup program for MIMIX to determine if you are on the source or target:


When you are running MIMIX, you want to have two startup programs for your source and target. You do not want to start all your applications on your target but certainly do on your source.

You can use one program with the command above and then it will determine which system and will run the correct startup program automatically. This MIMIX command will give you the local system name defined MIMIX, so it will know if you are switched and run the correct startup program.

You can then run your startup program once you are switched and it will start all the applications you have in the startup program. This will also stop MIMIX from replacing your startup program since they will always be the same on both sides and then will execute the correct program.…