Creating an IBM AS/400 Process Server
This document covers the installation, syntax, and operation of the IBM AS/400 Connector for RunMyJobs. This Connector can be used to manage Chains, Processes, and File Events on AS/400 systems.
Note: This topic does not cover installing RunMyJobs to run on an AS/400 application server.
Note: AS/400 Process Servers are available only if your license includes a non-zero value for the key ProcessServerService.AS400.limit
. Process Servers that include the AS/400 Process Definition type do not count towards the ProcessServerService.OS.limit
and ProcessServerService.External.limit
license keys. AS/400 Process Servers also require the ProcessServerService.AS400.limit
key, which sets the total number of AS/400 Process Servers.
Set the AS400Server
Process Server parameter to the default AS/400 system. You can override this on the Process Definition by specifying a Parameter of the same name.
Running Processes
To run an AS/400 process, RunMyJobs makes a connection to the AS/400 using the AS/400 Process Server Parameters AS400Server
and AS400User
. (The latter can be overridden by the Process Definition Run As user.) RunMyJobs then executes the following command:
SBMJOB CMD(command) AS400JobAppend
This should produce a CPC1221
message containing the AS/400 job ID. This job ID (and other information) is then written to the Remote attributes of the Process, and can be seen in the Process Monitor.
The Process is then monitored until it reaches any Process status in AS400JobTerminalStates, or it reaches the Process status *ACTIVE
and any active status in AS400JobFailOnActiveStatus. During this process, any messages on the Process except those whose codes are listed in AS400JobIgnoredExceptions will cause the Process to go into Error status.
If the Process reaches a status in AS400JobTerminalStates, spool files are retrieved according to the Process Server and Process Definition specification. If a Process log is found, this log is parsed and the return code fetched. If the return code is not 0
, then the process goes into Error status. If no log is found, the process goes into Completed status.
If a Process reaches a status in AS400JobFailOnActiveStatus, the process goes into Error status.
AS/400 Prerequisites
- OS/400 (aka i5 OS) V5R0 or later. (Older versions are possible, down to V4R3.)
- Connectivity from the RunMyJobs host to the AS/400.
- Connectivity from the Secure Gateway to the AS/400.
- Ports 8470 through 8476 (9470 through 9476 for SSL/TLS) of the AS/400 application server need to be open and accessible. For more information, see JTOpen - Server ports used.
No additional software needs to be installed on the AS/400.
Creating an AS/400 Process Server
To create an AS/400 Process Server, follow this procedure.
- Navigate to Environment > Process Servers.
- Click .
- Select AS/400 (IBM System i) and choose Next.
- Enter a name.
- On the Queues tab, add a dedicated Queue for the AS/400 system. Redwood recommends a dedicated Queue for each AS/400, with the same name as its corresponding AS/400.
- On the Parameters tab, add values for:
- AS400Server: Use this if you don't need file events and you want to put the username/password in the Process Definition Run As User field.
- AS400Server and AS400User: Use these if you want File Events or you don't want to put the username/password in the Process Definition Run As User field.
For more information on AS/400-related Process Server parameters, see AS/400 Process Server Parameters.
Verify that the Process Server is Running
To verify that the process server is running:
- Navigate to Environment > Process Servers.
- Check the status icon of the Process Server. A Connecting status can indicate a problem if it persists longer than one minute. Remember to refresh the view.
- Expand the Process Server and check the status icon next to the AS400 service.
You can now start the Process Server. If it will not start, navigate to Monitoring > Operator Messages and look for the name of the AS/400 Process Server.
Testing the Process Server
To test the Process Server by running a Process that should complete successfully, create a Process Definition named AS400_DSPJOB, containing only the text DSPJOB
, and submit it to run on the AS/400 system. The job should run on the AS/400, and the output of the DSPJOB
command should be visible in the QPDSPJOB.1 file.
To test a Process Server by running a job that should fail, follow this procedure.
- Create a Process Definition called AS400_Always_Fail, with the command text
DSPJOB JOB(000000/*N/REDWOOD)
. This command will fail with an error code. - Check that the Process return code and the return code in the log match up.
- Navigate to Monitoring > Processes and select the Process that failed.
- In the Detail View, expand Files, then open
stdout.log
andstderr.log
. Make sure the return code in the file matches the return code in the Detail View.