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.
DEFINE FILE CAR
DFN_HOURS_IN/A2 = EDIT('&TIME_IN.EVAL','9') ;
DFN_MINUTES_IN/A2 = EDIT('&TIME_IN.EVAL','$99') ;
DFN_MINUTES_OUT/I2 = EDIT(DFN_MINUTES_IN) * 60;
DFN_HRS_MINS/A6 = DFN_HOURS_IN || ':' || EDIT(DFN_MINUTES_OUT) ;
END
TABLE FILE CAR
PRINT SALES NOPRINT
HEADING
"&TIME_IN = <DFN_HOURS_IN Hours and <DFN_MINUTES_OUT Minutes"
"OR, the time is ( <DFN_HRS_MINS ) "
ON TABLE SET PAGE OFF
END
-* this produces: 5.50 = 5 Hours and 30 Minutes
-* OR, the time is ( 5:30 )
Of course the parsing of the &TIME_IN needs to be adjusted for the hours and minutes potions to work properly... That's more then this example covers...
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Or consider this: [code] -* File duration.fex -SET &DUR_IN = 550; -* Set test value DEFINE FILE CAR DUR_ALL/D20.2 = &DUR_IN/100; -* Put in format same as OP's request DUR_HRS1/I11 = INT (DUR_ALL); -* Use INT function to get hours separate from minutes DUR_MIN1/I11 = INT(DUR_ALL * 100) - (DUR_HRS1 * 100); -* Isolate minutes END TABLE FILE CAR SUM DUR_ALL DUR_HRS1 DUR_MIN1 MODEL NOPRINT ON TABLE HOLD END -* Build hold file with sum of hours and minutes DEFINE FILE HOLD DUR_MIN2/I11 = IMOD(DUR_MIN1,60,DUR_MIN2); -* Calculate minutes less than one hour using Integer Modulus function DUR_HRS2/I11 = DUR_HRS1 + (DUR_MIN1/60); --* Add one or more hours of minutes to origial sum of hours END TABLE FILE HOLD PRINT DUR_ALL DUR_HRS1 DUR_MIN1 DUR_HRS2 DUR_MIN2 END {/code]
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003