DB002765 or DB001032 with code 20 in batch utilities invoking a SORT
search cancel

DB002765 or DB001032 with code 20 in batch utilities invoking a SORT

book

Article ID: 417832

calendar_today

Updated On:

Products

IDMS

Issue/Introduction

An IDMS batch utility is abending when trying to invoke an internal sort.

Examples of the message that may be seen:

DB002765 C-7M376: Fatal error returned from IDMSSORT. Function=START RC=20

DB001032 C-7M361: Sort error 20

There are several batch utilities that invoke program IDMSSORT when performing a sort, so this error can occur in any of them.

Environment

Release: All supported releases.

Cause

The JCL is missing a SYSOUT ddname.

This fact may also be mentioned in a message coming from the sort package, but the actual message will be different depending on which sort package is being used.

Resolution

Add this to the JCL:

//SYSOUT   DD SYSOUT=*

For DFSORT users, this error can also be avoided by changing the DFSORT NOMSGDD installation option. See DFSORT Return Codes.