SQL0206-Column or global variable XXXXXX not found.
时间:2015-09-17 ┊ 阅读:8,874 次 ┊ 标签: 编程 , 经验 , 问题
今天遇到此问题,调查半天,runsql都程序里拼接好都是正常的,拿出来单独跑也可以成功,但在job里跑时就报了如下错误,说一个字段竟然找不到,百思不解。最后想可能引用的file版本不对,找到job的initial libl,然后在这个libl下runsql竟然重现了原来的错误,一看output出来的file确实无此字段。终于明白了问题的原因所在,问题也得以解决。
永远不要相信程序会出错,程序只会机械的执行command。
Message . . . . : Column or global variable SCBILD not found.
Cause . . . . . : SCBILD was not found as a column of table *N in *N and was
not found as a global variable in *N. If the table is *N, SCBILD is not a
column of any table or view that can be referenced. Recovery . . . : Do
one of the following and try the request again: -- Ensure that the column
and table names are specified correctly in the statement. -- If this is a
SELECT statement, ensure that all the required tables were named in the FROM
clause. -- If the column was intended to be a correlated reference, qualify
the column with the correct table designator. -- If the column was intended
to be a global variable, qualify the name with the schema where the global
variable exists or ensure the schema is in the path.
From module . . . . . . . . : QQXCPIMESS
From procedure . . . . . . : QQxCPIMessage__SendMessage
Statement . . . . . . . . . : 16
To module . . . . . . . . . : QQXSQLSTAT
To procedure . . . . . . . : QQxSQLStatement__HandleSQLError
Statement . . . . . . . . . : 28
Message . . . . : RUN QUERY command failed with SQLCODE -206.
Cause . . . . . : The SQLCODE is -206. The SQLSTATE is 42703. The DB2 for
i5/OS SQL message text for this error is: Column or global variable SCBILD
not found. Recovery . . . : Check the job log for more information,
correct the error and try the request again.
17/09/15 14:27:21.404494 QQXSRV01 QSYS *STMT QQXSRV01
From module . . . . . . . . : QQXCPIMESS
From procedure . . . . . . : QQxCPIMessage__SendMessage
Statement . . . . . . . . . : 16
To module . . . . . . . . . : QQXPERMQUE
To procedure . . . . . . . : QQxPermQuery__ProcessRunCmd
Statement . . . . . . . . . : 39
Message . . . . : RUN QUERY command ended due to error.
Cause . . . . . : An error occurred when processing a query management RUN
Job Log MERLIN 17/09/15 15:08:17
COGNOSBLD User . . . . . . : AVNAP Number . . . . . . . . . . .
DAYENDAUP7 Library . . . . . : QGPL
SEV DATE TIME FROM PGM LIBRARY INST TO PGM
QUERY command, causing the command to end. Recovery . . . : Check
preceding messages about your request in the job log. Correct any errors
brought to your attention, then try the request again.
40 17/09/15 14:27:21.428073 QQXCLSTQ QSYS 01F5 RUNSQL3
Message . . . . : STRQMQRY command failed.
Cause . . . . . : Each STRQMQRY request normally causes multiple query
management commands to be processed. Query management ended processing for
one of these commands due to an error condition. At least one message about
the error was placed in the job log. Recovery . . . : See the detailed
messages in the job log for more information. Make any necessary corrections
and try the request again.
看个美图奖励下自己!