Hi all,
I have generated an xml fileof the attached job in a routine.
the xml file contains the full information of the job.
Now i want to get job's process id and stage pid and cpu time from the xml ile generated .
Is there any way todo that.
Please help me
how to get values from an xml file to a variable in routine
Is this a server/parallel job or a TX job?
If the former, you can use DSGetStageInfo() using the DSJ.STAGECPU key to get CPU time used in a stage. There is still a bug in this value, it doesn't actually return the CPU time used, but the CPU percentage; so you have to use the stage runtime computed by values returned in DSJ.STAGESTARTTIMESTAMP and DSJ.STAGEENDTIMESTAMP to get actual CPU time used.
The PID of a stage can be returned via the DSJ.STAGEPID key to DSGetStageInfo().
If the former, you can use DSGetStageInfo() using the DSJ.STAGECPU key to get CPU time used in a stage. There is still a bug in this value, it doesn't actually return the CPU time used, but the CPU percentage; so you have to use the stage runtime computed by values returned in DSJ.STAGESTARTTIMESTAMP and DSJ.STAGEENDTIMESTAMP to get actual CPU time used.
The PID of a stage can be returned via the DSJ.STAGEPID key to DSGetStageInfo().
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read the XML file and parse the tags. When you've found the start tag start collecting characters until you find the end tag. You can use the Index() function to determine the character position of the tags.
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.