Return code meanings

Table 1. Classification of return codes
Hexadecimal Return Code Name Meaning
0 CUN_RC_OK No error, successfully completed.
4 CUN_RC_WARN Warning, see reason code for more information.
8 CUN_RC_USER_ERR User error, action required. See reason code for more information.
0C CUN_RC_ENV_ERR Error caused by the environment, the request cannot be processed. See reason code for more information.
10 CUN_RC_SYS_ERR System error, inconsistent state. See reason code for more information.

The following table identifies the hexadecimal return and reason codes and the name associated with each reason code.

Table 2. Return and reason codes from z/OS Unicode Services
Hexadecimal Return Code Hexadecimal Reason Code Name of reason code Meaning and Action Component
0 0 Name: CUN_RS_OK

Meaning: The operation was successful.

Action: None.

All
4 1 Name: CUN_RS_TRG_EXH

Meaning: The target buffer was exhausted before all characters in the source buffer were converted.

Action: Call the service again with either a target buffer large enough to hold the complete result of the conversion or keep the result of the conversion just performed and repeat calling the service with the part of the source buffer that was not converted and concatenate the results of the various conversions.

Conversion
4 2 Name: CUN_RS_INV_HANDLE_NOSET

Meaning: Conversion is terminated. The handle is invalid because a SET UNI command has changed the environment.

Action: Clear the handle and make sure that the FROM-CCSID and TO-CCSID are specified in the parameter area. Then call the service again.

Conversion
4 3 Name: CUN_RS_INV_HANDLE_SET

Meaning: Conversion is terminated. The handle is invalid because a SET UNI command is in process and will change the conversion environment.

Action: Clear the handle and make sure that the FROM-CCSID and TO-CCSID are specified in the parameter area. Consider waiting until the SET UNI command completes before calling the service again. Otherwise the same error condition is returned.

Conversion
4 4 Name: CUN_RS_NO_HANDLE

Meaning: Conversion is terminated. No handle can be obtained because a SET UNI command is in process and will change the conversion environment.

Action: Clear the handle and make sure that the FROM-CCSID and TO-CCSID are specified in the parameter area. Consider waiting until the SET UNI command completes before calling the service again. Otherwise the same error condition is returned.

Conversion
4 6 Name: CUN_RS_SUB_ACT_TERM

Meaning: A character was found in the source buffer which cannot be converted into a TO-CCSID character and the CUNBNPRM_Sub_Action flag specifies terminate with error.

Action:
  1. Check whether the input string is correct and whether the correct conversion tables are used.
  2. Turn on the Sub_Action flag to replace the invalid character with the target substitution character and call the conversion service again.
Conversion
4 7 Name: CUN_RS_MBC_INCOMPLETE

Meaning: An incomplete character was found in the source buffer. This error happens when not all bytes of a multi-byte character are found in the source buffer. For example, the incomplete character can be found at the end of the source buffer if only the first byte of a double-byte character fits into the buffer.

Action: Check whether the input string is correct. Make sure that the missing bytes are in the source string.

Conversion
4 8 Name: CUN_RS_CONTINUATION

Meaning: For character casing, the character condition of being FINAL or NON_FINAL in a word could not be determined, as the character was the last character in the source buffer but not the last character in the caller's source data. The character in question is not cased.

Action: Next call to casing service needs to start with the uncased character of this call as the first source character.

Case
4 9 Name: CUN_RS_STAGE2_FAIL

Meaning: An indirect character conversion, which first converts from the source CCSID into UCS-2 characters in a workarea and then in a second stage from the workarea to the target buffer, experienced an error during stage 2 conversion. As there is no correlation of the failing stage 2 character to a certain stage 1 character, we reset the source and target pointers and length values to the original caller's values. The workarea pointer and length values are updated to point to the character which failed conversion.

Action: Check whether the input string and the parameter settings used are reasonable.

Conversion
4 0A Name: CUN_RS_WRK_EXH

Meaning: The work buffer was exhausted before all characters in the target buffer could be processed.

Action: Call the service again with the new parameter value in the work buffer, where the work buffer size must be at least the same size as the target buffer.

Normalization
4 0B Name: CUN_RS_SOURCE_LEN_ZERO

