IBM Support

How do I debug a Program Call problem?

Question & Answer


Question

How do I debug a Program Call problem?

Answer

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:

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Product Synonym

IBM i;AS400

Document Information

Modified date:
17 March 2020

UID

ibm11117305