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 Format Mismatch

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Error Format Mismatch
 Login/Join
 
<GGOFAnalyst>
posted
I keep getting the error FORMAT MISMATCH FOR THE FIELD: EXPENSEREGION

I've used substring to change the format (length) of the region field to match with the other region field. But I still get this error, I'm not sure what the problem is.

Here's my code:

TABLE FILE EXPENSEBASE
PRINT
COMPUTE CONTACTID/A38 = ' ';
COMPUTE CONTACTNAME/A160 = ' ';
PAYEEID
COMPUTE FULLNAME/A160 = ' ';
COMPUTE POSITION/A100 = ' ';
EXPENSEDATE
COSTCENTER
EXPENSESTATUS
TOTALAMOUNT
COMPUTE BUDGET/D15.2M = &BUDGET;
COMPUTE VARIANCE/D15.2M = BUDGET - TOTALAMOUNT;
EXPENSEREGION AS 'REGION'
EXPENSETYPE
BY EXPENSEID
WHERE EXPENSEREGION NE 'GGOF';
WHERE EXPENSESTATUS EQ 'SUBMITTED';
WHERE EXPENSETYPE EQ 'NON_CONTACT';
ON TABLE HOLD AS NONCONTACT
END
-RUN

JOIN EXPENSEID IN EXPENSEBASE TO ALL EXPENSEID IN EXPENSECONTACT AS J1
JOIN CONTACTID IN EXPENSEBASE TO CONTACTID IN CRMCONTACT AS J2
JOIN PAYEEID IN EXPENSEBASE TO SYSTEMUSERID IN CRMSYSTEMUSER AS J3
-RUN

TABLE FILE EXPENSEBASE
PRINT
CONTACTID
CONTACTNAME
PAYEEID
FULLNAME
POSITION
EXPENSEDATE
COSTCENTER
EXPENSESTATUS
TOTALAMOUNT
COMPUTE BUDGET/D15.2M = &BUDGET;
COMPUTE VARIANCE/D15.2M = BUDGET - TOTALAMOUNT;
COMPUTE REGION/A50 = SUBSTR(50, CF_REGIONNAME, 1, 50, 50, 'A50');
EXPENSETYPE
BY EXPENSEID
WHERE POSITION IN ('RSM', 'ISR', 'SC');
WHERE TOTAL REGION NE 'GGOF';
WHERE EXPENSETYPE EQ 'CONTACT';
WHERE EXPENSESTATUS EQ 'SUBMITTED';
ON TABLE HOLD AS CONTACT
END
-RUN

TABLE FILE CONTACT
PRINT *
ON TABLE HOLD AS ALLCONTACTS
MORE
FILE NONCONTACT
END
-RUN

TABLE FILE ALLCONTACTS
PRINT *
END
-EXIT
 
Report This Post
Expert
posted Hide Post
quote:
EXPENSEREGION AS 'REGION'
EXPENSETYPE


Try moving this code above the COMPUTE. I think it thinks EXPENSEREGION is a compute and it doesn't have a format. Since you are hold the data, location of fields isn't important.

See if that works.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
<GGOFAnalyst>
posted
No that didn't fix the problem. Because then the more doesn't work because the fields don't match.
 
Report This Post
Expert
posted Hide Post
Just before the last TABLE FILE, add the following to see what fields are in the two HOLD files that you will be merging with the MORE command:

?FF CONTACT
?FF NONCONTACT
-EXIT


The number of fields has to be exactly the same and the formats most likely have to match as well.

Also, do you have SET HOLDLIST=PRINTONLY at the top of your fex? If you don't, computes like COMPUTE REGION/A50 = SUBSTR(50, CF_REGIONNAME, 1, 50, 50, 'A50'); that reference a field that is in the input but not in the output will actually be put in the ouput file (eg. CF_REGIONNAME). PRINTONLY will not put CF_REGIONNAME in the output file.


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
<GGOFAnalyst>
posted
Actually I used define instead of compute and it fixed the problem. Smiler
 
Report This Post
Expert
posted Hide Post
Are you using SQL tracing to ensure that your code does not generate inefficient SQL?

Doing some kinds of data manipulation in a DEFINE may not be passed to SQL.


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
Virtuoso
posted Hide Post
Using DEFINE iso COMPUTE seems to indicate that Francis was right with his remark. This means that SET HOLDLIST=PRINTONLY also would have resulted in a correct request. And it also circumvents any possible risks involving sql that does not get passed to the dbms.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<GGOFAnalyst>
posted
Yes I've used SQL Tracing and everything seems to be fine.
 
Report This Post
Expert
posted Hide Post
Good for you Smiler


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     Error Format Mismatch

Copyright © 1996-2020 Information Builders