View previous topic :: View next topic
|
Author |
Message |
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hello,
I used google a lot to get help, but just found solutions vor z/OS. But I need it in z/VSE.
We want to know how much CPU-Time our cobol program in batch used. We can see it during runtime in Console, but when it is done the task disappear and we can't see how much cpu-time it was.
Is ist possible to get the cpu-time of the current task within the cobol program? Maybe by addressing some system control blocks? then we could write out the time before we exit the program.
I would be happy about any idea how to get the cpu-time.
Best regards
Andi |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Is there not an SMF for VSE ? |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
I am not sure, often heard about SMF but never was able to find good documentation for that. The z/VSE website is still a misery for me, always ending up on sites for z/OS.
Just was thinking that it is possible anyhow to get the cpu-time-value during execution. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi Andy,
Just picking up this thread cause i'm actually working on two systems.
z/OS & z/VSE. And as an old z/OS-Person i could comprehand how bothering it is to work on VSE, even though IBM does a good Job in makeing VSE more comfortable.
In the older days you coud use the COMREG to get the time and many more internal informations. New Enterprise Compilers don't support this now.
There exists a copybook with fields for these informations and you could set a pointer to a systemadress so that you could get infos like Jobdate Jobtime Jobname, PowerId, Phasename, and so on.
Three years back i wrote a Cobol using this technique but i lost the CopyBook. So perhaps google about that to get some Infos.
Code looks like that:
SET ADDRESS OF COMREG-DESECT TO COMREG-POINTER
MOVE COMREG-JOBDATE TO WRK-COMREG-JOBDATE
MOVE COMREG-JOBNAME TO WRK-COMREG-JOBNAME
MOVE COMREG-POWERID TO WRK-COMREG-POWERID
MOVE COMREG-PHASENA TO WRK-COMREG-PHASENA
MOVE COMREG-SRTTIME TO WRK-COMREG-SRTTIME
MOVE COMREG-SYSDATE TO WRK-COMREG-SYSDATE
MOVE COMREG-JOBUSER TO WRK-COMREG-JOBUSER
But why not using the easy way:
MOVE FUNCTION CURRENT-DATE(01:04) TO WRK-DATUM(05:04)
MOVE FUNCTION CURRENT-DATE(05:02) TO WRK-DATUM(03:02)
MOVE FUNCTION CURRENT-DATE(07:02) TO WRK-DATUM(01:02)
MOVE FUNCTION CURRENT-DATE(09:06) TO WRK-ZEIT(01:06)
...at the start and stopp of the programm and displaying the values. |
|
Back to top |
|
|
|