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.
Ok, so here's a simplified example of something I want to do:
MAINTAIN FILE ENCOUNTER
CASE TOP
stack clear StkEncounterSource;
reposition encounter;
for 10 next encounter.ENCOUNTER.ENCOUNTER_ID INTO StkEncounterSource;
type StkEncounterSource.foccount;
type StkEncounterSource(10).Encounter_ID;
ENDCASE
END
-HTMLFORM BEGIN
<html>
<body>
Hello World
</body>
</html>
-HTMLFORM END
I have a pretty deluxe focexec and I just got a requirement to have it make data changes mid-process. The code above functions as it appears it should -- the Maintain call works correctly and the mini-html page displays well.
Here's the question -- I want the Maintain code to give an OK signal to the FOCUS code that follows. I want the Maintain to be able to indicate error to the following focexec code so that it can branch appropriately. Is there an easy way to do that? Is there a way I can have the two chunks of code share a variable that I can use as a semaphore?
J.This message has been edited. Last edited by: Kerry,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
The TYPE ON DDNAME with a -READ is how I have done this in the past.
You could also EXEC the procedure from the Maintain and pass in variables, but this would mean that control is passed back to Maintain when it is done. You could just exit the Maintain from there though.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
Yeah, but that DDNAME is required to be static, right? Two people running this simultaneously could step on each other?
So I need to dynamically generate a name and then blow the thing away afterwards. Not exactly slick, but it will do the job.
quote:
Another approach, though Waz has given the main ones, is to use &INPUT, &CHNGD and &DELTD.
That's the kind of thing I was looking for. I was hoping I could just use sys_mgr.focset on an obscure setting and then query the value in the FOCUS code, but you can't query the value in the FOCUS code. There's no way to look at it in an automated way.
Oh well. Brute force. Use a file on the OS to pass one word two lines down in the same file. God bless Focus.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
If you just use a value, like "1" for complete, "2" for incomplete, make sure you modify the LRECL to the maximum value of the value you use...
FILEDEF MAINT_OUT DISK FOCCACHE/X_OUT.FTM (LRECL 1 RECFM F
-RUN
TYPE ON MAINT_OUT "1";
TYPE ON MAINT_OUT "2";
-RUN
-READ MAINT_OUT &MAINT_RC.A1.
-TYPE &MAINT_RC