Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Write to a table how long a report took to run

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Write to a table how long a report took to run
 Login/Join
 
Platinum Member
posted
Is there a way to figure out how long a report took to run? Can I put a timestamp at the beginning of the report and the end and substract the difference and write it to a table stating how long it took to run?

Or can someone point me in the right direction or forum that shows how to do this.

Thanks,
prodrigu

This message has been edited. Last edited by: Kerry,


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Expert
posted Hide Post
Similar topics have shown up in the past, and I think they all said to record the start and end of the run, assuming the job doesn't crash.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Waz,

Could you point me to a similiar topic? I looked but not seeing what I am looking for. Maybe I am not searching with the right criteria.

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
Expert
posted Hide Post
I don't know if there is specific code posted, but here is one thread.

http://forums.informationbuild...097075216#5097075216


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Hi,

I think I posted this code about 5 years ago.

 
-* File jcs.fex
-SET &ECHO=OFF;
-* Start elapsed time
-SET &NOW=HHMMSS('A8');
-TYPE &NOW
-* CPU start
-SET &START=&FOCCPU;
SET MSG=OFF
-REPEAT #A FOR &I FROM 1 TO 2000;
TABLE FILE CAR
COUNT COUNTRY CAR BODY
ON TABLE HOLD
END
-RUN
-#A
-RUN
-* CPU end
-SET &END= &FOCCPU;
-* CPU time used
-SET &TIME=&END - &START;
-TYPE &START &END &TIME
-* End elapsed time
-SET &NOW=HHMMSS('A8');
-TYPE &NOW

 


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
there's a way to set your &TOD system variable to actually change according to clock time.
by Default, it doesn't change, it only gets set at the start of a fex.
I can't remember where i saw that method.
so...
i use this (b/c i wrote it ages ago and it still works, so wth...):
at the top of my fex
-INCLUDE baseapp/mod_timestart
...stuff happens
at the end of my fex
-INCLUDE baseapp/mod_timestop

...
and here are the 2 fexes.
timestart:
-*timestart 2/2001
-* sljones@alumni.stern.nyu.edu phd ms mba
-* 12/08/09 NYU edited to clean up detritis
-SET &HOLDECHO = &ECHO ;
-SET &ECHO     = OFF ;
-SET &TIMEIS   =  HHMMSS('A8');
-SET &HHSTART  =  EDIT(&TIMEIS,'99');
-SET &mm       =  EDIT(&TIMEIS,'$$$99');
-SET &ss       =  EDIT(&TIMEIS,'$$$$$$99');
-SET &TIMESTART= (&HHSTART * 3600)+(&mm * 60) + &ss ;
-TYPE timestart is &DATE &TIMEIS
-SET &ECHO = &HOLDECHO ;
-SET &mm =;
-SET &ss =;

timestop:
-* timestop.fex 2/2001  edited 3/25/09 for unix
-* sljones@alumni.stern.nyu.edu phd ms mba
-SET &HOLDECHO  = &ECHO ;
-SET &ECHO      = OFF ;
-SET &TIMEIS    = HHMMSS('A8');
-SET &HH        = EDIT(&TIMEIS,'99');
-SET &HH        = IF &HHSTART GT &HH THEN &HH+24 ELSE &HH ;
-SET &MM        = EDIT(&TIMEIS,'$$$99');
-SET &SS        = EDIT(&TIMEIS,'$$$$$$99');
-SET &TIMESTOP  = (&HH * 3600)+(&MM * 60) + &SS ;
-SET &NUMSECS   = &TIMESTOP - &TIMESTART ;
-SET &NUMMINUTS = &NUMSECS/60;
-SET &NUMHOURS  = IF &NUMMINUTS GT 60 THEN &NUMMINUTS/60 ELSE 0;
-SET &NUMMINUTS = IF &NUMMINUTS LE 60 THEN &NUMMINUTS ELSE (&NUMMINUTS - (&NUMHOURS * 60));
-SET &NUMSECS1  = &NUMSECS - ( &NUMHOURS * 60*60 ) - (&NUMMINUTS * 60 ) ;
-SET &DURATION  = &NUMHOURS | ' hours; ' | &NUMMINUTS | ' minutes; ' | &NUMSECS1 | ' secs';
-TYPE timestop &TIMEIS duration &DURATION
-SET &ECHO      = &HOLDECHO ;


and it types the DURATION right into my echo log. especially good for long dataextract jobs.
you can then just MODIFY some file you keep with the fexname, say, and the &DURATION.. you know how to do that, right?
i'm sure there is an easier way...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Danny-SRL and susannah,

Both ideas work great!!! Thank you so much...

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
 
Posts: 121 | Location: California | Registered: June 19, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Write to a table how long a report took to run

Copyright © 1996-2020 Information Builders