Ansicht
Dokumentation

SQL0312 - Variable &1 not defined or not usable. ( OS/400 )

SQL0312 - Variable &1 not defined or not usable. ( OS/400 )

BAL_S_LOG - Application Log: Log header data   Addresses (Business Address Services)  
This documentation is copyright by IBM.
SAP E-Book


Message : SQL0312
Variable &1 not defined or not usable.

Message Long Text :

Cause . . . . . : The variable &1 appears in the SQL statement, but one of the following conditions exists:
-- No declaration for the variable exists or the declaration is not within the current scope.
-- The attributes are not correct for the use specified.
-- The host variable was specified in dynamic SQL. Host variables are not valid in dynamic SQL.
-- In REXX, host variable names cannot contain embedded blanks.
-- The variable name is used in the routine body of an SQL procedure or function, but the variable is not declared as an SQL variable or parameter. The scope of an SQL variable is the compound statement that contains the declaration.
-- The variable is used in the routine body of an SQL trigger, but the variable is not declared as an SQL variable or the variable is an OLD transition variable and cannot be modified.
-- The variable is a transition variable in an AFTER trigger and is used in statement where the variable could be modified. Modifying transition variables in AFTER triggers is not allowed.
Recovery . . . : Do one of the following and try the request again.
-- Verify that &1 is spelled correctly in the SQL statement.
-- Verify that the program contains a declaration for that variable. In RPG, the variable must be declared globally or in the scope where it is used.
-- Verify that the attributes of the variable are compatible with its use in the statement.
-- Use parameter markers in dynamic SQL instead of host variables.
-- Remove embedded blanks from REXX host variable names.
-- Declare the variable as an SQL variable or parameter in the SQL procedure or function.
-- Declare the variable as an SQL variable or specify a NEW transition variable when the variable is modified in an SQL trigger.
-- Remove the transition variable from the statement. Copying the transition variable to a local variable and then using the local variable in the statement is also acceptable.

Message File : QSQLMSG
Library Message File : QSYS2924


Vendor Master (General Section)   BAL Application Log Documentation  
This documentation is copyright by IBM.

Length: 3250 Date: 20240424 Time: 163216     sap01-206 ( 3 ms )