View previous topic :: View next topic
|
Author |
Message |
vaibhavkolhe
New User
Joined: 24 Feb 2005 Posts: 11
|
|
|
|
Hi,
I have the following requirement:
There is a physical sequential file of length 23000 which is read into a copybook - say COPY1234. The length of 23000 is divided into two parts -
first 50 chars consisting of the key and,
remaining 22950 chars consisting of a 'common area'.
Out of the 50 chars key, 20 chars are level 05 variables while remaining 30 chars are in a array. Here's the layout:
01 COPY1234
03 ABCD-KEY
05 Product code PIC X(2)
05 Product Name ....etc
05 Product type occurs 30 times
10 group-prod-type PIC X(1)
----------------this length is 50 chars
03 Common data PIC X(22950)
Now, this copybook caters to products which are added every year. Whenever a new product is added, the array size needs to be incremented e.g. 30 is the current size and 24 is being utilized. If products exceed 30, then length of the key size will change which will cause all programs using this copybook to change. Now the common area further consists of various 2 dimensional arrays each of which depends on the product type which occurs 30 times in the key area. So if the key area occurence is increased, the size of the 2-dimensional arrays accordingly increases. This means that if the product type increases more than 30, the common data section will also change in length.
- What are the options to consider if I need to store 75 product types? If we increase it upto 44, the LRECL comes to 32726 which is close to maximum LRECL possibl 32760.
- Can we create a VSAM dataset with a key portion and data portion? The key will consist of the key mentioned above and length of the common portion with 75 product type comes to 66000 bytes.
- Are there any other suggessions?
Thanks,
VK. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
vaibhavkolhe wrote: |
- Can we create a VSAM dataset with a key portion and data portion? |
Yes
Quote: |
The key will consist of the key mentioned above and length of the common portion with 75 product type comes to 66000 bytes. |
Why not make the key both code and type and avoid the maintence and length problems? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Good luck with defining a VSAM file with 66000 byte records!
Why not have something like
Code: |
01 COPY1234
03 ABCD-KEY
05 Product code PIC X(2)
05 Product Name ....etc
05 Product type PIC X(1)
03 Common data PIC X(765) |
Normalize the data a bit by getting rid of the repeating group and the resulting structure has more records per product code but shorter records. And you don't have to worry about exceeding system limits like maximum record length. |
|
Back to top |
|
|
|