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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] -RUN
 Login/Join
 
Platinum Member
posted
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,

John

This 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, 2006Report This Post
Expert
posted Hide Post
Some people seem to believe -RUN works for some Dialog Manager commands - I don't think that's true.

I only use it for non-Dialog Manager WebFOCUS code.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Expert
posted Hide Post
I agree with Francis and Darin. I don't even like a -RUN at the end of a focexec. But then I'm a minimalist.


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
Expert
posted Hide Post
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, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
-RUN can be used to close files:

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.


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
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, 2005Report This Post
Expert
posted Hide Post
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, 2005Report This Post
Expert
posted Hide Post
I've never seen this behaviour because I never use -RUN with Dialog Manager. Good example Mr. Wolfgram.

My code would look like:

FILEDEF FOO DISK FOO.FTM
-RUN
-*
-WRITE FOO HELLO
-WRITE FOO THERE
-CLOSE FOO
-*
-READ FOO &VAL.A5.
-REPEAT END_REP1 WHILE &IORETURN EQ 0;
-TYPE &VAL
-READ FOO &VAL.A5.
-END_REP1
-TYPE EOF FOO


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Expert
posted Hide Post
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, 2005Report This Post
<JG>
posted
Not documented as such

-RUN also closes files opened for -WRITE operations

And -WRITE has the same effect on a file opened for a -READ
unless you use the NOCLOSE option
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders