6.2.5 Rebuilding the Application



After you send the text files to the destination machine, the database is rebuilt with the C/Base Utilities. To rebuild the application on the destination machine, follow these steps:

1. Add the database definition for the application to the C/Base catalog with the dbadmin(C-1) command as shown below. Substitute the values for desc, logfile and dbname with the database catalog information recorded in the text file dbase.def. Substitute home with the pathname of the application's home directory.

dbadmin -av -C "desc" -L logfile dbname home

In the following steps, substitute dbname with the database name used in the above step.

2. Create all RMS definition files from their text file counterpart. An RMS definition file is created with the cdef(C-1) command as follows:

cdef textfile deffile

3. Create all logical RMSfiles from their RMS definition files with the lfadmin(C-1) command as shown below. When creating a logical hashed RMSfile, substitute the file size recorded in the text file named sysname .n for the size value. For non-hashed RMSfiles, the value zero (0) can be used. Substitute the values for desc, logged, real and lfname with the RMSfile catalog information recorded in the text file rms.def. Deffile is the corresponding RMS definition file created in the above step.

lfadmin -cv -C "desc" -L logged -R real dbname~lfname data size deffile

4. Restore the data originally stored in each of the logical RMSfiles. Use the put(C-1) command as follows:

put -f dbname~lfname < textfile

5. Create all formfiles from their text file counterpart. This is done with cform(C-1) as follows:

cform textfile sysname

6. For each formfile, add the catalog entry for the formfile to the C/Base catalog with the frmadmin(C-1) command as shown below. Substitute the values for formname, desc and sysname with the formfile catalog information recorded in the text file form.def.

frmadmin -av -C "desc" dbname~formname sysname

7. Create all visual reports from their text file counterpart. This is done with the creport(C-1) command as follows:

creport textfile sysname

8. For each reportfile (text and visual), add the catalog entry for the reportfile to the C/Base catalog using the rptadmin(C-1) command as shown below. Substitute the values for rptname, desc, precompile and sysname with the rptfile catalog information recorded in the text file rpt.def.

rptadmin -av -C "desc" -P precompile dbname~rptname sysname

9. Create terminal definitions from their text file counterpart with the cterm(C-1) command as follows:

cterm textfile terminalname