IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

z/VM z/VSE Get CPU-time of a COBOL Batch program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Mon Mar 11, 2019 3:36 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Mar 12, 2019 12:35 pm
Reply with quote

Is there not an SMF for VSE ?
Back to top
View user's profile Send private message
Andi1982

New User


Joined: 27 Mar 2008
Posts: 42
Location: Karlsruhe / Germany

PostPosted: Wed Mar 13, 2019 12:55 pm
Reply with quote

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
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed May 08, 2019 7:52 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
Search our Forums:

Back to Top