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 want to concatenate a MDYY field with a numeric field that represents the time of day.
This is what I'm doing. I know the date field has a value of 10032013 (since I specified it in the where clause) but the result I am getting is "00041184 004426" The time part is right, but the date part has been mutated somehow.
DEFINE FILE F554852
ZZZ/A15 = EDIT(TLCRDJ,'99999999') | ' ' | EDIT(TLTDAY);
END
-RUN
TABLE FILE F554852
PRINT ZZZ
TLCRDJ
TLTDAY
BY TLCRDJ NOPRINT
BY TLTDAY NOPRINT
WHERE TLCRDJ EQ '10032013'
ON TABLE PCHOLD FORMAT EXCEL
END
This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 7.6.9 Windows all output (Excel, HTML, PDF)
This is an old db4 database. The date is actually stored as a numeric field in JDE Julian format in the database. But Webfocus is already converting it to MDYY.
WebFOCUS 7.6.9 Windows all output (Excel, HTML, PDF)
I've tried to make Francis' example use a defined function, but I am getting an error.
(FOC239) FORMAT DEFINITION IN ERROR. INTERNAL FIELD: DTDP
BYPASSING TO END OF COMMAND
0 ERROR AT OR NEAR LINE 34 IN PROCEDURE _ADHOCRQFOCEXEC *
(FOC263) EXTERNAL FUNCTION OR LOAD MODULE NOT FOUND: ALPHADT
0 ERROR AT OR NEAR LINE 40 IN PROCEDURE _ADHOCRQFOCEXEC *
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: TLTDTTMX
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
The code:
DEFINE FUNCTION ALPHADT (DTDP/MDYY, TMPT/I6)
-* CONVERT TO ALPHA
TLCRDJA/A8YYMD = DTDP;
TLTDAYA/A8 = EDIT(TMPT,'99:99:99');
TLTDTTMX/A25 = TLCRDJA | ' ' | TLTDAYA;
-* CONVERT TO DATE-TIME
TLTDTTM/HMDYYS = HINPUT(25, TLTDTTMX, 8, 'HYYMDS');
ALPHADT/A25 = TLTDTTMX;
END
DEFINE FILE CAR
-* YOUR FIELDS
TLCRDJ/MDYY = '10/03/2013';
TLTDAY/I6 = 004426;
TLTDTTMX/A25 = ALPHADT( TLCRDJ, TLTDAY );
END
TABLE FILE CAR
PRINT
TLCRDJ
TLTDAY
TLTDTTMX
COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
-*ON TABLE PCHOLD FORMAT EXL2K
ON TABLE PCHOLD FORMAT EXCEL
END
WebFOCUS 7.6.9 Windows all output (Excel, HTML, PDF)
Putting a MDYY into an A8YYMD actually works. What apparently doesn't work is using a MDYY or YYMD as a parameter to a defined function. If I put the MDYY in the A8YYMD first and then send the A8YYMD to the function it works fine.
WebFOCUS 7.6.9 Windows all output (Excel, HTML, PDF)