Method 1. Converting segments or a database
Method 1 for converting segments or a database to use variable length segments involves creating a new DBD and writing your own application program to retrieve each segment, add the 2-byte size field, and then insert the segment back into the database.
To convert selected segments or the entire database this way, you must:
Procedure
- Determine whether the change you are making affects the code in any application programs. If the code is affected, make sure it gets changed.
- Code and generate a new DBD that identifies the segment types that will be variable length, and their size.
- If the change you are making affected the code in application programs, make any necessary changes to the PSBs for those application programs. If you have the DB/DC Data Dictionary, it can help you determine which application programs and PCBs are affected by the DBD changes you have made.
- Rebuild the ACB if you have ACBs prebuilt rather than built dynamically.
- Write a program that sequentially retrieves from the database all segments that are to be variable length. Your program must add the 2-byte size field to each segment retrieved and then insert the segment back into the database.