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

Extract only 500 to 1000 Records from 10000 Records


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikuma

New User


Joined: 29 Mar 2005
Posts: 62

PostPosted: Wed Jun 01, 2005 9:58 am
Reply with quote

hi,

i'm having flat file of 10000 records in cobol,but i want only 500 to 1000 ,how can i do it.only y using cobol syntax(not by using dfsort),plz any one give me sugestion.


Regards,
kumar
Back to top
View user's profile Send private message
asr1983

New User


Joined: 31 May 2005
Posts: 11

PostPosted: Thu Jun 02, 2005 10:53 am
Reply with quote

hi kumar,
As you are saying it as a flat file, you must be having a file structure for it.
So, you can skip the first 500 records and then fetch the next 500 records .

Ex : perform para-1 varying x from 1 by 1 until x = 1000

in para-1 you will be dispaying the records.

as the loop will be continuing until x = 1000 , you will get 500 to 1000 records
Back to top
View user's profile Send private message
jkbytes

Active User


Joined: 19 Feb 2005
Posts: 139
Location: South Africa

PostPosted: Thu Jun 02, 2005 11:55 am
Reply with quote

Hi Karthi,

I agree with asr, but you can still make your job easy if you repro it to a ksds, and then use the key value for dynamic access from 500 to 1000 records.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top