Skip to content

Instantly share code, notes, and snippets.

@phpdave
Created June 23, 2015 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpdave/99979df55be03e3e5339 to your computer and use it in GitHub Desktop.
Save phpdave/99979df55be03e3e5339 to your computer and use it in GitHub Desktop.
Testing Dynamic Compound statement to IBM i V7R1 TR10 on a JDBC connection via JTopen 8.5 driver in Netbeans 8.0.2. DC statements work in STRSQL and System I Navigator "Run SQL"
BEGIN
DECLARE V_ERROR BIGINT DEFAULT 0;
END
Error code -104, SQL state 42601: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: ;. Cause . . . . . : A syntax error was detected at token <END-OF-STATEMENT>. Token <END-OF-STATEMENT> is not a valid token. A partial list of valid tokens is ;. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token <END-OF-STATEMENT>. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
Line 1, column 1
Error code -104, SQL state 42601: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: DECLARE. Cause . . . . . : A syntax error was detected at token <END-OF-STATEMENT>. Token <END-OF-STATEMENT> is not a valid token. A partial list of valid tokens is DECLARE. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token <END-OF-STATEMENT>. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
Line 3, column 1
Execution finished after 0 s, 2 error(s) occurred.
cursor hold true
translate binary false
autocommit exception false
query timeout mechanism qqrytimlmt
extended metadata false
remarks system
use block update false
server trace 0
data truncation true
access all
true autocommit false
cursor sensitivity asensitive
concurrent access resolution 0
auto commit true
libraries *libl
jvm16 synchronize true
metadata source 1
package ccsid 13488
exteneded dynamic false
translate boolean true
sort language ENU
full open false
data compression true
hold statements false
bidi implicit reordering true
maximum blocked input rows 32000
trace false
package criteria default
database name HLP400A
errors full
time format iso
XA loosely coupled support 0
decimal separator .
thread used true
block criteria 2
query optimize goal 0
decfloat rounding mode half even
package add true
behavior override 0
timestamp format iso
package cache false
driver toolbox
time separator .
transaction isolation none
maximum precision 31
translate hex character
sort weight shared
date format iso
bidi numeric ordering false
query storage limit -1
naming sql
minimum divide scale 0
maximum scale 31
prefetch true
lazy close false
hold input locators true
package error warning
block size 32
sort hex
big decimal true
lob threshold 32768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment