Can RDF Tables be Rebuilt, Having Lost the SQL CREATE Statements for Them?

Document ID : KB000117815
Last Modified Date : 18/10/2018
Show Technical Document Details
Issue:
The client needs to rebuild some of their RDF tables, having lost the original SQL CREATE statements for them.
 
Environment:
CA OPS/MVS 12.3
Resolution:

The client can insert a NEW table, and use the OLD table as the model table, to see the structure of the table.

If there is a MSF connection, the same thing can be done:
. Put the MSFID in front of the table name to be used for the MODEL: MSFID>modeltablename
RDF Table Editor ------------------------------------- Specify New Table Attributes
Command ===>
--------------- Specify name of relational table to be created ---------------
New Name ===> NEWTABLE
------------------ Model for column definitions (Optional) -------------------
Model Table ===> OPV11V>#SSM
- OR -
Select default column definitions for ONE of the following types of System State Manager (SSM) tables:
SSM ACTION table, or SSM BASIC resource table, or SSM STC resource table

---------------------- Select special table attributes -----------------------
Global Temporary table (deleted when OPS/MVS terminates) (Y/N)? If blank, same as model table.
SSM table types are NOT Global Temporary. If blank and no model table, new table is NOT Global Temporary. Press ENTER to continue or END to terminate creating new table.
-----------------------------------------------------------------------------------------------------------------------------------------------------

With the above, you will be taken to the table structure editor, to see the definition of the table for future reference.
The easiest way to recreate the tables would be to run the sample REXX program WRITETBL on the system it is on, then run READTBL on the other system.
It will automatically generate the READTBL table and populate it with the data from the WRITETBL.
Or, create a copy of WRITETBL and modify it to only generate the table itself with no data.
Or, do that in a copy of READTBL.