convertlf - convert an existing RMSfile



convertlf datafile [ deffile ]


Convertlf is used to reformat the RMSfile to match the new definition. If the deffile argument is present, it is used as the new RMS definition file. If the deffile argument is omitted, the RMS definition file is assumed to be in the $HOME/def directory and have the same name as the RMSfile. Data fields are dropped or initialized to zero according to the changes made to the RMS definition file. Convertlf also performs data type conversion, if necessary, if the data type of a field name is changed. A temporary RMSfile is made in the same directory as the RMSfile to be converted using the new RMS definition file, and dcopy is used to copy the old data into the temporary RMSfile. If the copy is successful, the old RMSfile is replaced by the temporary RMSfile. FILES $HOME/def/datafile for the RMS definition file cvdf$$ temporary version of new file


dcopy(C-1), pull(C-1), put(C-1)



Since the RMSfile is copied in the same directory, there must be enough disk space to hold two copies of the file to be converted. If the datafile argument has the form dbname~lfile or ~lfile, then convertlf converts the RMSfile named by using the database and logical file name. If the datafile argument has the form filename (i.e. it has neither a ~ nor / in the name), then it is taken as a logical file name using the default database name.