View previous topic :: View next topic |
Author |
Message |
drajasekharreddy Beginner
Joined: 08 Apr 2004 Posts: 16 Topics: 14
|
Posted: Sun May 23, 2004 11:58 pm Post subject: Regarding Vsam files |
|
|
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 |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Mon May 24, 2004 12:49 am Post subject: |
|
|
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 |
|
|
Brian Beginner
Joined: 12 Aug 2003 Posts: 95 Topics: 6
|
Posted: Mon May 24, 2004 1:11 am Post subject: |
|
|
Traditionally, ESDS files are used for logging in CICS. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu May 27, 2004 9:43 am Post subject: |
|
|
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 |
|
|
|
|