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
 

 

-204 when executing Dynamic SQL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Oct 07, 2010 11:05 pm    Post subject: -204 when executing Dynamic SQL
Reply with quote

I am trying to create and Run a Dynamic SQL , i will be getting my table and column names only during run time , i have used PREPARE SQL to create the dynamic SQL.

But the problem is its assosistaing my TSO id to the table name instead of the Schema

example its searching for TSOXXX.TABLE NAME and failing in -204.


Please advice if there is any special compilation option to be specified for Dynamic SQLs .

Am using ChangeMan to compile and Promote the code , am new to CHangeman and dynamic Sql , awaiting help


Thanks in Advance
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Oct 08, 2010 2:39 am    Post subject:
Reply with quote

Vishu,

By default, its taking your TSO ID.

It can be changed by using,
1. SET CURRENT SQLID
or
1. Giving QUALIFIER in the bind statement.


Sushanth
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Fri Oct 08, 2010 10:17 am    Post subject:
Reply with quote

Sushanth ,

Thanks for the response , i am not aware of the SET CURRENT SQLID optin, i will give it a try and let you know.


For the second option , yes i am already specyfying the Qualifier in the Bind , but its still not picking up the table , if i use a static SQL its working fine , but when the query is dynamci it fails .
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 Dynamic array request/response contai... Suja.Sai CICS 2 Tue Jan 24, 2017 11:37 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 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 Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


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