IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Fetch more than one rows without using CURSOR


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gen_advantage
Currently Banned

New User


Joined: 05 Jun 2005
Posts: 5

PostPosted: Sat Sep 24, 2005 8:47 pm
Reply with quote

Hai,
I want to fetch more than one rows,but i should not use CURSOR or SELECT * .

Is there any other way to do it?.
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Sun Sep 25, 2005 5:54 pm
Reply with quote

You must use cursor to retrieve more than one row in an application program. Please let us know what is exactly your requirement is, why u dont want to use cursor?
Back to top
View user's profile Send private message
Anbudan

New User


Joined: 07 Sep 2005
Posts: 26
Location: Germany

PostPosted: Mon Sep 26, 2005 2:27 pm
Reply with quote

Hi gen_advantage


If U don't want to use cursor for multiple rows, then follow the steps:

i)Unload(JCL job) the records(rows) into a file
ii)Use this file as a input to ur cobol pgm

if you want more explanation regarding point (i),


feel free to ask
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 9:56 am
Reply with quote

hi frnd,
the DB2 intro the cursor ops only to retrv the multiple rows. if u are fetching more than one row without the cursor then error no.-811 will be thrown yar.
Back to top
View user's profile Send private message
tam

New User


Joined: 02 Nov 2005
Posts: 12
Location: zz

PostPosted: Thu Nov 03, 2005 1:38 pm
Reply with quote

Yes, Cursor is the only option for retrieving multiple rows else -811 Sqlcode will result
Back to top
View user's profile Send private message
tam

New User


Joined: 02 Nov 2005
Posts: 12
Location: zz

PostPosted: Thu Nov 03, 2005 2:08 pm
Reply with quote

-811 is the multiple row selected
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Code Multi Row fetch in PL1 program PL/I & Assembler 1
Search our Forums:

Back to Top