Meaning: For collation, one or both of the source input parameters or both (CUNBOPRM_Src1_Buf_Len or CUNBOPRM_Src2_Buf_Len) has length zero. This is a completely valid operation when a comparison is needed. When a sort key needs to be generated, users will not be notified about zero lengths.

Action: Avoid the call to collation if one of the source input parameters has length zero (if CUNBOPRM_SKey_Opt=OFF). Performance will be improved. Results will be the same.

Collation
4 0C Name: CUN_RS_MAL_CHAR_ACT_TERM

Meaning: A character was found in the source buffer which is not a valid source character and could not be converted. CUNBCPRM_Mal_Action specifies “terminate with error”.

Action: Check whether the input string is correct and the correct conversion tables were used. An incomplete character may be causing a range check to fail.

Conversion
4 0D Name: CUN_RS_INVALID_COLL_DATA_VER

Meaning: The specified Collation version is already loaded into the Unicode DataSpace.

Action: Check whether the specified collation version is correct and recall the service.

Collation
4 0E Name: CUN_RS_INVALID_ALTERNATE_VALUE

Meaning: Invalid alternate value. When Collation API version is set to CUNBOPRM_Ver2 or CUN4BOPR_Ver2 (31 and 64 bit respectively) there are only two valid values. If the invalid value is entered, this RS is set and the default value is set.

Action: Call the service again with a valid alternate value:
  • ALTERNATE_NON_IGNORABLE
  • ALTERNATE_SHIFTED
Collation
4 0F Name: CUN_RS_INVALID_NORMALIZATION_VALUE

Meaning: Invalid normalization value. When Collation API version is set to CUNBOPRM_Ver2 or CUN4BOPR_Ver2 (31 and 64 bit respectively), there are only two valid values. If invalid value is entered, this RS is set and default is value is set.

Action: Call the service again with a valid normalization value:
  • NORMALIZATION_OFF
  • NORMALIZATION_ON
Collation
4 10 Name: CUN_RS_LOCALES_AND_UCR_ARE_EXCLUSIVE

Meaning: CUNBOPRM_Locale/CUN4BOPR_Locale (31-bit and 64-bit respectively) and CUNBOPRM_Collation_Rules_File/ CUN4BOPR_Collation_Rules_File (31-bit and 64-bit respectively) are mutually exclusive. If this were the case then this RS is set and Locale info has the highest priority over User Collation Rules sets.

Action: Call the service again with CUNBOPRM_Locales/CUN4BPRM_Locales (31-bit and 64-bit respectively) information or CUNBOPRM_Collation_Rules_File/ CUN4BOPR_Collation_Rules_File Collation (31-bit and 64-bit respectively) rules information but not both.

Collation
8 1 Name: CUN_RS_PARM_VER

Meaning: Wrong version of the parameter area used.

Action: Use the correct parameter area version constant provided in the following interface definition file.
z/OS Unicode service               31-bit     64-bit
Character conversion              CUNBCIDF   CUN4BCID
Case Conversion                   CUNBAIDF   CUN4BAID
Normalization                     CUNBNIDF   CUN4BNID
Collation                         CUNBOIDF   CUN4BOID
BIDI                              CUNBBIDF   CUN4BBID
StringPrep                        CUNBPIDF   CUN4BPID
Conversion information service    CUNBIIDF   CUN4BIID
When the service is called successfully, CUNBIPRM_Return_Code = 0 and CUNBIPRM_Reason_Code = 0.
Conversion
8 2 Name: CUN_RS_WRK_BUF_SMALL

Meaning: The work buffer is not large enough to hold at least one character of the maximum width of characters as used with the work buffer in indirect conversions.

Action: Call the service again using a work buffer of larger size.

Conversion, Normalization, Collation, StringPrep
8 3 Name: CUN_RS_CCSID_NOT_SUPP

Meaning: The specified conversion is not supported in the current conversion image.

Action: Verify that the FROM-CCSID, TO-CCSID, and technique-search-order parameters on the call to the conversion services specify a conversion that has been included in the currently active conversion image. The DISPLAY UNI command can be used by the system operator to display the available conversions. Have your system administrator update the conversion image to include the specified conversion or change the parameter specification as appropriate.

