View previous topic :: View next topic
|
Author |
Message |
svishnudas
New User
Joined: 02 Aug 2006 Posts: 4
|
|
|
|
I have number of records in my file... But I don't know how many records there are... In such a situation how can I access the last record directly..? Is it possible to read the last one without reading the previous ones... |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
Code: |
Is it possible to read the last one without reading the previous ones...
|
Sort products are not able to read records backwards so they cannot read the last one without reading the previous ones.
Alain |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
Code: |
INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTFIL ENDREC=1,OUTREC=(1,80)
|
Hope this will helpful |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Ekta,
Although that method does get the last record, it does NOT do what was asked for which is to read the last record without reading the previous ones. It does, in fact, read ALL of the records to get to the last one. |
|
Back to top |
|
|
|