Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us