Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.

Increase record size in Vision file without rebuilding the file

Increase record size in Vision file without rebuilding the file

Problem:

A very large Vision file must be expanded to accommodate more data than is available in the remaining FILLER item.  How can that be accomplished without using a COBOL program that would read the old file and rewrite all of the records to the new format, which would take several hours?

Resolution:

To increase the record size on an existing file use the Vision File Utility, vutil (vutil32 on Windows).  First run "vutil -augment ..." with the new maximum record size.  This does not rebuild the file, it is an instant command that only changes the file header to specify variable length records with the new maximum record length.  Next is to modify the FD to correspondingly specify variable length records with the new maximum and recompile the program.  The result is that new records added to the file will be the new larger size, while the existing smaller records can be accessed too.

Example:

An existing file, myfile, has a record length of 68 bytes but must now accommodate records of 100 bytes.

  1. Execute this command: vutil -augment -q 100 myfile  (use vutil32 on Windows)
  2. Modify the FD to specify variable length records:

Original definition:

       FD MYFILE.

       01 REC.

          03 REC_KEY     pic x(8).

          03 REC_DATA    pic x(60).

New definition:

       FD MYFILE RECORD VARYING FROM 68 TO 100.

       01 REC.

          03 REC_KEY     pic x(8).

          03 REC_DATA    pic x(60).

          03 NEW_DATA    pic x(32).

  1. Recompile all programs that access myfile.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2018-03-29 17:05
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.