Hello,
I am doing a dump of tables from a section of our system. Given who the customer is that we are dumping tables for, they may or may not have the full set of tables that are used in this section of the system so I am trying to be able to do this dynamically.
If I have two data dumps
table1.d
table2.d
Is there a way to extract "table1" from the name of the data file into a variable xtable-name to be used to create the table and then import the information in the .d into the table?
import stream of the .d files using the example here
assign xtable-name = "table1" (extract from the file name)
INPUT FROM table1.d.
REPEAT:
CREATE xtable-name.
IMPORT xtable-name.
END.
INPUT CLOSE.
Can something like this be done or do you have to explicitly name the table?
I am doing a dump of tables from a section of our system. Given who the customer is that we are dumping tables for, they may or may not have the full set of tables that are used in this section of the system so I am trying to be able to do this dynamically.
If I have two data dumps
table1.d
table2.d
Is there a way to extract "table1" from the name of the data file into a variable xtable-name to be used to create the table and then import the information in the .d into the table?
import stream of the .d files using the example here
assign xtable-name = "table1" (extract from the file name)
INPUT FROM table1.d.
REPEAT:
CREATE xtable-name.
IMPORT xtable-name.
END.
INPUT CLOSE.
Can something like this be done or do you have to explicitly name the table?