CA ESP System agent on i5OS jobs end with exit code 4001 or 'Spool file reading failure'.

Document ID : KB000049723
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When executing jobs on i5OS (or AS/400) agents, the jobs fail with errors "Spool file reading failure. Unable to retrieve

*SEVERITY return code. See previous messages in the log.".

Job exits with error code 4001.

Solution:

As of now, the default completion code in the agent for a job is the job's ending severity code. In previous versions (Version 2), the completion codes are zero (0) for job success and 4001 for job failure. Edit the agentparm.txt to allow agent to interpret the exit codes correctly.

  • Open a PASE terminal session.

  • Change to the directory that contains the agent program files.

  • Enter the following command to stop the agent:
    ./cybAgent -s 
  • Open the agentparm.txt file.

  • Define the following parameter: os400.v2.return.codes=true

  • Save and close the file.

  • If the subsystem that runs the agent jobs has stopped, enter the following command:
    system strsbs libraryname/subsystemname JW1libraryname   Specifies the name of the library that contains the required agent objects.subsystemname Specifies the name of the subsystem that runs the agent jobs.
  • Enter the following command to start the agent:
    ./cybAgent