By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,851 Members | 1,752 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,851 IT Pros & Developers. It's quick & easy.

Sequence as column name in DB2 V8 on MVS

P: n/a
I am running my application on Windows.
Developed in C++.

The DB2 V8 database is installed on MVS mainframes.
DB2 Client is installed on Windows.

Currently i am getting error as follows :
**************************************************
***************************
Insert into SANS.log(sequence,subsequence,recordTypt,logDate,n
ame,action) values
(:sequene, :subsequence, :recordType, :logDate, :name, :action)

Class: DBMS
Native Error Code: -199

[IBM][CLI Driver][DB2]SQL0199N The use of the reserved word "SEQUENCE"
following "" is not valid. Expected Tokens may include "( SELECT"/
SQLSTATE=42601
**************************************************
***************************

please update me regarding this issue....

thanks.

Sep 27 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Please show your DDL for SANS.log.
I guess that you did some misuse of GENERATE or SEQUENCE syntax.

Sep 27 '07 #2

P: n/a
On Sep 27, 4:15 pm, Tonkuma <tonk...@fiberbit.netwrote:
Please show your DDL for SANS.log.
I guess that you did some misuse of GENERATE or SEQUENCE syntax.
CREATE TABLE SANS.LOG (
Sequence DECIMAL(9 ,0) NOT NULL ,
SubSequence DECIMAL(9 ,0) NOT NULL ,
RecordType DECIMAL(9 ,0) ,
LogDate TIMESTAMP ,
Name char (30) ,
Action char (80) ,
usertype DECIMAL(1) ,
sourceapp DECIMAL(1)
)

Sep 27 '07 #3

P: n/a
Santy wrote:
CREATE TABLE SANS.LOG (
Sequence DECIMAL(9 ,0) NOT NULL ,
SubSequence DECIMAL(9 ,0) NOT NULL ,
RecordType DECIMAL(9 ,0) ,
LogDate TIMESTAMP ,
Name char (30) ,
Action char (80) ,
usertype DECIMAL(1) ,
sourceapp DECIMAL(1)
)
If it hurts don't do it...
You have 2 choices:
* Use another column name
* double quote the column rereference: "SEQUENCE" (remember to uppercase)

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Sep 27 '07 #4

P: n/a
what is the db2level you are using

swami.

Sep 30 '07 #5

P: n/a
swami wrote:
what is the db2level you are using
That's a DB2 z/OS V8 issue. It is working fine as originally written in DB2
z/OS V9. DB2 LUW did not behave like that in the recent versions.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Oct 2 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.