View previous topic :: View next topic
|
Author |
Message |
satishboddu
New User
Joined: 02 Aug 2011 Posts: 17 Location: India
|
|
|
|
Hi,
I am trying to execute a dynamic SQL in a cobol program .. the dynamic SQL is placed in the below variable
01 WS-SQL-AREA-G.
49 WS-SQL-PTR PIC S9(4) COMP.
49 WS-SQL-AREA PIC X(32760).
Since the max size of WS-SQL-PTR is +9999, when the length of my query exceeds by that numbers. it is throwing a sqlcode -104 on PREPARE
Pls suggest on how to execcute a query which has length more than +9999.
Thanks in Advance. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Define the field as COMP-5, not COMP. This will give you up to 32,767 in a signed field. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You talk about SQLCODE=-104, have you seen what is flagged in SQLCA? |
|
Back to top |
|
|
|