Receiver value too small to hold result error occurs from SQLEXTDDS procedure call when used from a COBOL program
From Support
| | If you have a question or seek clarification, please call Technical Support. |
[edit]
Problem:
The following error occurs when trying to use the SQLEXTDDS function from a COBOL program.
Date sent . . . . . . : 01/19/04 Time sent . . . . . . : 11:57:43
Message . . . . : Receiver value too small to hold result.
Display Message Details
Message ID . . . . . . : MCH1210 Severity . . . . . . . : 40
Date sent . . . . . . : 01/19/04 Time sent . . . . . . : 11:57:43
Message type . . . . . : Escape
CCSID . . . . . . . . : 65535
From program . . . . . . . . . : RPGDDS01R
From library . . . . . . . . : RJSRPGSQL
From module . . . . . . . . : RPGDDS01R
From procedure . . . . . . . : SQLEXTDDS
From statement . . . . . . . : 1716
To program . . . . . . . . . . : RPGDDS01R
To library . . . . . . . . . : RJSRPGSQL
To module . . . . . . . . . : RPGDDS01R
To procedure . . . . . . . . : SQLEXTDDS
To statement . . . . . . . . : 1716
Bottom
Press Enter to continue.
F1=Help F3=Exit F12=Cancel
[edit]
Solution:
When calling the SQLEXTDDS procedure from a COBOL or RPG program, the AS/400 file name and library name should always be in capital letters.
The following COBOL code:
MOVE 'machine ' TO SQL_DDSFILE MOVE 'RJSRPGSQL' TO SQL_DDSLIB
Should be changed to this:
MOVE 'MACHINE ' TO SQL_DDSFILE MOVE 'RJSRPGSQL ' TO SQL_DDSLIB
Apparently the lower case AS/400 file name will not work on the SQLEXTDDS procedure call. It must be specified in upper case as listed above. Also, always pad to 10 characters for good measure.
