Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us