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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
coding help
 Login/Join
 
<RBC007>
posted
I'm hoping for some basic help in a report. I would like to sum up (total) at the end of the report "DURATION". What do I need to complete the example report below.


example of the report ........


TABLE FILE HISTHLD
PRINT
ACTVCODE
RESULTCODE
DURATION
COMPANY NOPRINT
KEY1 NOPRINT
BY
ONDATE NOPRINT
BY
ONTIME NOPRINT
HEADING
............
END
-RUN


JOIN DURHLD.ACCOUNTNO IN DURHLD TO ALL HRSHLD.ACCOUNTNO IN HRSHLD AS JOIN1

DEFINE FILE DURHLD
HOURDUR/A2=EDIT ( DURATION, '99$$$$$$' );
MINDUR/A2=EDIT ( DURATION, '$$$99$$$' );
SECDUR/A2=EDIT ( DURATION, '$$$$$$99' );
DURHR/I2=EDIT ( HOURDUR);
DURSEC/I2=EDIT ( SECDUR);
DURMIN/I2=EDIT ( MINDUR);
END
TABLE FILE DURHLD
SUM
DURHR/I4
DURMIN/I4
DURSEC/I4
ON TABLE HOLD AS OPDUR
END
-RUN


TABLE FILE OPDUR
PRINT
DURHR
DURMIN/I6 NOPRINT
DURSEC/I6 NOPRINT
COMPUTE DURSEC1/I2 = DURSEC / 60; NOPRINT
COMPUTE DURSEC2/I6 = DURSEC - ( DURSEC1 * 60 ) ; NOPRINT
COMPUTE DURSEC3/I2 = IF DURSEC GT 60 THEN DURSEC2 ELSE DURSEC; NOPRINT
COMPUTE DURMIN2/D12.2 = DURMIN + DURSEC1; NOPRINT
COMPUTE DURMIN1/I2 = DURMIN2 / 60; NOPRINT
COMPUTE DURMIN3/I2 = DURMIN - ( DURMIN1 * 60 ) ; NOPRINT
COMPUTE DURMIN4/A2 = EDIT ( DURMIN3 ) ;
COMPUTE DURSEC4/A2 = EDIT ( DURSEC3 ) ;
COMPUTE DURHR1/I2 = DURHR + DURMIN1;
COMPUTE DURHR2/A2 = EDIT ( DURHR1 ) ;
COMPUTE OPTOT/A8 = DURHR2 | ':' | DURMIN4 | ':' | DURSEC4;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS HISTHLD
END
-RUN

TABLE FILE HISTHLD
PRINT
ACTVCODE
RESULTCODE
DURATION
COMPANY NOPRINT
KEY1 NOPRINT
BY
ONDATE NOPRINT
BY
ONTIME NOPRINT

HEADING
 
Report This Post
Expert
posted Hide Post
DURATION appears to be an Alpha field.
Look up the DATE-TIME format, and translate this field into a date time. then you can do math with it.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders