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
 
Retrieve the records b/w 20th and 30th Rows

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Retrieve the records b/w 20th and 30th Rows
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    Post subject: Re: Retrieve the records b/w 20th and 30th Rows
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Fri Apr 29, 2005 4:00 pm    Post subject: Re: Retrieve the records b/w 20th and 30th Rows
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    Post subject: Re: Retrieve the records b/w 20th and 30th Rows
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    Post subject:
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    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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm

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