All
8 4 Name: CUN_RS_CASE_NOT_SUPP
Meaning: It can be one of the following meanings:
  • An unsupported case conversion type was specified.Action: Call the service with the conversion type parameter set to a supported conversion type.
  • An invalid locale name was specified in CUNBAPRM_Locale or CUN4BAPR_Locale (31 and 64-bit respectively).Action : Call the service with a valid locale name (See Locales supported for case service).
Case
8 5 Name: CUN_RS_SUBCODEPAGE

Meaning: The subcodepage number supplied by the caller in the input parameter list is invalid. It is not in the range of numbers valid for the specified conversion.

Action: Call the service again with a subcodepage number in the valid range. A value of binary zero will let the conversion start with the default codepage for this conversion.

Conversion
8 6 Name: CUN_RS_TRG_BUF_SMALL

Meaning: The target buffer is not large enough to hold at least one character of the maximum width of characters as given by the TO-CCSID.

For CASE, Normalization, StrigPrep, and BIDI Unicode Services, target buffer is not large enough to hold at least one UTF-16 BE character.

For Collation Service, target buffer is not large enough to hold at least one UTF-16 BE as intermediate normalized string or target buffer is not large enough to hold at least one sort-key value.

Action: Call the service again using a target buffer of adequate length.

All
8 7 Name: CUN_RS_DDA_BUF_SMALL

It can be either of the following reasons:

  • Meaning: The caller supplied a DDA buffer that is not large enough for the storage required by the conversion services.

    Action: Call the service again using the required DDA_Buf_Len as described by the following constant:
    • For 31-bit callers:
      • CUNBCPRM_DDA_Req for character conversion (in interface definition file CUNBCIDF)
      • CUNBAPRM_DDA_Req for case conversion (in interface definition file CUNBAIDF)
      • CUNBNPRM_DDA_Req for normalization (in interface definition file CUNBNIDF)
      • CUNBOPRM_DDA_Req for collation (in interface definition file CUNBOIDF)
      • CUNBIPRM_DDA_Req for information service (in interface definition file CUNBIIDF)
      • CUNBCPRM_DDA_REQ2 for character conversion if CUNBCPRM_Version is set to CUNBCPRM_VER2 (in interface definition file CUNBCIDF).
    • For 64-bit callers:
      • CUN4BCPR_DDA_Req for character conversion (in interface definition file CUN4BCID)
      • CUN4BAPR_DDA_Req for case conversion (in interface definition file CUN4BAID)
      • CUN4BNPR_DDA_Req for normalization (in interface definition file CUN4BNID)
      • CUN4BOPR_DDA_Req for collation (in interface definition file CUN4BOID)
      • CUN4BIPR_DDA_Req for information service (in interface definition file CUN4BIID)
      • CUN4BCPR_DDA_REQ2 for character conversion if CUN4BCPR_Version is set to CUN4BCPR_VER2 (in interface definition file CUN4BCID).
  • Meaning: Technique "B" (BIDI) was specified and the DDA value in CUNBCPRM_DDA_Buf_Len (31 bit) or CUN4BCPR_DDA_Buf_Len (64 bit) does not meet the technique "B" DDA requirements.

    Action: Call the service using CUNBCPRM_DDA_Req2 (31 bit) or CUN4BCPR_DDA_Req2 (64 bit) provided in the interface definition file CUNBCIDF (31 bit) or CUN4BCID (64-bit).

Conversion, Case, Normalization, Collation, Information Service
8 8 Name: CUN_RS_DDA_MIN_SMALL

Meaning: The caller supplied a DDA buffer that is not large enough for the storage needed for the initial call to CUNMCNV, CUN4MNCV, CUNMNORM, CUN4MNOR, CUNMOCOL, or CUN4MCOL.

Action: You can take one of the following actions:
  • For CUNMCNV and CUN4MNCV, call the service again using the required DDA_BUF_LEN returned in the handle field HUCCE_DDA_BUF_LEN.
  • For Normalization (CUNMNORM and CUN4MNOR - 31 and 64-bit respectively) and Collation (CUNMOCOL and CUN4MCOL - 31 and 64-bit respectively) Services, use the following constants provided in the interface definition files:
    • 31-bit callers:
      • CUNBNPRM_DDA_Req for character conversion (in interface definition file CUNBNIDF)
      • CUNBOPRM_DDA_Req for case conversion (in interface definition file CUNBOIDF)
    • 64-bit callers:
      • CUN4BNPR_DDA_Req for character conversion (in interface definition file CUN4BNID)
      • CUN4BOPR_DDA_Req for case conversion (in interface definition file CUN4BOID)
