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     Error when using HDIFF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Error when using HDIFF
 Login/Join
 
Master
posted
I am trying to use HDIFF to calculate the number of Days from start of a visit to end of same.

I have posted the code and error message below:

-SET &BEG1 = '20081201';
-SET &END1 = '20081231';
-*
DEFINE FILE BLAH-BLAH
-* ADMT DATE CODE BELOW
ADMTDTTM/HYYMDS = HGETC(ADMIT_DATE, 'HYYMDS');
1DATEALPHA/A8 = EDIT(ADMIT_DATE,'$99999999');
1TIMEALPHA/A6 = EDIT(ADMIT_TIME,'$999999');
1DATETIMEALPHA/A14 = 1DATEALPHA || 1TIMEALPHA;
ADSCHDTM/HYYMDS = HINPUT(14, 1DATETIMEALPHA, 8, 'HYYMDS');
-* DSCH DATE CODE BELOW
DSCHDTTM/HYYMDS = HGETC(DISCHARGE_DATE, 'HYYMDS');
DATEALPHA/A8 = EDIT(DISCHARGE_DATE,'$99999999');
TIMEALPHA/A6 = EDIT(TIME_OF_DISCHARGE,'$$$$$$$999999');
DATETIMEALPHA/A14 = DATEALPHA || TIMEALPHA;
DSCHDTTM/HYYMDS = HINPUT(14, DATETIMEALPHA, 8, 'HYYMDS');
END
 -*
TABLE FILE BLAH-BLAH
PRINT
ADSCHDTM
DSCHDTTM
-*STAY/D12.2 = HDIFF(ADSCHDTTM,DSCHDTTM,'MINUTE','D12.2');
DIFF_DAYS/D12.2 = HDIFF(ADSCHDTM, DSCHDTTM, 'DAY', 'D12.2');
-*STAY_HRS/D12.2 = STAY_DUR/60;
-*
BY ENCOUNTER_NUMBER AS 'EDP#'
WHERE COMPANY_CODE EQ '70';
WHERE INOUT_CODE EQ 'I';
WHERE DISCHARGE_DATE FROM '20081201' TO '20081231';
IF RECORDLIMIT EQ 60
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE HOLD AS F1
END
-RUN
 0 ERROR AT OR NEAR LINE     32  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC002) A WORD IS NOT RECOGNIZED: DIFF_DAYS/D12.2
 BYPASSING TO END OF COMMAND
 (FOC009) INCOMPLETE REQUEST STATEMENT
 -*
 ? HOLD F1
 -RUN
 0NO HOLD FILE CURRENTLY ACTIVE
 -*

However, if I use the same code and EXCLUDE the DIFF_DAYS line, I see that the two date fields
are the correct format...?????
-*
[CODE]
? HOLD F1
-RUN
0DEFINITION OF HOLD FILE: F1
0FIELDNAME ALIAS FORMAT
ENCOUNTER_NUMBER E01 A20
ENCOUNTER_NUMBER E02 A20
CNTR E03 I9
ADSCHDTM E04 HYYMDS
DSCHDTTM E05 HYYMDS
-*

Anyone? Roll Eyes


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Needs "COMPUTE"!
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     Error when using HDIFF

Copyright © 1996-2020 Information Builders