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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


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