Conversion, Normalization, Collation
8 9 Name: CUN_RS_INV_NORM_TYPE

Meaning: An unsupported normalization type was specified in normalization parameter area (CUNBOPRM).

Action: Call the service again using a valid normalization type: CUNBNPRM_D=1, CUNBNPRM_C=2, CUNBNPRM_KD=3, CUNBNPRM_KC=4.

Normalization
8 0A Name: CUN_RS_INV_COLL_LEVEL

Meaning: An unsupported collation level was specified.

Action: Use a valid collation level in IDF_CUNBOIDF.

Collation
8 0B Name: CUN_RS_NO_SERV_AVAILABLE

Meaning: An unavailable service was called in the active image.

Action: Use SET command to load an image with the service available.

Case, Normalization, Collation
8 0C Name: CUN_RS_WRK_EXHAUSTED

Meaning: The work buffer was exhausted before all the Unicode characters (source buffers) were represented in collation elements (weights – work buffers).

Action: Call the service again with new parameter value in the work buffer.

Collation
8 0D Name: CUN_RS_TARG_EXHAUSTED

Meaning: The target buffer was exhausted before all collation elements (work buffers) were represented in a sort key (target buffers).

Action: Call the service again with new parameter value n in the target buffer.

Collation
8 0E Name: CUN_RS_REAL_EXHAUSTED

Meaning: There is not enough real storage to dynamically store the tables in the image during the conversion request.

Action: Increase the Realstorage value using:
  • REALSTORAGE keyword from the CUNUNI parmlib member
  • REALSTORAGE keyword from the SETUNI console command
and call the service again.

The target buffer was exhausted before all collation elements (work buffers) were represented in a sort key (target buffers).

All
8 10 Name: CUN_RS_PROFILE_NOT_FOUND

Meaning: The specified profile was not found on the default or the user specified data set.

Action: Verify that the profile parameter on the call to the conversion services exists on the data set or is loaded. The system operator can use the DISPLAY UNI command to display the available profiles.

Stringprep
8 11 Name: CUN_RS_UNASSIGNED_CODE_POINT

Meaning: A character was found in the source buffer which is in the unassigned range. CUNBPPRM_UNASSIGNER = 1 specifies "terminate with error".

Action: Check whether the input string is correct.

Stringprep
8 12 Name: CUN_RS_STRINGPREP_FAILED_AT

Meaning: Stringprep service failed while running one of the steps on the profile.

Action: Call the service again.

Stringprep
8 14 Name: CUN_RS_SRC_BUFF_LEN_ZERO

Meaning: Source buffer length is 0.

Action: Call the service again with new parameter value in the source buffer length.

Stringprep
8 15 Name: CUN_RS_SRC_BUFF_PTR_NULL

Meaning: Source buffer pointer is NULL.

Action: Call the service again with a valid source buffer pointer.

Stringprep
8 16 Name: CUN_RS_TRG_BUFF_PTR_NULL

Meaning: Target buffer pointer is NULL.

Action: Call the service again with a valid target buffer pointer.

Stringprep
8 17 Name: CUN_RS_INVALID_NORM_DATA_VER

Meaning: Invalid Normalization data Version was introduced when trying to use the Normalization services.

Action: Call the service again with a valid normalization data version (31/64-bit respectively):
  • CUNBNPRM_NONE/CUN4BNPR_NONE
  • CUNBNPRM_UNI301/CUN4BNPR_UNI301
  • CUNBNPRM_UNI320/CUN4BNPR_UNI320
  • CUNBNPRM_UNI401/CUN4BNPR_UNI401
  • CUNBNPRM_UNI410/CUN4BNPR_UNI410
  • CUNBNPRM_UNI600/CUN4BNPR_UNI600
  • CUNBNPRM_UNI900/CUN4BNPR_UNI900
  • CUNBNPRM_UNIX13/CUN4BNPR_UNIX13
Normalization
8 18 Name: CUN_RS_INVALID_COLLATION_KEYWORD_VALUES

