6.2.2 Creating Text Files



Create text files from the application's database catalog entries, RMSfiles, formfiles, and visual reportfiles. In addition, if any termset terminal definition files are to be transferred, create text versions of these files as well.

It is suggested that the pathname of the text file clearly represent the text version of the RMSfile, formfile, visual reportfile or termset file. For example, the pathname of the text file could be the pathname of the original file with a .a extension.

The maximum number of records is needed when recreating hashed RMSfiles on the destination machine. It is suggested that the number of records for each RMSfile be recorded in a text file that has the pathname of the original RMSfile with a .n extension.

It is suggested that you record the catalog entries for the application's database, RMSfiles, formfiles and reportfiles in separate text files. For example, you could store the database definition, the RMSfile definitions, the formfile definitions and the reportfile definitions in the text files dbase.def, rms.def, form.def and rpt.def.

The steps involved for creating portable text files are as follows:

1. Record the database catalog information for the application's database. This information is required to create the new database entry on the destination machine. The database catalog information consists of the database name, description and log file. This can be done with the dbadmin(C-1) command as follows:

dbadmin -rv dbname dbname desc logfile > dbase.def

2. Convert the RMS definition files for all logical RMSfiles to text format with the pdef(C-1) command as follows:

pdef -d deffile > textfile

3. Convert all data stored in the logical RMSfiles to text format with the pull(C-1) command as follows:

pull -fa lrmsfile > textfile

4. Record the maximum number of records for all RMSfiles. This is required when rebuilding the RMSfile on the destination machine. This can be done with the pdict(C-1) command as follows:

pdict -n lrmsfile > textfile

5. Record the catalog information for each logical RMSfile. This information is required to create the logical RMSfile entry on the destination machine. The RMSfile catalog information consists of the logical RMSfile name, description, pathname, and specifies whether the file is logged. This can be done with the lfadmin(C-1 ) command as follows:

lfadmin -rv lrmsfile lfname sysname desc logged real >> rms.def

6. Convert all logical formfiles to text format with the pform(C-1) command as follows:

pform -d lformfile > textfile

7. Record the catalog information for each logical formfile. This information is required to create the logical formfile entry on the destination machine. The formfile catalog information consists of the logical formfile name, description and its pathname. This can be done with the frmadmin(C-1) command as follows:

frmadmin -rv lformfile formname sysname desc >> form.def

8. Convert all logical reportfiles in visual format to text format with the preport(C-1) command as follows:

preport -d lrptfile > textfile

9. Record the catalog information for each reportfile. This information is required to create the logical report entry on the destination machine. The reportfile catalog information consists of the logical reportfile name, description, pathname and specifies whether a compiled version of the report is maintained. This can be done with the rptadmin(C-1) command as follows:

rptadmin -rv lrptfile rptname sysname desc precompile >> rpt.def

10. For all terminal definitions (created with termset(C-1)) that are required on the destination machine, convert the terminal definition to text with the pterm(C-1) command:

pterm -p terminalname > textfile