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

Retrieve the records b/w 20th and 30th Rows


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

New User


Joined: 22 Apr 2005
Posts: 2
Location: CHENNAI

PostPosted: Sat Apr 23, 2005 11:19 am
Reply with quote

HI,
I would like to know how to retrieve the records b/w 20th and 30th rows.


Regards
sindhu
Back to top
View user's profile Send private message
eswar

New User


Joined: 19 Feb 2005
Posts: 5
Location: chennai

PostPosted: Wed Apr 27, 2005 10:39 am
Reply with quote

Hi,

U can do it Using FIle-Aid tool, And in that ,Use the Option
Selection Criteria.


Reards,

eswar
Back to top
View user's profile Send private message
notonly4u

New User


Joined: 26 Apr 2005
Posts: 87
Location: Hyderabad

PostPosted: Wed Apr 27, 2005 11:29 am
Reply with quote

Dear Sindhu,

You can do a sort by

OPtion Copy

Skiprec=20
Stopaft=10

This will get yu the recs b/w 20 and 30.

Hope iam Right

Regards
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Apr 29, 2005 4:00 pm
Reply with quote

Oh, really were you asking for a Flat Data Set.

I thought it shouldn't be a bycycle if you are asking for a JACK.

Regards,

Priyesh
Back to top
View user's profile Send private message
Ram_k

New User


Joined: 28 Apr 2005
Posts: 5
Location: Chennai

PostPosted: Fri Apr 29, 2005 4:38 pm
Reply with quote

Hi,

If u want to retrieve records btw 20 and 30th rows..u can use scrollable cursors (Db2v7) where u can do positioned select..pls refer to SQL refv7.1 for the syntax
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Wed May 04, 2005 2:05 pm
Reply with quote

Hi Sindhu,

Use scrollable cursors as suggested by Ram. Then use the following syntax to fetch rows b/w 20 and 30.

FETCH ROWSET STARTING AT ABSOLUTE 20
FROM CURS1 FOR 10 ROWS
INTO :hav1, :hva2, :hva3;

hav1,hav2 and hav3 are hostvariable arrays.

Thanks,
Reddy.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top