Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Convert physical sequential file to VSAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Convert physical sequential file to VSAM
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: 2150
Location: At my coffee table

PostPosted: Thu Jan 15, 2009 10:51 pm    Post subject: Re: Convert physical sequential file to VSAM
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: 7997
Location: Bellevue, IA

PostPosted: Fri Jan 16, 2009 12:02 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us