Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
z/VM z/VSE Get CPU-time of a COBOL Batch program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Andi1982

New User


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

PostPosted: Mon Mar 11, 2019 3:36 pm    Post subject: z/VM z/VSE Get CPU-time of a COBOL Batch program
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: 8787
Location: Welsh Wales

PostPosted: Tue Mar 12, 2019 12:35 pm    Post subject:
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: 41
Location: Karlsruhe / Germany

PostPosted: Wed Mar 13, 2019 12:55 pm    Post subject:
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    Post subject: Reply to: z/VM z/VSE Get CPU-time of a COBOL Batch program
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is multiple program names allowed in ... Sakthidevi PL/I & Assembler 1 Tue Nov 19, 2019 11:12 pm
No new posts Mainframes Job opportunity-Full time Rohit Umarjikar Mainframe Jobs 0 Tue Nov 19, 2019 7:48 am
No new posts COBOL -DB2 SQL code to have GROUP BY ... vinu78 DB2 21 Wed Oct 23, 2019 7:00 pm
No new posts Running a REXX exec program using ZOSMF Sakthi344 CLIST & REXX 3 Tue Oct 15, 2019 3:13 pm
No new posts How to handle NULL in COBOL program bhaskar_kanteti COBOL Programming 8 Mon Oct 07, 2019 3:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us