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     [SOLVED] I got an error through Report painter doing a DECODE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] I got an error through Report painter doing a DECODE
 Login/Join
 
Gold member
posted
Hi,

Doing my first baby steps in Webfocus I got this error:

-IF PROFITCENT NE LAST PROFITCENT THEN ABC =
0 ERROR AT OR NEAR LINE 112 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC261) EXPRESSION IS INCOMPLETE BECAUSE AN OPERATION IS MISSING

Please see the partial following code of my report:

-IF PROFITCENT NE LAST PROFITCENT THEN &APCDESC =
DECODE PROFITCENT ( 001 'MTL' 401 'QUE' 150 'BOO' 200 'DES' 300 'ALM' 500 'HUO' 100 'BAR' 600 'MUE' ELSE 'XYZ') ELSE FOC_NONE;

Your help will be appreciated. Thanks

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


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

 
Posts: 96 | Location: Montreal, Quebec, Canada | Registered: January 20, 2010Report This Post
Virtuoso
posted Hide Post
Hi Marikaki,

You seem to be mixing FOCUS code (use of LAST keyword pertaining to record manipulation) with Dialog Manager-specific syntax which are not really mixable the way you're trying to do.

Could you describe exactly what you're attempting to do to see if any of us can shed some light?

I would suggest however that you take a deep review on product documentation to strengthen your foundations on the tool (Creating Reports with WebFOCUS Language comes to my mind).



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Master
posted Hide Post
Please post a little more code. to give every one a better understnading




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
To further explain, anything that starts with a dash is considered Dialogue Manager and you should be testing against amper variables, not real fields and njsden is correct in that LAST won't work there.

If your IF test is in a DEFINE or COMPUTE, then it must be on the right-hand side of an equal sign, i.e.
FIELDNAME/format=IF ...;  


Does this make sense?


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
Gold member
posted Hide Post
quote:
Originally posted by TexasStingray:
Please post a little more code. to give every one a better understnading


I would like my report to print a short description instead of the long one of the profit center column on each breakdown .
------------------------------------------
-DEFAULTS &APCDESC = 'ABC';
....

TABLE FILE T3Y_SLSWKBGT
-IF PROFITCENT NE LAST PROFITCENT THEN &APCDESC = DECODE PROFITCENT ( 001 'MTL' 401 'QUE' 150 'BOO' 200 'DES' 300 'ALM' 500 'HUO' 100 'BAR' 600 'MUE') ELSE FOC_NONE;
SUM
CURSALES/P12C AS 'RÉEL(R),ACTUEL'
COMPUTE CPSLSCUM/D12 = IF PRFCENTDSC EQ LAST PRFCENTDSC THEN CPSLSCUM + CURSALES ELSE CURSALES; AS '***.'

.....
-*BY PRFCENTDSC AS 'Centre,Profit'
BY &APCDESC AS 'Ctr,Pft'
BY PERIODWK AS 'Sem.'
BY NBRWDYWK AS '#Jrs'
HEADING
"&TITLE_1"
....


I can provide more, just tell me.


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

 
Posts: 96 | Location: Montreal, Quebec, Canada | Registered: January 20, 2010Report This Post
Expert
posted Hide Post
Is 'ABC' a column name in T3Y_SLSWKBGT? I'm asking this because you have a BY phrase which will evaluate to 'BY ABC AS ...".

Is PROFITCENT a column name as well?

If I could take a guess, I'd say that it needs to look like this:
DEFINE FILE T3Y_SLSWKBGT
APCDESC/A3=DECODE PROFITCENT ( 001 'MTL' 401 'QUE' 150 'BOO' 200 'DES' 300 'ALM' 500 'HUO' 100 'BAR' 600 'MUE') ELSE ' ';
END
TABLE FILE T3Y_SLSWKBGT
SUM
CURSALES/P12C AS 'RÉEL(R),ACTUEL'
COMPUTE CPSLSCUM/D12 = IF PRFCENTDSC EQ LAST PRFCENTDSC THEN CPSLSCUM + CURSALES ELSE CURSALES; AS '***.'

.....
-*BY PRFCENTDSC AS 'Centre,Profit'
BY APCDESC AS 'Ctr,Pft'
BY PERIODWK AS 'Sem.'
BY NBRWDYWK AS '#Jrs'
HEADING
"&TITLE_1"
....


How does that look to you? Does it make sense?


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
Gold member
posted Hide Post
You got it right Ginny. Thanks alot. It works. That will enthusiamed me to continue using forums. This can be considered as closed.

quote:
Originally posted by GinnyJakes:
Is 'ABC' a column name in T3Y_SLSWKBGT? I'm asking this because you have a BY phrase which will evaluate to 'BY ABC AS ...".

Is PROFITCENT a column name as well?

If I could take a guess, I'd say that it needs to look like this:
DEFINE FILE T3Y_SLSWKBGT
APCDESC/A3=DECODE PROFITCENT ( 001 'MTL' 401 'QUE' 150 'BOO' 200 'DES' 300 'ALM' 500 'HUO' 100 'BAR' 600 'MUE') ELSE ' ';
END
TABLE FILE T3Y_SLSWKBGT
SUM
CURSALES/P12C AS 'RÉEL(R),ACTUEL'
COMPUTE CPSLSCUM/D12 = IF PRFCENTDSC EQ LAST PRFCENTDSC THEN CPSLSCUM + CURSALES ELSE CURSALES; AS '***.'

.....
-*BY PRFCENTDSC AS 'Centre,Profit'
BY APCDESC AS 'Ctr,Pft'
BY PERIODWK AS 'Sem.'
BY NBRWDYWK AS '#Jrs'
HEADING
"&TITLE_1"
....


How does that look to you? Does it make sense?


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

 
Posts: 96 | Location: Montreal, Quebec, Canada | Registered: January 20, 2010Report 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     [SOLVED] I got an error through Report painter doing a DECODE

Copyright © 1996-2020 Information Builders