Toolbox for Java and JTOpen

Debugging Program Calls

How do I debug a Program Call problem?

The Toolbox's Program Call component carries out its task by calling the Remote Command host server on IBM i, which is part of IBM i option 12. This server is used by both the Toolbox and Client Access/400 to call programs on the server.

The Toolbox communicates with the server via sockets/TCP. When the Java program and the Toolbox zip/jar files are on a client, normal sockets/TCP is used to get to the server. When the Java program, the Toolbox zip/jar file and the RPG program are all on the same server, local sockets are used to call this server. This is faster than 'normal' sockets but the key point is we will do a call to the server even when everything is on the same server.

When the host servers are started, jobs are created to catch our program call requests. As you have noticed, these jobs start under profile QUSER.

When we call the host server, we supply a userid and password. The host server swaps to the profile we supply, runs the specified program, then swaps back to QUSER so it is ready to carry out the next request. The program is not run under the QUSER profile, it is run under an actual user profile. The Toolbox gets the userid/password in one of three ways:

  1. The Java program can programatically set the userid/password via methods on the AS400 object.
  2. If on a client, the Toolbox will prompt for userid/password.
  3. If on the IBM i JVM, the Toolbox will use the userid/password of the IBM i job the Java program is running in.

Since the server swaps to a profile other than QUSER before running the program, the library list of the user profile is in effect.

Debugging this process can be a challenge. The server puts the profile it swapped to (and additional debug information) in the job log, but finding that job log can be difficult. It is hard because the real profile does not show up on the WRKACTJOB screen. The jobs on that screen are always listed as belonging to QUSER.

Here are some debugging hints our server team has put together:

Contact IBM

Browse Power Systems

Next generation applications for big data and analytics and cognitive computing are providing unprecedented insights into opportunities, threats and efficiencies. IBM Power Systems is at the forefront of delivering solutions to gain faster insights from analyzing both structured information and unstructured big data. With the secure, flexible and open platform of IBM Power Systems plus solutions and software, organizations can outpace their competitors by delivering faster services, providing differentiated offerings and turning operational cost into investment opportunity.

IBM Power Systems hardware is at the heart of enabling major business and industry transformations fueled by the explosive growth of big data and analytics. Power Systems help organizations drive faster business insights with industry leading performance, scalability and virtualization flexibility.

IBM Power Systems deliver flexibility and choice of operating systems to enable your business to support the next generation applications for big data and analytics and cognitive computing that are transforming how organizations work today. Whether running 1, 2, or all 3 - coupled with PowerVM, they maximize the benefit of Power Systems in your business.

IBM's integrated approach to developing Systems and Systems Software stacks together delivers a platform that supports next generation applications for big data and analytics and cognitive computing on an open platform for choice while providing maximum utilization, availability, and flexibility to help you deliver new advantages to your business.

IBM and IBM Business Partner solutions exploit key benefits in IBM Power Systems’ unique design combined with systems software to provide support for next generation applications for big data and analytics and cognitive computing to providing unprecedented insights into opportunities, threats and efficiencies to your organization.


Over the last five years thousands of clients have migrated to IBM Power Systems. Learn how Power Systems has helped them support next generation applications for big data and analytics and cognitive computing on an open platform for choice while improving business performance, reducing risk, and establishing a platform for growth.