Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
DYNAMIC SQL GETTING SQL CODE -104

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
vtkaushik

New User


Joined: 20 Jul 2005
Posts: 2

PostPosted: Wed Jul 20, 2005 9:23 pm    Post subject: DYNAMIC SQL GETTING SQL CODE -104
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
References
t1nt1n

New User


Joined: 08 Jul 2005
Posts: 31

PostPosted: Thu Jul 21, 2005 11:19 am    Post subject:
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    Post subject: Re: DYNAMIC SQL GETTING SQL CODE -104
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    Post subject: Re: DYNAMIC SQL GETTING SQL CODE -104
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1