I am writing a REXX code which is reading a VB Format file record by record, editing & again writing/updating to the same place.
I cannot read the file into an array as the File is of 50000 records & editing is only required for few hundred records, so I will have to write the whole file again which will take a lot of time.Hence, I am reading & updating record by record.
Now, suppose I have read this record:
its record length is 16. I want to changr it to:
i.e record length 17, but it will write upto 16 characters only & will truncate the last one as shown below:
Is there any command through which we can increase the Record Length of that particular record?
You can't change the length 'in place'. Consider the structure of a VB dataset:
For each block : bytes 1-4 contain the length of the block
within that block, for each record :
bytes 1-4 contain the length of the record.
The 4 bytes following a record contain the length of the next record. If you were able to extend a record, you would overwrite (part of) the length field of the next record and the dataset would be corrupted.
The only way to change the length is to write a new VB dataset.