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.
My understanding of -RUN is that it forces the execution of stacked FOCUS commands. The focexecs I'm modifying have -RUN after Dialogue Manager commands.
The other programmer here was adamant that this is to make the Dialogue Manager commands work properly.
For example:
TABLE FILE...
END
-RUN
-READ ...
-SET ...
-RUN
I would think the 2nd -RUN is useless, yet the other programmer thinks it does something. Has anyone heard of using -RUN to force any Dialog Manager command to execute properly?
Thank you,
JohnThis message has been edited. Last edited by: Kerry,
WF 7.7.03, Windows 7, HTML, Excel, PDF
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006
I'm agreeing with Francis (and apparently you too.) Any DM command that would have been encountered before the -RUN would be executed as soon as it was parsed. The official documentation says that the -RUN forces immediate execution of all FOCUS commands placed on the FOCSTACK. DM Commands are never placed on the FOCSTACK, so a -RUN would never have any effect on the order or timing of their execution.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I agree with Francis, Darin, and Ginny. However, I do (sometimes) and have seen others use the -RUN at any "Logical break point", for readability more then functionality. The second -RUN in the initial post is useless.
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I agree with Francis, Darin, and Ginny. I disagree with Ginny about the minimalist approach. I stick a -RUN after every set of JOINs, FILEDEFs and after every END statement. I accompany the -RUN with a check of &FOCERRNUM and a GOTO if there is an error. Why run through hundreds of lines of code if there is an error at the very top?
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
CMS FI FOO DISK FOO DATA A
-RUN
-WRITE FOO HELLO
-WRITE FOO THERE
-RUN
-READ FOO &VAL.5
-TYPE &VAL
-RUN
-READ FOO &VAL.5
-TYPE &VAL
-RUN
-TYPE THAT WAS WITH RUNS... NOW WITHOUT
-*
-READ FOO &VAL.5
-TYPE &VAL
-READ FOO &VAL.5
-TYPE &VAL
-RUN
Change the filedef to whatever is local to your machine and try the above code: -RUN causes FOO to close, and thus read and write from the start of the file.
I'd give extra points to Francis for the implementation of error checking... I use, as I'm sure many others use as well, "-INCLUDE ErrorCheck" routines that start with a -RUN and go on to error handling...
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
A follow-up question: Does the -RUN actually CLOSE the file? Or, does it reset the pointer back to the top-of-file? I understand that the end result is the relatively same as illustrated by Edward Wolfgram's code.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Doug, -RUN actually closes all open files, unless they have been opened in DM with the NOCLOSE option specified. These latter files will stay open and positioned.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Thanks Gamp, This shows that -RUN does more then just executing the items in the stack. I don't recall seeing the -RUN / CLOSE in any documentation - that's not saying that it's not in there someplace.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005