View previous topic :: View next topic
|
Author |
Message |
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi All,
Is is possible to get the time at which the current CICS session has started.
My requirement is to get the total no. of seconds from the startup to present time ... am able to see the option of STARTUPDATE in the INQUIRE SYSTEM command... would like something similiar but in unit of time ... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I cannot think of any way to retrieve this data. Nor can I think of any possible use for such a data field. For example, a region that has been up for 10 days straight would have a value of 864,000 seconds in such a time field -- so why do you think you need such a value? |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Thanks Robert,
Quote: |
so why do you think you need such a value? |
Its coz we are migrating from the current system (ALCS-Airline Contrl System) to CICS system. In ALCS this functionality is available so was looking into the feasiblity of implementing the same in CICS...
And also the value is stored in a fullword (in binary format)... so hoping 10 days or more should not be a problem... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Actually, you can combine obtaining the startup-date and startup-time into a single sub-program, moving both CSA data-fields to their respective commarea data-fields -
Code: |
COMMSTDT DS PL4 STARTUP-DATE (JULIAN)
COMMSTTM DS XL4 STARTUP-TIME (UNALIGNED-FWORD)
*
DFHAFCD TYPE=LOCATE GET AFCB-ADDRESSABILITY
L R15,AFCSA-DFHAFCB(,R15) POINT TO THE CSA
MVC COMMSTDT,CSASTYDP-DFHCSADS(R15)
AP COMMSTDT,=P'1900000' CENTURY-ADJUSTMENT
MVC COMMSTTM,CSASITOD-DFHCSADS(R15)
|
Bill |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Binop,
A small adjustment to the previous code -
Code: |
DFHAFCD TYPE=LOCATE GET AFCB-ADDRESSABILITY
L R15,AFCSA-DFHAFCB(,R15) POINT TO THE CSA
MVC COMMSTTM,CSASITOD-DFHCSADS(R15)
L R15,CSAOPFLA-DFHCSADS(,R15)
MVC COMMSTDT,CSASTYDP-CSAOPFL(R15)
AP COMMSTDT,=P'1900000' CENTURY-ADJUSTMENT
|
Label CSASTYDP is defined as part of the CSAOPFL (Optional Features List) DSECT. R15 has to be loaded with the Optional Features address CSAOPFLA to establish addressability, after populating the commarea COMMSTTM binary-fullword. In the CSAOPFL DSECT, CSASTYDP is defined as an unaligned address ("A" directive ), but it's definitely a PL4 Julian-Date.
Apologies for the oversight....
Bill |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi All,
This is what we have done to calculate the no. of seconds since Startup.. When the CICS startup, we will update a CWA field with the Startup time... This field will then be used accordingly whenever required...
Sorry for not posting the solution before... |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
write a plt program, which does an ASKTIME and writes the data to CWA. a few lines of code.... however if you care about the few seconds difference between cics step-initiation PGM=DFHSIP up to executing this plt program you need another solution. |
|
Back to top |
|
|
|