The documented description indicates, "An attempt to allocate or deallocate the named file has failed. The first 2 bytes of the displayed reason code is the return code and second 2 bytes is the reason code returned by the IDMS module RHDCALOC.", but does not list those reason codes.
For example in the message
DC205017 V51 T3778 Dynamic allocation error; segment.filename Reason Code 0805
The 08 means the Dynalloc failed.
The second 2 digits are the RHDCALOC reason code.
The two most common codes reported are 0807 and 0805.
0807 means the dataset is already allocated to another Job/STC in a more restrictive mode.
0805 means that there was no space in the TIOT to add an entry for the file being allocated.
For 0805 sometimes IDMS is able to determine this from dataset attributes block prior to issuing the SVC99. If SVC99 is issued and fails for this reason (No Space in TIOT) there will also be a message DB002261 in addition to DC205017 that gives the IBM reason code which would be x'0238' for SPACE UNAVAILABLE IN TIOT.
IDMS recommends allowing the IDMS CV to use XTIOT.
See Article ID: 49524
Release 1.12 of z/OS made the usage of the XTIOT optional with the introduction of the NON_VSAM_XTIOT parameter. IDMS CV has always attempted to use XTIOT since release 15.0, so when z/OS introduced this parameter we recommended setting it to YES.
IDMS customers have only reported DC205017 with reason codes 0805 and 0807 but here is the complete list of the RHDCALOC reason codes:
+*
+* Reason codes
+*
+DSARSN_OK EQU 0 Success
+DSARSN_NF EQU 1 Not found
+DSARSN_TRUNC EQU 2 Attributes or DSN truncated
+DSARSN_UNMATCHED EQU 3 No value available for symb. parm.
+DSARSN_NODSN EQU 4 DSModel has no DSN attribute
+DSARSN_SVC EQU 5 No Space in TIOT
+DSARSN_PREVALOC EQU 6 DDN already in use (error or warn)
+DSARSN_USECONFLCT EQU 7 Usage conflict w another job
+DSARSN_NODDDSN EQU 8 No DDN or DSN specified
+DSARSN_NOTASS EQU 9 DSName not associated w DDName
+DSARSN_NOTCAT EQU 10 Dataset not cataloged
+DSARSN_NOTNEW EQU 11 Dataset already existed (TRY_SHR)
+DSARSN_BADFUN EQU 12 Invalid FUNCTION parameter
+DSARSN_BADATR EQU 13 Invalid ATTRS parameter
+DSARSN_BADDDN EQU 14 Invalid DDN parameter
+DSARSN_BADDSN EQU 15 Invalid DSN parameter
+DSARSN_BADDSM EQU 16 Invalid DSM parameter
+DSARSN_BADKEY EQU 17 Invalid KEY parameter
+DSARSN_BADLEN EQU 18 Invalid LEN parameter
+DSARSN_BADPRM EQU 19 Invalid PARMS parameter
+DSARSN_SUBSUNKN EQU 20 Substitution parm unknown
+DSARSN_BADSUBSST EQU 21 Invalid substring start position
+DSARSN_BADSUBSLN EQU 22 Invalid substring length