IBM Support

Qshell Message QSH0002 Error Code 3489 Occurs When Calling QSH from a CL Program in Batch

Troubleshooting


Problem

This document explains that message QSH0002 error code 3489 reason code 4 occurs when executing a CL program that calls a QSHELL command from batch.

Resolving The Problem

This document explains that message QSH0002 error code 3489 reason code 4 occurs when executing a CL program that calls a QSHELL command from batch.

Problem

MSGQSH0002 error code 3489 reason code 4 occurs when executing a CL program that calls a QSHELL command from batch.

QSH0002: Error found with QSH session, reason code 4, errono 3489.

QSHELL message 3489 is ENOSYSRSC. Approximately 95 percent of the time this is caused by trying to run QSH from a subsystem where the subsystem has a only a maximum active job of 1 (one). If you can run the command interactively but not from your CL batch program, it is likely that it is due to the maximum active jobs of the subsystem.

To see the maximum active jobs for a subsystem, on the operating system command line type the following (for example, for QBATCH):

DSPSBSD SBSD(QBATCH)

Press the Enter key. Then, select Option 1, Operational attributes.

Also, although spawn() (and, therefore, QSHELL) bypass the job queue, if the maximum jobs are changed, typically the maximum active jobs for a job queue also must be changed. This is displayed under --> 6. Job queue entries.

Resolution

To resolve the issue, increase the maximum allowed jobs in the subsystem using the CHGSBSD command. After increasing this value, restart the subsystem for the changes to take effect:

CHGSBSD SBSD(QBATCH) MAXJOBS(*NOMAX)

As previously stated, you might also need to increase the maximum active jobs for the job queue assigned to the subsystem as well.
To find the job queue used on the subsystem, execute the DSPSBSD command for the subsystem. Then, select Option 6 to view the job queue entries. Locate the job queue being used and then execute CHGJOBQE to change the maximum active jobs allowed in the job queue:

CHGJOBQE SBSD(QBATCH) JOBQ(QGPL/QBATCH) MAXACT(*NOMAX) SEQNBR(10)

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

Historical Number

26215551

Document Information

Modified date:
18 December 2019

UID

nas8N1010013