IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Convert physical sequential file to VSAM


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vaibhavkolhe

New User


Joined: 24 Feb 2005
Posts: 11

PostPosted: Thu Jan 15, 2009 10:36 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jan 15, 2009 10:51 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jan 16, 2009 12:02 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top