View previous topic :: View next topic
|
Author |
Message |
Pollyannaish
New User
Joined: 09 Jul 2005 Posts: 31 Location: Pune, India
|
|
|
|
Can I read a file sequentially once I have read a record randomly? |
|
Back to top |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
hi Pollyannaish,
I am not geting explain clearly,i am expecting you r asking i had read a file sequentialy once after do you want to access record randamly or not?
thank's
thanooz. |
|
Back to top |
|
|
Pollyannaish
New User
Joined: 09 Jul 2005 Posts: 31 Location: Pune, India
|
|
|
|
Sorry for the Vague Question,
OK I'll normalize the flow?
1. I have read a record randomly with a given key.
2. I want to read 2 records below it and two records above it.
I just wanted to know can this be done without pointing( start brows) logic.
can i read the file randomly first with the key and then do read next or read previous. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
Hi,
Quote: |
i read the file randomly first with the key and then do read next or read previous. |
Yes you can... if its Key sequential
Regards
Rupesh |
|
Back to top |
|
|
elonics
New User
Joined: 05 Jul 2005 Posts: 49 Location: India
|
|
|
|
I think you can read a one record randomly and start reading it sequentially when it's access mode is Dynamic. So we definitely need START command for that.
As Rupesh said, I dont think one can read a file randomly if it's access mode is Sequential.
Thanks
E'lonics.
---------------------------------------
I may be the best or atleast better than many but never worst. |
|
Back to top |
|
|
elonics
New User
Joined: 05 Jul 2005 Posts: 49 Location: India
|
|
|
|
Rupesh said it key sequential. then it is ok..
I misread that.
Thanks
Elonics.. |
|
Back to top |
|
|
Visvanathan
New User
Joined: 25 Apr 2006 Posts: 5 Location: India
|
|
|
|
Pollyannaish wrote: |
Can I read a file sequentially once I have read a record randomly? |
In case of CICS Environment this can be achieved. We have READNEXT & READPERV,thus records prior and after can be read.Correct me if Im wrong.
Thanks,
Visva. |
|
Back to top |
|
|
ajayvamsi
New User
Joined: 21 Jul 2005 Posts: 56 Location: Hyderabad
|
|
|
|
Hi,
u can read the file randomly and from THAT POINT u can read seq
only that matters is, we cannot read the records that are above the record which u have read randomly..!!
Ex:
111
222
333
444
555
in the above input file I read 333 record randomly then we will not be able to read 111,222 records but we will be able to read 444 and 555 sequentially..!!
To read the file sequentially u need not to move any value
to the key field
anyone correct me if I am wrong
Thanks,
ajay |
|
Back to top |
|
|
pawaria
New User
Joined: 06 Apr 2006 Posts: 7 Location: Noida
|
|
|
|
Yes Ajay was right! It is possible to read the file sequientally in random access mode But u cannot read the records once your control pass them...U can read post-record but not pre-records |
|
Back to top |
|
|
|