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

DYNAMIC SQL GETTING SQL CODE -104


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

New User


Joined: 20 Jul 2005
Posts: 2

PostPosted: Wed Jul 20, 2005 9:23 pm
Reply with quote

Pls can some one tell me what is wrong with this Dynamic Query
I am getting SQL code of -104...

SELECT DISTINCT A.I_PYMT_REQ_DATE ,A.C_PYMT_REQ
MEDIA ,A.I_PYMT_REQ_SEQ_NO ,A.I_PYMT_REQ_LINE_NO F
ROM DB2U49.CP_CLM_PYMT_REQ A ,DB2U49.CP_CLM_MOD_STATUS B
WHERE B.C_CLM_STAT_CVAL IN ('1','3') AND A.D_
SERV_FROM <= '07/18/2005'
AND (A.C_ENRL_AID_CATG = 'AAA'
) A
ND ((A.I_ENRL_BNFT_PGM = '01' AND A.I_ENRL_BNFT_SU
B_PG = '01' AND A.I_ENRL_BNFT_PLN_CD = '0100'
)
) AND A.I_PY
MT_REQ_DATE = B.I_PYMT_REQ_DATE AND A.C_PYMT_REQ_M
EDIA = B.C_PYMT_REQ_MEDIA AND A.I_PYMT_REQ_SEQ_NO
= B.I_PYMT_REQ_SEQ_NO AND A.I_PYMT_REQ_LINE_NO = B
.I_PYMT_REQ_LINE_NO AND A.I_PART_PRSN = B.I_PART_P
RSN AND B.D_MOD_STAT_END IS NULL AND B.D_MOD_STAT_
BEGIN <= '07/18/2005' AND B.D_MOD_STAT_BEGIN >= '0
7/01/2004' AND B.C_CLM_MOD_CVAL IN ('1','2')

Thanks,
Kaushik
Back to top
View user's profile Send private message
t1nt1n

New User


Joined: 08 Jul 2005
Posts: 31

PostPosted: Thu Jul 21, 2005 11:19 am
Reply with quote

Hello

From what i can see is that you're splitting the fields/keywords(FROM) across lines(may be with spaces at end). This might give this -104. Try correcting these, most likely to work fine.

Hope this helps.

Thanks
-----------------
T1nT1n
Back to top
View user's profile Send private message
kvramanareddy

New User


Joined: 24 Mar 2005
Posts: 9

PostPosted: Thu Jul 21, 2005 11:44 am
Reply with quote

Hi,

As T1nT1n said, the sql code -104 will come in situation of some Illegegal words present in the SQL. Here i am giving the error code description. 'ILLEGAL SYMBOL "token". SOME SYMBOLS THAT MIGHT BE LEGAL ARE:token-list'

Regards,
K.V.Ramana Reddy.
Back to top
View user's profile Send private message
vtkaushik

New User


Joined: 20 Jul 2005
Posts: 2

PostPosted: Thu Aug 04, 2005 3:04 pm
Reply with quote

the problem of -104 was solved by increasing the space. other than that no code was wrong in the sql query..
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts JCL Dynamic System Symbols JCL & VSAM 3
Search our Forums:

Back to Top