| View previous topic :: View next topic |
| Author |
Message |
javedsk12 Beginner

Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Tue Jun 03, 2008 5:55 am Post subject: first and last record |
|
|
how to search first and last record in any file organization _________________ javed
-----------------------
The Word Impossible it self says i am possible(im possible) |
|
| Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Tue Jun 03, 2008 6:03 am Post subject: |
|
|
Which language?
How do you define 'first' and 'last' in a non-sequetial dataset? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
| Back to top |
|
 |
javedsk12 Beginner

Joined: 14 Dec 2007 Posts: 66 Topics: 36 Location: pune
|
Posted: Tue Jun 03, 2008 11:13 pm Post subject: |
|
|
in cobol i am asking specifically.Suppose my file is having the 10 reocrds so i want to read the 1st and 10th record from the file. _________________ javed
-----------------------
The Word Impossible it self says i am possible(im possible) |
|
| Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Jun 04, 2008 2:35 am Post subject: |
|
|
assuming a sequential read:
the first record read is the first record, after you hit en of file the record in your record are is your last record. What is so difficult. Or did you want to get the last record without reading through the whole file? Can be done in PL/1 by reading the file backwards but I cannot find 'BACK' when I did a quick scan of my COBOL syntax book. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
| Back to top |
|
 |
|
|
|