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.
First off, I would not include WHERE inside of the variable so that the code is GUI compatible. i.e.:
TABLE FILE CAR
...
WHERE &FCNTRY
Second off, the error has to do with spacing or something similar with your extended dialogue manager command.
Try putting the set command on one line and get it working. Then you can extend it to multiple lines for better reading and you can see exactly what is causing the error.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
Yes, and smart dynamic code that is mostly GUI compatible is even better. So many new features to discover and so many smoother upgrades.
Little tricks like
WHERE &WHERE;
INSTEAD of just
&WHERE;
make all the difference.
While we're at it:
TABLE FILE CAR
PRINT
-IF &USE_CAR EQ 'NO' THEN GOTO SKIP_CAR;
CAR
-SKIP_CAR
...
Why not use:
-SET &CAR_TITLE = IF &PRINT_CAR EQ 'NO' THEN 'FOC_NONE' ELSE 'Car';
...
TABLE FILE CAR
PRINT
CAR AS '&CAR_TITLE'
...
I would like to add 2 things: 1. When continuing a DM phrase on a following line, leave at least 1 space between the hyphen and the continuation. 2. The .EVAL suffix is only necessary in DM phrase when you want WF to "evaluate" the &variable before executing the phrase. For example:
Yea... But if you hand code until the final report you are missing out on things like this:
-*TBL_MORE_DEFINES_START
-* The code in this section bracketed by -*TBL_MORE_DEFINES_START and -*TBL_MORE_DEFINES_END is auto generated and
-* managed by the Universal Concatenation tool in DevStudio's Report Painter. The code is generated from the comment
-* in the report starting with -*FFW.MORE and is required for the MORE statements in the report.
DEFINE FILE CAR ADD
CAR_DEFINE/A16=CAR.COMP.CAR;
END
-*TBL_MORE_DEFINES_END
TABLE FILE CAR
-*FFW.MORE - Managed by DevStudio's Report Painter for MORE statements. Do not edit!
-*FFW.MORE <CAR=DEFINE FILE CAR ADDCAR_DEFINE/A16=CAR.COMP.CAR;END>
PRINT
CAR.ORIGIN.COUNTRY
CAR_DEFINE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
MORE
FILE CAR
END
TABLE FILE HOLD
PRINT
HOLD.HOLD.COUNTRY
HOLD.HOLD.CAR_DEFINE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
I don't know if I would want to memorize generated comments like that.
BTW there are benefits to editing in both. The text editor can be much faster when you know the syntax and for things like copying or commenting. It just depends. But don't block out the GUI or you will be missing on a lot of cool things you can do
TABLE FILE CAR
PRINT
&RP_FL04P01_Detail4.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL05P02_Detail5.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL06P03_Detail6.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL07P04_Detail7.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL08P05_Detail8.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
BY &RP_FN01B_Sort1.(BY(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>)).Please select sort field(s).
ON TABLE SET ONFIELD IGNORE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
TOM, the where &where isn't documented as far as I can tell, but I do know that doing it that way allows me to edit via the GUI. I don't have to worry about the next guy or my coworkers as much this way.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
We have some pretty nasty elaborate reports that require A LOT of coding. ( in DM )
But come to think of it... ...that probably could all be done in the GUI. We just don't do that since we feel it's faster to just type it ( and copy / paste ). 100+ lines of 'processing' DM stuff happens...
What I'm trying to say / preach is: Seperate the logic from the display/output part.
( Thus retracting my statement that the logic part should be hand coded, it can be done in the GUI also )
and J,
I don't get your 'missing out' part?
TABLE FILE CAR
BY COUNTRY
BY CAR
ON TABLE HOLD AS X
END
TABLE FILE X
PRINT COUNTRY CAR
ON TABLE PCHOLD FORMAT HTML
MORE
FILE X
END
Hand coded, works fine ?
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
When dealing with ignores, I use _FOC_NULL, but for this other stuff, FOC_NONE seems to work pretty well. I am curious what some of the FOC_NONE issues you guys have had. According to what I have seen, you just have to be careful how you handle FOC_NONE (as in the link).
Tom, I am sorry to divert from your topic.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
The trick is that FOC_NONE has the effect of ignore the complete line of code. And you have to keep that in mind.
See sample 1:
-SET &IGNORE = 'FOC_NONE';
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
WHERE ( COUNTRY EQ '&IGNORE' ) AND ( CAR EQ 'TOYOTA' OR 'BMW' )
END
Because the parameter IGNORE is 'FOC_NONE' the entire line of code is ignored, including : ( CAR EQ 'TOYOTA' OR 'BMW' ) Output just shows the entire contents of the CAR database.
Now change FOC_NONE to _FOC_NULL. This will only effect the COUNTRY-where not the CAR-where. Output will should only TOYOTA and BMW.
And this even works if you change the code to
WHERE ( COUNTRY EQ '&IGNORE' ); WHERE ( CAR EQ 'TOYOTA' OR 'BMW' )
I find this very tricky... ...better to avoid it.
Greets, Dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
That is exactly what I want in some cases, to wipe the entire line. However, in when doing an ignore like that, I would use _FOC_NULL.
If I wanted to get rid of a dynamic where statement, I would want to wipe out that line with FOC_NONE (WHERE &where). Caution is needed here, not fear. But each to his own...
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012
TABLE FILE CAR
PRINT
&RP_FL04P01_Detail4.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL05P02_Detail5.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL06P03_Detail6.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL07P04_Detail7.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
&RP_FL08P05_Detail8.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,_FOC_NULL>).Please select detail field(s).
BY &RP_FN01B_Sort1.(BY(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>)).Please select sort field(s).
ON TABLE SET ONFIELD IGNORE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
Then I realized it was for a v7.+ version. We are on 7.6.11. However, now that I had come that far, I persisted and came up with code that will work in 7.6.11
TABLE FILE CAR
PRINT
&RP_FL04P01_Detail4.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,CAR.BODY.RETAIL_COST NOPRINT>).Please select detail field(s).
&RP_FL04P01_Detail5.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,CAR.BODY.RETAIL_COST NOPRINT>).Please select detail field(s).
&RP_FL04P01_Detail6.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,CAR.BODY.RETAIL_COST NOPRINT>).Please select detail field(s).
&RP_FL04P01_Detail7.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,CAR.BODY.RETAIL_COST NOPRINT>).Please select detail field(s).
&RP_FL04P01_Detail8.(<BODYTYPE,CAR.BODY.BODYTYPE>,<SEATS,CAR.BODY.SEATS>,<DEALER_COST,CAR.BODY.DEALER_COST>,<RETAIL_COST,CAR.BODY.RETAIL_COST>,<SALES,CAR.BODY.SALES>,<None,CAR.BODY.RETAIL_COST NOPRINT>).Please select detail field(s).
BY &RP_FN01B_Sort1.(<COUNTRY,CAR.ORIGIN.COUNTRY>,<CAR,CAR.COMP.CAR>,<MODEL,CAR.CARREC.MODEL>).Please select sort field(s).
-*AFTER 7.0 ON TABLE SET ONFIELD IGNORE
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END
All it does is print CAR NOPRINT. Same as 'None'! If you are creating a hold file just be sure to use the ON TABLE SET HOLDLIST PRINTONLY
Lol... I didn't post that code so you could copy and paste, but rather you could see how it is generated and what it does.
That code allows you to let the user select which columns they want from an html page and the order they want (if you choose the multiple columns per variable option). This is much faster via the GUI even if you were copying and pasting. I understand that the GUI isn't the "ultimate solution". It is not even a good practice to code only via the GUI... but it isn't a good practice to hand code exclusively either. I spend more time hand-coding than naught but that is probably because I do what I can via the GUI quickly and hand code other things that the GUI doesn't handle as well (copying and pasting, dialogue manager, etc.). If code isn't GUI compatible (or at least close) then I eliminate that possible all together and I have to hand code. I don't have a choice.
WebFOCUS 7.7.03/8.0.08 Dev Studio 7.7.03/8.0.08 App Studio 8.0.08 Windows 7 ALL Outputs
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012