Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
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?
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.
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).