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.
I have a iSeries (AS/400) DB2 numeric column/field. I would like to use that as a time field in WebFOCUS. The value might be 142632 which would be 2:26:32PM.
What is the best way to set up the field in the Synonym?
TIAThis message has been edited. Last edited by: bbollmann,
Brian Bollmann Spartan Light Metal Products WebFocus 7.6.4 / iSeries / WebSphere
Convert to alpha and do an edit on that computed field alphafield=edit(orgfield) edit(alphafield,'99:99:99')
To get the exact coding I need some manuals, but this gives the direction. It also depends on the question if you need to display it only as time or if you also want to do calculations with it.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
I've tried to set up an HHIS field with the EDIT function as below.
DEFINE USER8H_ITR_DEF/HHIS WITH RCSTSH=EDIT(USER8H_ITR,'99:99:99'); TITLE='In Time,(Rounded)', DESCRIPTION='In Time - Rounded', $
In the GUI Synonym editor, the Expression turns red, and when I run Check, I get:
No HTML Output! -------------------------------------------------------------------------------- 0 ERROR AT OR NEAR LINE 1 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC36346) INCORRECT USE OF DATE-TIME FIELD OR CONSTANT
Brian Bollmann Spartan Light Metal Products WebFocus 7.6.4 / iSeries / WebSphere
Thanks Frank, I had succeeded at creating such a field before I originally posted. Unfortunately, this is Time and Attendance, so I need to subtract time A from time B.
Brian Bollmann Spartan Light Metal Products WebFocus 7.6.4 / iSeries / WebSphere
DEFINE FILE CAR
TIME1/A6 WITH COUNTRY=DECODE COUNTRY('ENGLAND' '163045' 'ITALY' '090522' 'FRANCE' '112500' JAPAN '180000' ELSE '210748');
DISPTIME/A8=EDIT(TIME1,'99:99.99');
AHRS/A2=EDIT(TIME1,'99');
AMIN/A2=EDIT(TIME1,'$$99');
ASEC/A2=EDIT(TIME1,'$$$$99');
TIME1SEC/D10=EDIT(AHRS)*3600+EDIT(AMIN)*60+EDIT(ASEC);
END
TABLE FILE CAR
PRINT TIME1 DISPTIME TIME1SEC
COMPUTE ELAPSEDSEC/D10=IF COUNTRY EQ LAST COUNTRY THEN 0 ELSE TIME1SEC-LAST TIME1SEC;
COMPUTE ELAPSEDHOUR/D7.3=ELAPSEDSEC/3600;
COMPUTE EHOUR/I2=ELAPSEDSEC/3600; NOPRINT
COMPUTE EMIN/I2=(ELAPSEDSEC-EHOUR*3600)/60; NOPRINT
COMPUTE ESEC/I2=(ELAPSEDSEC-EHOUR*3600-EMIN*60); NOPRINT
COMPUTE ETIME/A8=EDIT(EHOUR)|':'|EDIT(EMIN)|'.'|EDIT(ESEC);
BY LOWEST TIME1SEC NOPRINT
BY COUNTRY
END
I first converted the alpha time field to an number of seconds since midnight. If you do that with your time fields you can calculate the number of seconds between the two messure points. The difference is the time in seconds. the orher calculated fields are only to display it as a time.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006