MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

KSDS - Acess Sequentially

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
MFfresher
Beginner


Joined: 14 Dec 2006
Posts: 1
Topics: 1

PostPosted: Thu Dec 14, 2006 11:56 pm    Post subject: KSDS - Acess Sequentially Reply with quote

Hello Gurus,

Can you help me on below issues for a KSDS VSAM using COBOL programming.

1. Can organization be declared as Sequential (I think NO)?
2. If access is mentioned as Sequential should Record Key be mentioned. Also, how do we do the sequential processing (like do we need to give a START etc.).

Thanks a lot.

Regards, Mffresher.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Dec 15, 2006 5:44 am    Post subject: Reply with quote

MFfresher,

Check this link for a detailed explanation along with examples

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/1.10?DT=20020923143836

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ReinerZ
Beginner


Joined: 30 Nov 2006
Posts: 11
Topics: 4
Location: Germany

PostPosted: Thu Dec 28, 2006 7:22 am    Post subject: Reply with quote

Hi,

In COBOL for a KSDS you must code the SELECT-Statement with
"ORGANIZATION IS INDEXED" and
"ACCESS IS SEQUENTIAL"
if you want to process the file sequentially, or code
"ACCESS IS DYNAMIC"
if you want access records directly by key, or if you want to process the file in a "skip-sequential" manner (means you would begin reading at a specific key and then read (next) a number of records. In this case you must code a START-Statement with the key (usually greater or equal) of the records you'd like to read. After a successful START (check success with the INVALID KEY-clause!) you can issue READ NEXT-Statements against the file.

Hope this helps a little...

Best regards

Reiner
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group