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     [CLOSED] PROBLEM - HIGHEST 1

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] PROBLEM - HIGHEST 1
 Login/Join
 
Platinum Member
posted
I'm trying to get the most recent "Stop Date" value that is less than today.

When I use "LOWEST 1", the code executes.

When I use "HIGHEST 1", I get an error that " (FOC002) A WORD IS NOT RECOGNIZED: 1"

Can anyone see what I'm doing wrong? I've used the "HIGHEST 1" in other queries with no issues.

Thank you.

SET ASNAMES = ON

SET DTSTANDARD = STANDARD

DEFINE FILE FACILITIES
AUDIT_STOP_DATE/YYMD= HDATE(STOPDATE,'YYMD');
END

TABLE FILE FACILITIES
PRINT 
GENERALFACILITYID
AUDIT_STOP_DATE AS 'AUDIT_STOP_DATE'

BY GENERALFACILITYID NOPRINT
BY HIGHEST 1 AUDIT_STOP_DATE NOPRINT

WHERE GENERALFACILITYID EQ '03640'
WHERE AUDIT_STOP_DATE LT &YYMD

ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT

This message has been edited. Last edited by: Kerry,


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Expert
posted Hide Post
I tried to simulate your fex, and with the following code I did not get an error:

FILEDEF MASTER DISK FACILITIES.MAS
-RUN

-WRITE MASTER FILENAME=FACILITIES, SUFFIX=FIX
-WRITE MASTER SEGNAME=FACILITIES
-WRITE MASTER FIELDNAME=GENERALFACILITYID, FORMAT=A20, ACTUAL=A20, $
-WRITE MASTER FIELDNAME=STOPDATE, FORMAT=HYYMDS, ACTUAL=A17, $
-RUN

SET ASNAMES = ON
SET DTSTANDARD = STANDARD
-RUN

DEFINE FILE FACILITIES
AUDIT_STOP_DATE/YYMD= HDATE(STOPDATE,'YYMD');
END
-RUN

TABLE FILE FACILITIES
PRINT 
GENERALFACILITYID
AUDIT_STOP_DATE AS 'AUDIT_STOP_DATE'

BY GENERALFACILITYID NOPRINT
BY HIGHEST 1 AUDIT_STOP_DATE NOPRINT

WHERE GENERALFACILITYID EQ '03640'
WHERE AUDIT_STOP_DATE LT &YYMD

ON TABLE PCHOLD FORMAT EXL2K
END
-RUN


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 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     [CLOSED] PROBLEM - HIGHEST 1

Copyright © 1996-2020 Information Builders