STACK_INFO IBM i Service
STACK_INFO is one of the new services that is part of the recent IBM i 7.3 TR3 / IBM i 7.2 TR7 announcement.
By Dawn May10/17/2017
IBM i has many ways to display the call stack of a thread, and I wrote about several of these ways in one of the earliest i Can blogs: Display Call Stacks.
Not much has changed in this area, but now you have another option to display call stacks.
The STACK_INFO service allows you to use an SQL SELECT statement to retrieve the call stacks of the threads in jobs. You simply need to know the fully qualified job name of the job whose call stack you want to access, and optionally the thread ID. The default behavior is to return the call stack for the initial thread, but you can also request the call stack for a specific thread or for all threads in the job.
The information is returned in a table, with one row per call stack entry. This interface supports all types of call stacks: OPM and ILE, as well as Java, PASE, and Licensed Internal Code (LIC) stack frames.
The requesting user must have job control (*JOBCTL) special authority, or be the same user profile of the job whose call stack is being requested. In order to return the LIC stack frames or PASE Kernel stack frames, you must have *SERVICE special authority. This is consistent with the authority required to access this same information via the Display Job or Retrieve Call Stack (QWVRCSTK) API.
Look for 7.3 Db2 PTF Group SF99703 level 7 or 7.2 Db2 PTF Group SF99702 Level 19 for this enhancement.
Dawn May is an IBM i consultant. She owns Dawn May Consulting, LLC in the Greater Boston area. Dawn is a former IBM senior technical staff member.More →