IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Upload DB2 error 104


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
soumen2255

New User


Joined: 25 Jun 2008
Posts: 24
Location: Pune

PostPosted: Wed Jun 09, 2010 7:11 pm
Reply with quote

Can Anyone please help me out with what this error means while DB2 insert-

SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 09, 2010 7:23 pm
Reply with quote

The following is from the -104 description and response paragraphs,
which obviously you have read:

Quote:
A syntax error in the SQL statement was detected at 'token'

Examine the statement in the area of the specified token.If you are executing the SQL statement dynamically under TSO, be sure that if the data set containing the DSNHDECP load module has not been included in your LINKLSTxx, it has been included in STEPLIB statements in:1. The DB2 start-up procedure 2. The TSO logon procedure or batch job JCL.


since you have not bothered to provide us with ANY information about
what are you trying to do
what does the data look like
what does the ddl for the table look like

you are on your own.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Jun 09, 2010 7:23 pm
Reply with quote

soumen2255 wrote:
Can Anyone please help me out with what this error means while DB2 insert-

SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL


Any chance you could cut and paste the original sql statement so we could see it.
Back to top
View user's profile Send private message
soumen2255

New User


Joined: 25 Jun 2008
Posts: 24
Location: Pune

PostPosted: Wed Jun 09, 2010 7:32 pm
Reply with quote

Craq Giegerich wrote:
soumen2255 wrote:
Can Anyone please help me out with what this error means while DB2 insert-

SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL


Any chance you could cut and paste the original sql statement so we could see it.


Hi Craq,

Fot security reasons I cannot post the insert statement,It has 90 columns with the following datatypes : DECIMAL(10,0)
CHAR(4)
DATE
CHAR(3)
CHAR(7)
CHAR(2)
CHAR(6)
CHAR(1)
DECIMAL(15,2)
CHAR(9)
DECIMAL(15,0)
CHAR(10)
VARCHAR(120)
TIMESTAMP

Thanks in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 09, 2010 7:40 pm
Reply with quote

Quote:
For security reasons I cannot post the insert statement

if You cannot provide the requested info, why waste everybody' s time ???
have Your support people start earning their salary
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 09, 2010 7:57 pm
Reply with quote

soumen2255 wrote:
SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: ,;( + - ? : CASE CAST NULL USER <FLOAT> CURRENT DEFAULT NEXTVAL
The above message is nice, but what does the actual -104 message show for the "token'?
-104 ILLEGAL SYMBOL "token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: token-list
And where in your insert is that "token" being used?
Back to top
View user's profile Send private message
soumen2255

New User


Joined: 25 Jun 2008
Posts: 24
Location: Pune

PostPosted: Wed Jun 09, 2010 8:10 pm
Reply with quote

enrico-sorichetti wrote:
Quote:
For security reasons I cannot post the insert statement

if You cannot provide the requested info, why waste everybody' s time ???
have Your support people start earning their salary


hERE IS MY INSERT STATEMENT :

Code:
INSERT INTO DEMO.TEST(DCC_N,EDC_FJZ_C,ED_EFF_D,ED_END_D,DJN_I,DCC_DDKE_I,DJN_DGK_C,ZJD_UNIG_I,ZJD_HD_I,DCC_HZEN_D, DCC_CLK_D,DCC_CLK_JKN_C,DCC_HJIGBN_C,DCC_KBDB_C,DCC_CHNGN_KBDB_C,DCC_HDNZ_BYZ_C, DCC_D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_ZKCJ_LBY_FEE_C,CDC_EFB_GND_C,IZ_BIN_I,  CDC_BBL_NZE_B, DCC_KJCH_KHJB_X) VALUES (9792900,'0000','2009-99-90','',' DD',' 99599 ','02','K79970','DD02  ','2009-99-90','', '   ','   ','D',' ','07',' ',' ','C',' ','  ','  ','  ','  ',,'','   ','D','Z',' ',' ', '2009-99-90','   ','Y',' ',' ','JD','029',' ','K',' ','B','D',' ','9','5','L','N','F',' ',' ', ' ',' ',' ',' ',' ',' ','   ',799990955929090,' ','',' ','',' ',' ',' ',' ','2009-09-99','', ' ','',' ','',' ',' ','',' ','','9','2007-09-92','JCDDZ209  ','2009-09-05 29:09:00.000990','', ' ',' ',' ','097799799', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'Dd')
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 09, 2010 8:26 pm
Reply with quote

apparently you have a NULLable column?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 09, 2010 8:28 pm
Reply with quote

no wonder Your support does not want to get involved!

did You check Your statement for typos ?

did You check for the correct column names ?
( i see quite a few duplicate names there )
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Jun 09, 2010 8:30 pm
Reply with quote

My goodness, that is one ugly insert......
William Thompson wrote:
...but what does the actual -104 message show for the "token'?
-104 ILLEGAL SYMBOL "token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: token-list
And where in your insert is that "token" being used?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 09, 2010 8:33 pm
Reply with quote

is IHD_D a nullable column
if not, you have forgotten a value.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 09, 2010 8:50 pm
Reply with quote

I had noticed that too, but I was more curious about the duplicate column names icon_biggrin.gif
never used it, nor seen it
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 09, 2010 8:58 pm
Reply with quote

Quote:
Fot security reasons
There is percieved security in confusion and non-readability. . . icon_cool.gif
Back to top
View user's profile Send private message
soumen2255

New User


Joined: 25 Jun 2008
Posts: 24
Location: Pune

PostPosted: Wed Jun 09, 2010 11:55 pm
Reply with quote

dbzTHEdinosauer wrote:
is IHD_D a nullable column
if not, you have forgotten a value.



Yes the column is nullable and the two column names are NOT identical,I am extreamly sorry that while sanitising the data it was a mistake on my part to put identical column names...

Please help..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 12:02 am
Reply with quote

Quote:
sanitising


we spend 10 posts trying to get info to help you
and then all you provide is garbage............
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jun 10, 2010 12:32 am
Reply with quote

soumen2255,

Do you understand the problem here?

You have a SYNTAX ERROR in your insert statement.

Nobody here can help you if:
1) You can not give the actual statement (for security purposes of course)
2) Give a santisized version of the statement (it has now been changed)

