The output from the HELP TABLE command comes from Data Dictionary.
If I understand correctly, you want to create a new table with the following output.
help table t1;
*** Help information returned. 4 rows.
*** Total elapsed time was 1 second.
Column Name Type Comment
------------------------------ ---- --------
a1 I ?
b1 CF ?
c1 D ?
d1 DA ?
You can get all of those three columns (or even more) from the table DBC.TVFields.
help table dbc.tvfields;
help table dbc.tvfields;
*** Help information returned. 37 rows.
*** Total elapsed time was 1 second.
Column Name Type Comment
------------------------------ ---- ----------------
TableId BF ?
FieldName CV ?
FieldId I2 ?
Nullable CF ?
FieldType CF ?
MaxLength I ?
DefaultValue CV ?
DefaultValueI BV ?
TotalDigits I2 ?
ImpliedPoint I2 ?
FieldFormat CV ?
FieldTitle CV ?
CommentString CV ?
CollationFlag CF ?
UpperCaseFlag CF ?
DatabaseId BF ?
Compressible CF ?
CompressValueList CV ?
FieldStatistics BV ?
ColumnCheck CV ?
CheckCount I2 ?
CreateUID BF ?
CreateTimeStamp TS ?
LastAlterUID BF ?
LastAlterTimeStamp TS ?
LastAccessTimeStamp TS ?
AccessCount I ?
SPParameterType CF ?
CharType I2 ?
LobSequenceNo I2 ?
IdColType CF ?
UDTypeId BF ?
UDTName CV ?
TimeDimension CF ?
VTCheckType CF ?
TTCheckType CF ?
ConstraintId BF ?
But first we need to find out DatabaseId and TableId.
select databaseid
from dbc.dbase
where databasename='db1';
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
DatabaseId
----------
00000F04
select TVMId
from dbc.tables2
where databaseid='00000F04'xb
and TVMName='t1';
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
TVMId
------------
0000D8070000
Now you can list all the columns you need and store them correspondingly.
select * from dbc.tvfields
where databaseid='00000F04'xb
and tableid='0000D8070000'xb;