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.
One of my top people brought me a question that I can't quite find an answer to. She has very complicated calculations that she needs to make prior to running a report, and I recommended using a small chunk of Maintain inside her Focexec to do the dirty work. We can calculate the values in Maintain with ease, but how do we get them into the TABLE FILE calls that follow?
Before telling her to write to a temporary table I thought I'd ask if anyone has a way to take variables in Maintain and turn them into amper variables for use farther down the routine. Needless to say, both of us are all ears.
J.This message has been edited. Last edited by: John_Edwards,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
You could pass the calculation results as variables to an EXEC'd focexec which could then -WRITE them to a file, which could then be retrieved as &Vars with a -READ
John You will have to set up some kind of table, whether flat (using -READ / -WRITE) or focus / relational (using INCLUDE / PRINT). If flat, you can place the Filedef in the EDASPROF.
The problem is, when you EXEC a procedure, you are starting a different agent so you can't set & or && variables and expect them to be available when you return. Also, while you can EXEC a TABLE from the Maintain procedure, the output is not displayed.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
I have all of this in a single Focexec folks -- One after the other. All that is missing is digging the value out of the Maintain variable and getting it to the FOCUS that follows. I was hoping not to write to a table and then read (or join), but that appears to be the option available.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
APP FI MYVAL DISK BASEAPP/MYVAL.TXT
-RUN
MAINTAIN FILE CAR
FOR ALL NEXT CAR.COUNTRY INTO CARSTACK;
TYPE "<CARSTACK.FOCCOUNT <CARSTACK(1).COUNTRY";
TYPE ON MYVAL "<<CARSTACK(1).COUNTRY";
END
-RUN
-READ MYVAL &CNTRY.A10
-TYPE &CNTRY
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
An neater alternative (IMHO) is to have the Maintain emit a temp fex containing -SET statements, and then invoke it with -INCUDE -- for example:
FILEDEF FEXFILE DISK ./FEXFILE.FEX
MAINTAIN FILE CAR
-* the calculations:
COUNTRY="USA";
CAR="HUMMER";
-* populate the fex:
TYPE ON FEXFILE "-SET &|COUNTRY='" <COUNTRY "';";
TYPE ON FEXFILE "-SET &|CAR ='" <CAR"';";
END
-RUN
-INCLUDE ./FEXFILE.FEX
-? &C
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005