Even so, the actual (not santized) and complete error message is what really is required.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 12:35 am
Reply with quote

Hello,

What happens if you execute this using only the first 10 columns and associated values? The next 10? etc. . .

Shoot the author. . .

d
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 1:38 am
Reply with quote

Oops. . . My bad icon_redface.gif

Forgot where i was and fell back to a method used in a prior life. . .

Sorry for the mis-cue, and thanks to DBZ for reminding me,

d
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jun 10, 2010 2:03 am
Reply with quote

wait until soumen2255 finally bothers to correct his sql,
gets past the -104
and then runs into RI Violations!!!!
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 10, 2010 3:05 am
Reply with quote

Quote:
For security reasons I cannot post the insert statement


given the names of the columns I would say ... security by obfuscation
such poor/confusing naming conventions are prone to cause lots of pain to the developers icon_biggrin.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 10, 2010 3:16 am
Reply with quote

And any clients/users who are supposed to create ad-hoc queries. . .
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Jun 10, 2010 2:01 pm
Reply with quote

you can not insert null like this

Code:
insert tab1(col1,col2,col3) values ('A',,'C')

Quote:
ILLEGAL SYMBOL ",". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: DEFAULT ( ? CURRENT_SCHEMA ROW CURRENT_LC_CTYPE XMLELEMENT. SQLCODE=-104, SQLSTATE=42601

but you can as follows
Code:
insert tab1(col1,col2,col3) values ('A',null,'C')

or
Code:
insert tab1(col1,col3) values ('A','C')
Back to top
View user's profile Send private message
soumen2255

New User


Joined: 25 Jun 2008
Posts: 24
Location: Pune

PostPosted: Thu Jun 10, 2010 2:59 pm
Reply with quote

GuyC wrote:
you can not insert null like this

Code:
insert tab1(col1,col2,col3) values ('A',,'C')

Quote:
ILLEGAL SYMBOL ",". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: DEFAULT ( ? CURRENT_SCHEMA ROW CURRENT_LC_CTYPE XMLELEMENT. SQLCODE=-104, SQLSTATE=42601

but you can as follows
Code:
insert tab1(col1,col2,col3) values ('A',null,'C')

or
Code:
insert tab1(col1,col3) values ('A','C')



Thank You GUYC, I investigated and found that it is exactly what you have pointed is the issue.

Thanks everyone for this help and sorry once again for the confusion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top