By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,278 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,278 IT Pros & Developers. It's quick & easy.

urgent : stored procedure not accepting data string more than 1024 bytes

P: n/a
have a stored procedure running on DB2 V7 Z/os calling a COBOL
program to do some inserts. The stored procedure have 3 input columns
and one column is of varchar(32648)
The stored procedure is being called from a V7 DB2 connect client.

The stored procedure is giving SQL0104N An unexpected token was found
if my varchar data goes beyond 1024 bytes. Anything under 1025 bytes
on that column is working perfectly.
Does anybody know of any limitation of Stored procedure.

here is the stored procedure

CREATE PROCECURE CUSTOMSP
(
,IN CUSTOMER_NO CHAR(10)
,IN ORD_NO CHAR(8)
,IN ENCODED_DATA VARCHAR(32648)
,OUT WSRETURN INT
)
FENCED
LANGUAGE COBOL
EXTERNAL NAME 'CUSTOMSP'
NOT DETERMINISTIC
MODIFIES SQL DATA
NO DBINFO
COLLID CUSTOMR
NO WLM ENVIRONMENT
ASUTIME NO LIMIT
RESULT SETS 1
STAY RESIDENT NO
PROGRAM TYPE MAIN
SECURITY DB2
COMMIT ON RETURN NO

here is my call statement

CALL
CUSTOMSP('A123456789','12345678','000001ABCDEFGHIJ 12345678901234567890
12345678901234567890123456789012345678901234567890 1234567890123456789
0000002ABCDEFGHIJ123456789012345678901234567890123 45678901234567890
123456789012345678901234567890123456789Z000003ABCD EFGHIJ12345678901
23456789012345678901234567890123456789012345678901 2345678901234567890
123456789z000004ABCDEFGHIJ123456789012345678901234 5678901234567890
12345678901234567890123456789012345678901234567890 000005ABCDEFGHIJ
12345678901234567890123456789012345678901234567890 123456789012345678
9012345678901234567890000006ABCDEFGHIJ123456789012 34567890123456789
01234567890123456789012345678901234567890123456789 0123456789Z000007
ABCDEFGHIJ1234567890123456789012345678901234567890 1234567890123456
789012345678901234567890123456789z000008ABCDEFGHIJ 1234567890123456
78901234567890123456789012345678901234567890123456 78901234567890
1234567890000009ABCDEFGHIJ123456789012345678901234 56789012345678901
23456789012345678901234567890123456789012345678900 00010ABCDEFGHIJ
12345678901234567890123456789012345678901234567890 12345',?);

Below is the message I am getting :
SQL0104N An unexpected token
"'000001ABCDEFGHIJ1234567890123456789012345678 90" was found following
","
Expected tokens may include: "<server-input-data>". SQLSTATE=42601

Any help is apprecaited

Thanks

Roger

Sep 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.