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

CICS Startup time


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Sat Jul 17, 2010 5:40 pm
Reply with quote

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 ... icon_razz.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jul 17, 2010 6:04 pm
Reply with quote

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

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Sat Jul 17, 2010 6:43 pm
Reply with quote

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

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Jul 17, 2010 7:21 pm
Reply with quote

Binop,

Review the DFHCSA DSECT for label CSASITOD, which according to the documentation is defined as "SYSTEM INITIALIZATION TIME OF DAY IN BINARY SECONDS".

Here's a link to the CICS/TS 3.2 Bookshelf and then click on "CICS Data Areas" and search for CSA -

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/DFHASJ00

Click below for a program which establishes addressability to the CSA, because the API was dropped after CICS/MVS 2.1.2 (HLL) and CICS/ESA 3.1.1 (Assembler), which can be used as a template.

www.ibmmainframes.com/viewtopic.php?p=226585&highlight=#226585

Bill
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Jul 18, 2010 8:15 pm
Reply with quote

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

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Jul 20, 2010 1:56 am
Reply with quote

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 icon_question.gif ), but it's definitely a PL4 Julian-Date.

Apologies for the oversight....

Bill
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Mon Aug 09, 2010 12:24 pm
Reply with quote

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... icon_redface.gif
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Sat Aug 14, 2010 7:21 pm
Reply with quote

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
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top