AndrewBains
asked on
Declare CLOB as a host variable and use it in SQL statement in PLI
Hi guys,
i get compile error when I use the code 1, and SOC4 error when I use the code 2. This is in language PLI (mainframe)
1) Compile Error: UNUSABLE HOST VARIABLE HOST_VAR
I am declaring HOST_VAR as 02 level.
DCL 01 STRUC,
02 VAR1 CHAR(10),
02 VAR2 CHAR(5),
02 HOST_VAR USAGE IS SQL TYPE IS CLOB (10M);
EXEC SQL
SELECT :HOST_VAR FROM SYSIBM.SYSDUMMY1;
2) S04 error : Indexing or subscripting outside defined limits
When I am declaring HOST_VAR as seperate 01 level
01 HOST_VAR USAGE IS SQL TYPE IS CLOB (10M);
EXEC SQL
SELECT :HOST_VAR FROM SYSIBM.SYSDUMMY1
any ideas?
i get compile error when I use the code 1, and SOC4 error when I use the code 2. This is in language PLI (mainframe)
1) Compile Error: UNUSABLE HOST VARIABLE HOST_VAR
I am declaring HOST_VAR as 02 level.
DCL 01 STRUC,
02 VAR1 CHAR(10),
02 VAR2 CHAR(5),
02 HOST_VAR USAGE IS SQL TYPE IS CLOB (10M);
EXEC SQL
SELECT :HOST_VAR FROM SYSIBM.SYSDUMMY1;
2) S04 error : Indexing or subscripting outside defined limits
When I am declaring HOST_VAR as seperate 01 level
01 HOST_VAR USAGE IS SQL TYPE IS CLOB (10M);
EXEC SQL
SELECT :HOST_VAR FROM SYSIBM.SYSDUMMY1
any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.