Meaning: Invalid collation keyword values were introduced in CUN4BOPR_Collation_Keyword or CUNBOPRM_Collation_Keyword (31/64-bit respectively) collation parameter area field.

Action: Specify a valid keyword value and call the service again. For further information, see CUN4BOPR_Collation_Keyword or CUNBOPRM_Collation_Keyword (31/64-bit respectively) in the collation parameter description topic.

Collation
8 19 Name: CUN_RS_INVALID_UCA_VERSION

Meaning: Invalid Unicode collation version (or incompatible UCA version to the collation version) on fields: CUN4BOPR_UCA_Ver or CUNBOPRM_UCA_Ver (31/64-bit respectively)

Action: Call the service again with a valid or compatible UCA version to the collation version (31/64-bit respectively):
  • CUNBOPRM_UCAempty/CUN4BOPR_UCAempty
  • CUNBOPRM_UCA301/CUN4BOPR_UCA301
  • CUNBOPRM_UCA400R1/CUN4BOPR_UCA400R1
  • CUNBOPRM_UCA410/CUN4BOPR_UCA410
  • CUNBOPRM_UCA600/CUN4BOPR_UCA600
  • CUNBOPRM_UCA900/CUN4BOPR_UCA900
  • CUNBOPRM_UCAX13/CUN4BOPR_UCAX13
Collation
8 1A Name: CUN_RS_INVALID_CASEFIST_VALUE

Meaning: Invalid case first value.

Action: Call the service again with a valid case first value:
  • CASEFIRST_OFF
  • CASEFIRST_UPPER
  • CASEFIRST_LOWER
Collation
8 1B Name: CUN_RS_INVALID_LOCALE_INPUT

Meaning: Invalid locale input.

Action: See Locales for collation and case support for valid locales support.

Collation
8 1C Name: CUN_RS_TARG_BUFF_LEN_ZERO

Meaning: Target buffer length is 0.

Action: Call the service again with new parameter value in the target buffer length.

Stringprep
8 1D Name: CUN_RS_WRK_BUFF_LEN_ZERO

Meaning: Work buffer length is 0.

Action: Call the service again with new parameter value in the work buffer length.

Stringprep
8 1E Name: CUN_RS_WRK_BUFF_PTR_NULL

Meaning: Work buffer pointer is NULL.

Action: Call the service again with a valid work buffer pointer.

Stringprep
8 1F Name: CUN_RS_OVERLAYING_COLLATION_KEYWORD

