IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sequential read after random read.. Possible.. or not


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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: 463

PostPosted: Thu Mar 30, 2006 5:11 pm
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
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
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
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

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Wed Apr 26, 2006 2:17 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
Search our Forums:

Back to Top