Hi All,
I have a specific scenario as while the main job started a table should get inserted with the jobstart time and when the main job finished the same table should be updated with jobend time.How could i go ahead with this.
Thanks in advance.
Regards,
rajii
inserting rows into a table at runtime
Moderators: chulett, rschirm, roy
You want it at the start of a job then viewtopic.php?t=91146&highlight= link will get you close.
Mamu Kim
You can create a simple BATCH job that does what you need. Here's some pseudo-code:
1. Use the DSExecute API to run a DOS command line .bat file that executes a database command line shell (isql, dbaccess, sqlplus) running either a SQL script or stored procedure to create your insert row.
2. Use the DS job control APIs (search this forum, read your manuals) to start your desired job and wait for it to finish.
3. Use the DSExecute API to run a DOS command line .bat file that executes a database command line shell (isql, dbaccess, sqlplus) running either a SQL script or stored procedure to create your update row, giving it the result status of the job and setting the end time.
Now, you could take this logic and put it all into a single DS BASIC function, and use that function in a Sequencer to organize a bunch of jobs for your jobstream. Instead of a job activity icon, use a function stage to run your function, which is a better "job activity" activity stage. Consider further expanding your function to fetch job parameters dynamically at runtime and set them in the job. There's a lot you can do.
1. Use the DSExecute API to run a DOS command line .bat file that executes a database command line shell (isql, dbaccess, sqlplus) running either a SQL script or stored procedure to create your insert row.
2. Use the DS job control APIs (search this forum, read your manuals) to start your desired job and wait for it to finish.
3. Use the DSExecute API to run a DOS command line .bat file that executes a database command line shell (isql, dbaccess, sqlplus) running either a SQL script or stored procedure to create your update row, giving it the result status of the job and setting the end time.
Now, you could take this logic and put it all into a single DS BASIC function, and use that function in a Sequencer to organize a bunch of jobs for your jobstream. Instead of a job activity icon, use a function stage to run your function, which is a better "job activity" activity stage. Consider further expanding your function to fetch job parameters dynamically at runtime and set them in the job. There's a lot you can do.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could even create little
DataStage jobs to insert/update the table, and have them run from before/after subroutines or, indeed, from a master job sequence. This may be easier for you to maintain.
DataStage jobs to insert/update the table, and have them run from before/after subroutines or, indeed, from a master job sequence. This may be easier for you to maintain.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.