Not sure when to use which data set. |
Being a programmer I have faced situations where you are not sure which VSAM data set is suitable for business applications.
In fact, as per my experience, there is the various factor that a programmer/designer should consider before finalizing data set which should be used for storing data.
In this tutorial, I have tried to compile key points that might help you in taking a decision.
Use KSDS if:
- The data access is sequential, skip sequential, or 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 varies
- You may optionally access records by an alternate index
- Complex recovery (due to index and data components) is not a problem
- You want to use data compression.
Use RRDS if:
- The record processing is 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 logical records identified by a continuous and dense pattern of numbers (such as 1,2,3,4...).
- 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:
- You are adding logical records only at the end of the data set and reading them sequentially (in the application control)
- The logical record is variable length
- You seldom need direct record processing by key (using AIX)
- You are using a batch processing application.
Use LDS if:
- You want to exploit DIV
- Your application manages logical records
- Performance is an issue.
No comments:
Post a Comment