Page 1 of 1

Retrive a specific record with out using cursor

PostPosted: Thu Dec 09, 2010 11:09 pm
by sandip kumar mondal
hi
i am sandip. i have a question.
In dynamic sql can we retrive a specific record with out using cursor???if yes then how can i display the record???

Re: DB2

PostPosted: Thu Dec 09, 2010 11:16 pm
by Akatsukami
Of course. How depends on the host language.

Re: DB2

PostPosted: Thu Dec 09, 2010 11:32 pm
by enrico-sorichetti
the YES/NO question disease has struck again :D

Re: DB2

PostPosted: Fri Dec 10, 2010 1:46 am
by dick scherrer
Hello and welcome to the forum,

Do you now have what you are looking for?

If not, you need to explain where you are stuck. . .

Re: DB2

PostPosted: Fri Dec 10, 2010 7:30 am
by RJAY
Sandip - Where are you running the dynamic sql...? Need more information. In the mainframe world running a sql via qmf or spufi is considered to be a dynamic sql. In that sense "YES" you can run a dynamic sql to retrieve data without using a cursor.

Re: DB2

PostPosted: Fri Dec 10, 2010 10:00 am
by dick scherrer
Hello,

Your post is misleading at best - if not simply incorrect . . .

Dynamic sql can be executed from within one's own code, not only SPUFI or QMF. And it may or may not use a cursor. . .

Re: Retrive a specific record with out using cursor

PostPosted: Fri Dec 10, 2010 4:42 pm
by sandip kumar mondal
i need the code.and my host language is cobol.and i use spufi to run those sql statements.

Re: Retrive a specific record with out using cursor

PostPosted: Fri Dec 10, 2010 5:10 pm
by NicC
If you need the code - write it! There is a COBOL Language Reference Manual and a SQL Language Reference Manual that you may need to consult.

Re: Retrive a specific record with out using cursor

PostPosted: Fri Dec 10, 2010 5:56 pm
by Robert Sample
This is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. However, I'm sure a number of people who respond on this forum would write the code for you provided you pay the appropriate professional fee (rates usually run about U.S. dollars 700 to 1500 per day for professional work product). If you get stuck writing the code, ask for help -- but we're not going to just give you the code since you're not learning anything by that.