Meaning: Collation keyword values are overlaid (same collation keywords appear more than once at CUNBOPRM_COLLATION_KEYWORD/ CUN4BOPR_COLLATION_KEYWORD (31-bit and 64-bit respectively).

Action: Remove collation keywords that appear more than once.

Collation
8 20 Name: CUN_RS_INVALID_UNI_VERSION

Meaning: An unsupported Unicode version was specified for CASE conversion service.

Action: Specify one of the following:
  • CUNBAPRM_UNI300 / CUN4BAPR_UNI300
  • CUNBAPRM_UNI301 / CUN4BAPR_UNI301
  • CUNBAPRM_UNI320 / CUN4BAPR_UNI320
  • CUNBAPRM_UNI401 / CUN4BAPR_UNI401
  • CUNBAPRM_UNI410 / CUN4BAPR_UNI410
  • CUNBAPRM_UNI500 / CUN4BAPR_UNI500
  • CUNBAPRM_UNI600 / CUN4BAPR_UNI600
  • CUNBAPRM_UNI900 / CUN4BAPR_UNI900
  • CUNBAPRM_UNIX13 / CUN4BAPR_UNIX13
Conversion
8 21 Name: CUN_RS_BIDI_CANNOT_SHAPE

Meaning: Transformation stopped due to an input code element that cannot be shaped.

Action: Call the service again with different input.

Conversion
8 22 Name: CUN_RS_BIDI_INCOMPLETE_COMPOSITE

Meaning: Transformation stopped due to an incomplete composite sequence at the end of the source buffer.

Action: Call the service again with different input.

Conversion
8 23 Name: CUN_RS_BIDI_RANGE_ERROR

Meaning: More than 15 embedding levels are present, or the source buffer contains unbalanced directional layout information (push/pop), or an incomplete composite sequence has been detected in the beginning of the source buffer.

Action: Call the service again with different input.

Conversion
8 24 Name: CUN_RS_BIDI_PARM_CONFLICT

Meaning: The parameter values are set to a meaningless combination.

Action: Call the service again with different input.

Conversion
8 25 Name: CUN_RS_INVALID_BIDI_KEYWORD_VALUES

Meaning: Invalid keyword values were introduced.

Action: Call the service again with a valid keyword value.

Conversion
8 26 Name: CUN_RS_LOC_NOT_SUPPORTED

Meaning: The locale name specified in the locale parameter is not supported.

Action: Call the service again with a valid locale name.

Dynamic locale service
8 27 Name: CUN_RS_LOC_CCSID_NOT_SUPPORTED

Meaning: The CCSID specified for the Targ_CCSID parameter is not supported.

Action: Call the service again with a valid CCSID.

Dynamic locale service
8 28 Name: CUN_RS_LOC_BUILD_ERROR

Meaning: An error was encountered while building the target locale.

Action: Call the service again with different input.

Dynamic locale service
8 29 Name: CUN_RS_LOC_ENV_ERROR

Meaning: An I/O error was encountered while building the target locale.

Action: Check your file system environment and call the service again.

Dynamic locale service
8 2A Name: CUN_RS_LOC_DATA_FMT_NOT_SUPPORTED

Meaning: The dynamic locale service does not support more than two byte codes when the CUNBLPRM_Flags1 Data_fmt bit is set to 1.

Action: Call the service again with a valid CCSID.

Dynamic locale service
0C 1 Name: CUN_RS_NO_UNI_ENV

Meaning: The conversion environment is not set up.

Action: IPL is necessary to initialize the conversion environment.

All
0C 2 Name: CUN_RS_NO_CONVERSION

Meaning: The conversion services are not available.

Action: IPL is necessary to load the conversion services.

Conversion
0C 3 Name: CUN_RS_DYN_ACTION_FAILED
Meaning: The dynamic action failed because either:
  • There is no primary storage available, or
  • Unicode can not release storage needed for dynamic loading of tables, or
  • There were abnormal operations on the dynamic

Action: Contact your system operator to load conversion services via SET UNI command. If problems persist, refer to message CUN4026I for more details.

Infrastructure
0C 4 Name: CUN_RS_NO_MEM

Meaning: Unable to allocate memory.

Action: IPL is necessary to recover.

Conversion
10 1 Name: CUN_RS_INCONSISTENT_UCCB

Meaning: The UCCB is in an inconsistent state.

Action: IPL is necessary to recover.

Infrastructure
10 2 Name: CUN_RS_INCONSISTENT_UCCE

Meaning: The UCCE is in an inconsistent state.

Action: IPL is necessary to recover.

Infrastructure
10 3 Name: CUN_RS_INV_CONVERSION

Meaning: The contents of UCCE_CONVERSION are invalid.

Action: IPL is necessary to recover.

Conversion
10 4 Name: CUN_RS_INCONSISTENT_UCAE

Meaning: The UCAE is in an inconsistent state.

Action: IPL is necessary to recover.

Infrastructure
10 5 Name: CUN_RS_INCONSISTENT_TABLES

Meaning: The tables used for case conversion have inconsistent content.

Action: Run the image generator to create a new image with the appropriate case tables and issue the SET UNI command to activate it.

Conversion
10 6 Name: CUN_RS_INCONSISTENT_UCNE

Meaning: The UCAE is in an inconsistent state.

Action: IPL is necessary to recover.

Infrastructure
10 7 Name: CUN_RS_INCONSISTENT_UCOE

Meaning: The UCOE is in an inconsistent state.

Action: IPL is necessary to recover.

Infrastructure
10 1C Name: CUN_RS_WA_NOT_ALIGNED

Meaning: An internal work area for the TRxx simulation code is not aligned on a double word boundary.

Action: This is an internal error. Call the IBM® Support Center. IPL is necessary to recover.

Conversion
10 20 Name: CUN_RS_TABLE_NOT_ALIGNED

Meaning: The conversion table is not aligned on a page boundary.

Action: This is an internal error. Call the IBM Support Center. IPL is necessary to recover.

Conversion