Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

DB2-L - Position des Syntaxfehlers im SQL-Statement in SQLERRD(5) nach PREPARE

Subject:

RE: DB2 ZOS (V10) vs DB2 LUW (V10)

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

DB2 List <db2-l@lists.idug.org>

Date:

2015.01.15 10:19:00


Just another question:

it would be interesting, what action is required inside the dynamic tools, if they receive
a SQLCODE +98 from PREPARE (that is, if there is a semicolon at the end of the SQL
statement on DB2 z/OS):

a) was the PREPARE successful (because the SQL statement was correct, with the only
exception, that there was a semicolon), so that the DESCRIBE can follow immediately, or

b) has the PREPARE to be re-scheduled, with the semicolon removed?

If b), there is no difference IMO between the SQLCODE +98 and an error condition ...

so I guess, this positive SQLCODE does only make sense in the case a).

Does anyone know for sure?

Thank you,
kind regards

Bernd



Am 15.01.2015 um 10:08 schrieb Bernd Oppolzer:
> Ok ... when I built my own ETL tool some years ago,
> I was hurt by a nonzero SQL code on z/OS, when I forgot one time
> to remove the semi-colon. I didn't care much, if it was a positive or negative SQL code.
> For me, every non zero SQL code from PREPARE (that I don't know) is a problem ...
> there are some exceptions, for example the warning, that there is no WHERE condition,
> which has to be handled, of course.
>
> Anyway: many thanks for the explanation how DSNTIAUL works.
> I guess, it gets the position of the semicolon in the SQL statement text from SQLERRD(5),
> as it is the case with other syntax errors? Not much DB2 developers know about this
> facility, IMO; I learned about this in this mailing list, too, so I think it is a good idea to
> talk about this from time to time.
>
> Kind regards
>
> Bernd

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie