|
| i have to load the content of a txt file in a DB2 table and then i have to transfer the rows of this table in another one. To do this i'm working with a scheduler job that use a config xml file. In this file there are different tags that the job executes
sequentially.
When the job read the tag relative to the loading from txt to table, start a DB2 CLP that executes a specific command line. The succesive tag in the xml file is that relative to the transfering from a table to another one so i can execute it only if previ
ous tag (the DB2 command line) is terminated. But the DB2 command line work like a thread, in parallel with the main process, so when the scheduler job starts to execute the second tag, it will find the table empty and the job does nothing. How can i wait
for the end of the thread?
To execute the command line i'm using Runtime Java class with the exec() and waitFor() methods to check the correct execution of the process.
|
|