Problem:
This is the error:
COBDB0103S WS-SQL-SELECT does not have a suitable definition to be used as a host variable.
The PREPARE statement is causing the error:
EXEC SQL
PREPARE WS_DECLARE FROM :WS-SQL-SELECT
END-EXEC.
where the host variable is declared as:
01 WS-SQL-SELECT PIC X(300).
Resolution:
The host variable needs to be declared as a variable character string using 49 levels.
For example declare the host variable as follows:
01 WS-SQL-SELECT.
49 WS-SQL-SELECT-LEN PIC S9(4) COMP-5.
49 WS-SQL-SELECT-DATA PIC X(300).
#MainframeExpressandMFE
#MFDS
#COBOL
#EnterpriseDeveloper
#Enterprise
#netexpress




