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 created a hold table(HOLD1) from an existing table(TABLE1). I used an across field called 'YEAR' -- its format is 2005/06, 2006/07, etc. Then in the HOLD1, I'd like to sum the field '2005/06'. But I got an error message as shown below.
It's okay to use other fields, and it's also okay to use "PRINT *". So I'm guessing it's because of the special character '/'. Is there anyway to use '2005/06' explicitly?
Thanks in advance.
----- CODE
SET ASNAMES = ON SET HOLDLIST = PRINTONLY TABLE FILE TABLE1 SUM COUNT AS '' BY DEPARTMANT ACROSS LOWEST YEAR AS '' ON TABLE NOTOTAL ON TABLE HOLD AS HOLD1 FORMAT ALPHA END
TABLE FILE HOLD1 SUM 2005/06 BY DEPARTMANT ON TABLE NOTOTAL END
----- ERROR Message
0 NUMBER OF RECORDS IN TABLE= 601 LINES= 78 0 ERROR AT OR NEAR LINE 24 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: 2005/06 BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENTThis message has been edited. Last edited by: Kerry,
Try removing the "AS ''" from the code - because you have (and need) ASNAMES=ON, those AS statements cause fields with no names in the HOLD file. Without "AS ''", the ACROSS statement will take the first three letters of the COUNT field name and create proper ACROSS field names, eg. COU200504.
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
Is it possible that your "YEAR" field is not a "smart-date" field, but an alpha field where you concatenated the Year and Month with a slash in between?
What is the format of YEAR or what is the format of the field you derived YEAR from?
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
YEAR is a SQL DB field that has the type char(7), and its values in DBs are '2005/06', '2006/07' etc, where '2005/06' means fiscal year 2005 to 2006. When I across the YEAR in the first table, I got all its values in the HOLD file, so I guess it's not a derived field.
Can you change the field to something else like '2005 to 06'.
e.g.
SET ASNAMES = ON
SET HOLDLIST = PRINTONLY
DEFINE FILE CAR
FINYEAR/A7 = DECODE SEATS(2 '2006/07' 4 '2007/08' ELSE '2008/09') ;
FinYear/A10 = EDIT(FINYEAR,'9999$ to 99') ;
END
TABLE FILE CAR
SUM
SALES AS ''
BY COUNTRY
ACROSS FinYear
ON TABLE HOLD AS TEST
END
-RUN
! type test.mas
TABLE FILE TEST
PRINT
'2006 to 07'
'2007 to 08'
'2008 to 09'
BY COUNTRY
END
TABLE FILE TEST PRINT '2006 to 07' '2007 to 08' '2008 to 09' BY COUNTRY END
If the quotes would disable the /format what would you do with your example if you wanted to change the format? I know, use COMPUTE or DEFINE. Still...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
I'd say that if there is a field name that matches the bit after the slash, then WF shouldn't interpret that bit as a format. But that's not watertight either.
I think the real issue is with how WF does quoting of fields. If it would expect quote around separate parts of a field path, errors like these couldn't occur. You'd get
PRINT
'TABLE1'.'SEG01'.'2006/07'/A7
'TABLE1'.'SEG01'.'2006/07'
-* or maybe
'TABLE1.SEG01.2006/07'/A7
'TABLE1.SEG01.2006/07'
-* instead of (ambiguous)
'TABLE1.SEG01.2006/07/A7'
'TABLE1.SEG01.2006/07'
Doesn't that make more sense than the current implementation? Better yet, in SQL it's customary to use double-quotes (") to quote identifiers, so the distinction is immediately clear. It's a standard there, it would make sense to copy that over.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :