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 

Regarding Vsam files

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


Joined: 08 Apr 2004
Posts: 16
Topics: 14

PostPosted: Sun May 23, 2004 11:58 pm    Post subject: Regarding Vsam files Reply with quote

Hi,

1) How can i decide wether i have to use KSDS r ESDS files in my program.

2) if i defined file contol section with access mod e is Random can i access the file sequnetially. if it is not possible means every time i have to move a key value to the record key filed r what other wise is there any other way.

bye
Raja
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Mon May 24, 2004 12:49 am    Post subject: Reply with quote

1) Entirely depends on your requirements - what do you want to do with the data.

2) Define the file with Dynamic access instead of Random. Look at the manuals or search in this forum.
Back to top
View user's profile Send private message Visit poster's website
Brian
Beginner


Joined: 12 Aug 2003
Posts: 95
Topics: 6

PostPosted: Mon May 24, 2004 1:11 am    Post subject: Reply with quote

Traditionally, ESDS files are used for logging in CICS.
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: Mon May 24, 2004 4:55 am    Post subject: Reply with quote

drajasekharreddy,

Check this link which explains in detail about processing VSAM files.

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

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
kolusu
Site Admin
Site Admin


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

PostPosted: Thu May 27, 2004 9:43 am    Post subject: Reply with quote

Rajasekharreddy,

Straight from the manual

Before you select a particular VSAM organization, you need to have answers for the following questions:

  • What is the main purpose of your data set? Does it look more like a log, a data base, or an inventory?
  • Do you need to access data by a key field in sequential or direct mode?
  • Do you need to access the records in sequence, skip sequential,randomly, or all of them?
  • Are all the logical records the same length?
  • Does the record length change?
  • Do you need to have insertions and deletions?
  • Is the data set going to be extended?
  • How often will you need to delete records?
  • Will you use spanned records?
  • Do you want to keep the data in order by the contents of the key field?
  • Do you want to access the data by an alternate index?
  • Do you want to explore DIV?
  • Do you want to use data compression?
  • Do you need the utility functions provided by IDCAMS?


When you have answered these questions, you can use them to choose the best organization for your data set. Remember that VSAM data sets cannot be processed using non-VSAM applications. Similarly, non-VSAM data sets cannot be processed using the VSAM access method.

We make the following recommendations:

Use QSAM or BSAM if:
Code:

- You use no direct processing.
- There are no insertions or deletions, and no change in the logical record length.
- Record additions are only at the end of the data set.
- You are not concerned about IDCAMS functions.
- You want to have data compression.
- Performance and easy recovery are main issues.


Use KSDS if:
Code:

- The data access will be sequential, skip sequential, and direct access by a key field.
- You would prefer easy programming for direct data processing.
- There will be many record insertions, deletions, and logical record length variations.
- You may optionally access records by an alternate index.
- Complex recovery (due to index and data components) is not a issue.
- You want to use data compression.
- The data is suitable for a sort of mini-database in an online application environment like CICS/VSAM.


Use VRRDS if:
Code:

- You have the same requirements as for a KSDS, but will use record number instead of a key field as argument.


Use RRDS if:
Code:

- The record processing will be sequential, skip sequential, or direct processing.
- Easy programming for direct processing is not a requirement.
- The argument for accessing data in direct mode is a relative record number, not the contents of a data field (key). RRDS is suitable for the type of records identified by a continuous and dense pattern of numbers.
- All records are fixed length.
- There are a small number of record insertions and deletions, and all the space for insertions must be pre-allocated in advance.
- Performance is an issue. RRDS performance is better than KSDS, but worse than QSAM or BSAM.


Use ESDS if:
Code:

- You need sequential and direct record processing (not by a key field, but by an RBA).
- You are using only logical record insertions or deletions (in the application control).
- You are using a batch processing application.

Use LDS if:
Code:

- You want to exploit DIV.
- Your application manages logical records.
- Performance is an issue.


A final comment is that many times, you will be using a specific VSAM organization depending on the software product you are running
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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