Problem:
19703 SQL error trying to connect to Oracle Database from PL/I with the following code
dcl dbdbase value('xxxxx') char;
dcl dbuser value('yyyyy') char;
dcl dbpass value('zzzzz') char;
Exec sql connect :dbdbase USER :dbuser using :dbpass;
Narrative:
According to the SQL standards the arguments for the Connect should be variables and not constants.
The usage of 'value' causes the arguments to be defined as constants, whereas the usage of 'init' causes the arguments to be defined as variables.
Resolution:
Amend the code such that the variables are defined with a specific length, and initialised with ‘init’, e.g.
dcl dbname char(8) init('xxxxx');
dcl dbuser char(8) init('yyyyy');
dcl dbpass char(9) init('zzzzz');
exec sql connect to :dbdbase user :dbuser using :dbpass;
#Enterprise
#Server
#EnterpriseServer
