Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sequential read after random read.. Possible.. or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Pollyannaish

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Thu Mar 30, 2006 1:45 pm    Post subject: Sequential read after random read.. Possible.. or not
Reply with quote

Can I read a file sequentially once I have read a record randomly?
Back to top
View user's profile Send private message

thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Thu Mar 30, 2006 1:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pollyannaish

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Thu Mar 30, 2006 2:03 pm    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

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
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Thu Mar 30, 2006 5:11 pm    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

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
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Tue Apr 04, 2006 5:02 pm    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

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
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Tue Apr 04, 2006 5:06 pm    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

Rupesh said it key sequential. then it is ok..
I misread that.

Thanks
Elonics..
Back to top
View user's profile Send private message
Visvanathan

New User


Joined: 25 Apr 2006
Posts: 5
Location: India

PostPosted: Wed Apr 26, 2006 11:04 am    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

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
View user's profile Send private message
ajayvamsi
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Wed Apr 26, 2006 2:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
pawaria

New User


Joined: 06 Apr 2006
Posts: 7
Location: Noida

PostPosted: Wed Apr 26, 2006 11:13 pm    Post subject: Re: Sequential read after random read.. Possible.. or not
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us