View previous topic :: View next topic
|
Author |
Message |
Prema Suresh
New User
Joined: 12 Jun 2008 Posts: 8 Location: Bangalore
|
|
|
|
Hi all,
I have a requirement like this. I have started reading a file from the beginning. Say i am in 10th record after some processing. Now I wish to go back and read from the beginning again. Is this possible?
Your help is appreciated! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Now I wish to go back and read from the beginning again. |
You probably dont want to go back and read the beginning all over again.
Please describe your process and which part of this process requires re-reading some or all of the input.
This is definitely not an acceptable approach for matching 2 files. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Morning Sir !
But if you really want to do this, for whatever reason, just close the file and open it ones more and start reading |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you do NOT close/open the file until the requirement is better understood. . .
FWIW - the last several times someone asked how to do this, they intended to "start back at the beginning" so they could match 2 files. Probably the worst possible way to implement such a requirement. |
|
Back to top |
|
|
Debabrata Pruseth
New User
Joined: 11 Dec 2008 Posts: 59 Location: Pune , India
|
|
|
|
I remember i had a similar requirement . To avoid multible start browse and going forward and going backwards , what i did was put all the required variables of each record in a array . Then used this array for processing . But array is only effective for small amount of data and other constraints are there which can be cleared once Prema gives the full requirements. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
I've to vote-in for Dick ...
Quote: |
Suggest you do NOT close/open the file until the requirement is better understood. . . |
What is posted so far by OP may be a way to achieve what s/he wants but not the optimum way for sure. Once the requirement is understood ..some one will be around with a better suggestion.. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Should agree with above posts.
I think the solution would be some thing like this. Sort the file based on the field that is used for mathcing and then just use less than or greater than condition to browse through the file.
I am sorry if I misunderstood the requirement.
Can you elaborate on it if this problem is still open. |
|
Back to top |
|
|
|