Hi All,
I've a job requirements that require to capture the logs and store them
into a DB2 database. I can assume that we might be able to do that
with after job sub-routine or any kind of job activity.
Please give me some guidence.
Thanks
Capture Log and store it into Db2 DB
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If your repository is DB2 and you're using logging to the common repository, then your logs are already in DB2.
Otherwise I'd recommend using a server job, because in the local repository hashed files are used to store job logs and server jobs are specifically equipped to deal with hashed files.
Otherwise I'd recommend using a server job, because in the local repository hashed files are used to store job logs and server jobs are specifically equipped to deal with hashed files.
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.
-
- Participant
- Posts: 19
- Joined: Tue Feb 23, 2010 11:15 am
- Location: Los Angeles
I see this post is a little dated. However, for those needing to capture job information including rows down a link, here's a how to using an XML file (if you are unfamiliar with the XML stage this is an easy way to familiarize yourself):
For each job
Edit>Job Properties > After-Job subroutine > DSJobReport
Input Value: 2;C:\Data (any directory you like)
The "2" value will create an XML File. You can find other options, such as txt, by using Help search on "DSJobReport"
Compile and Run the job.
Import the XML file metadata from the directory you selected. Import>Table Definitions > XML Table Definitions
Place a check in the Document > Job > Name, StartDateTime, EndDateTime, and others as desired.
Optionally, place a check in the ComponentSet> InstanceSet>Instance > Link Name and RowCount as desired. (getting a specific link name will require a Transformation stage, see next steps, and appropriate constraints)
Create a job with an XML Input.
XML Input> output >Columns, "Load" the XML metadata.
Be aware of the TransformationSettings> Repitition element required checkbox if you have issues.
Also be aware of the XML Input > Stage > TransformationSettings> Repitition element required checkbox if you have issues.
Finally the output link can go to other processing stages as desired, e.g. Transformer to select link names or database/flat file.
Lastly, you can create the job as either a shared container or as a job in a sequence which does a loop through all of the files.
Hope this helps. God Bless
For each job
Edit>Job Properties > After-Job subroutine > DSJobReport
Input Value: 2;C:\Data (any directory you like)
The "2" value will create an XML File. You can find other options, such as txt, by using Help search on "DSJobReport"
Compile and Run the job.
Import the XML file metadata from the directory you selected. Import>Table Definitions > XML Table Definitions
Place a check in the Document > Job > Name, StartDateTime, EndDateTime, and others as desired.
Optionally, place a check in the ComponentSet> InstanceSet>Instance > Link Name and RowCount as desired. (getting a specific link name will require a Transformation stage, see next steps, and appropriate constraints)
Create a job with an XML Input.
XML Input> output >Columns, "Load" the XML metadata.
Be aware of the TransformationSettings> Repitition element required checkbox if you have issues.
Also be aware of the XML Input > Stage > TransformationSettings> Repitition element required checkbox if you have issues.
Finally the output link can go to other processing stages as desired, e.g. Transformer to select link names or database/flat file.
Lastly, you can create the job as either a shared container or as a job in a sequence which does a loop through all of the files.
Hope this helps. God Bless
Darryl