Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Fetch more than one rows without using CURSOR

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Fetch more than one rows without using CURSOR
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    Post subject: Re: SELECTION OFMORE THAN ONE ROWS
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    Post subject:
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: 680
Location: NJ

PostPosted: Thu Nov 03, 2005 9:56 am    Post subject: fetching more than one row
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    Post subject:
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    Post subject:
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    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 query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 12 Fri Dec 01, 2017 10:29 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us