View previous topic :: View next topic
|
Author |
Message |
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Hai All,
While we write a record in RRDS, The relative record number is automatically generated, like first records as 1 and second record 2 and so on. But I want to start the RRN from 100 means how? Please help me...
With Regards
Rajesh.S |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Probably the same way you would start a browse with a keyed file...... |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Hai ,
Sorry I'm not getting you.. Please explain clearly.... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Rajesh S wrote: |
Sorry I'm not getting you.. Please explain clearly.... |
If you do not want to begin reading from the first record after an OPEN, you will need to START BRowsing at the RIDFLD you want...... |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Hai ,
Thats not my problem. My problem is While write a record in new RRDS, RRN of that record is 1. RRN is automatically generated. Now I want to
Start the RRN as 100 for the first record means???
You understood my question??? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You want to start writing a new dataset and have the first record in that dataset be RRN #100?
Or start re-writing an existing dataset at RRN #100? |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
This is my question....
I want to start writing a new data set and have the first record in that dataset be RRN? |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
I want RRN number start with 100.... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You can't, not with a RRN file...you do realize that RRN satand for Relative Record Number, don't you? And that is relative to the beginning of the file, so the first record would always be #1 and the hundredth would always be #100........ |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
Thanks for your kind information... But i'm thinking that we can make the relative record number for starting record in the RRDS as user wish? And rest of the records are sequential 101,102,103.... so on.. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Fine with me...... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why would you want to start from 100 ?
And if you think about the problem the solution is relatively easy.
But there again why not consider the use of an INDEXED file, such as a KSDS. |
|
Back to top |
|
|
Rajesh S Warnings : 1 New User
Joined: 11 Jul 2007 Posts: 54 Location: Chennai
|
|
|
|
But my question is We make the RRN start with 100 or not?
Is it possible....????? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
No.
WRITE for relative files
For OUTPUT files, the WRITE statement causes the following actions:
v If ACCESS IS SEQUENTIAL is specified: The first record released has relative record number 1, the second record released has relative record number 2, the third number 3, and so on. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to use the technology as it is implemented - it will not change to meet some "user wish".
If your user wants to see things begin with 100 - fine, but you will have to provide that. A relative record number will not. |
|
Back to top |
|
|
|