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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Calling a procedure for each record in TABLE FILE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calling a procedure for each record in TABLE FILE
 Login/Join
 
Member
posted
I have a reusable procedure that I want to call from a master procedure. The master procedure has a TABLE FILE command. I want to call the reusable procedure for each record in the table in the master procedure and pass values in the current record as parameters to the reusable procedure. Is that possible?

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
Expert
posted Hide Post
Yes, but I am not aware of any default functionality to do this (unless the process can be done in a define function).

You will need to hold the records, then use Dialog Manager to read the record as amper variable that can then be picked up by the sub procedure.

without knowing what your process actually its difficult to suggest much more.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Once you hold your file from the master procedure you can establish a loop to read each value or set of values into parameters, do whatever you are going to do with them and return to repeat the loop until you get through all of the held records.


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
 
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003Report This Post
Member
posted Hide Post
Thank you both for your answers. I was hoping that I would be able to do it directly inside a TABLE FILE or DEFINE FILE, via calling a function or something like that. It sounds like that's not possible.


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
Virtuoso
posted Hide Post
It can be done without resorting to a dialog manager loop. Something like this:
FILEDEF DRIVER DISK driver.fex
DEFINF FILE HOLD
  CMD/A1000 = . . . ;
END
TABLE FILE HOLD
  PRINT CMD
  ON TABLE SAVE AS DRIVER
END
-RUN
-INCLUDE driver.fex

CMD would contain the EX command, to call the fex and pass the arguments. It would be defined be a catenation of
'EX fexname '
'parmname='
character representation of value
','
. . .
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
How complex is the reusable procedure ?

What is it doing ?

Could you enhance that procedure to accept a hold file and process it, so the loop is self contained.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
JC,

What do you call a "reusable procedure"?
In what language is it written? 3G? FOCUS?
And what does the reusable procedure do?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Member
posted Hide Post
Sorry for not following up on this post after such a long time. The solution suggested by j-gross works for me. Thank you all for your inputs.


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Calling a procedure for each record in TABLE FILE

Copyright © 1996-2020 Information Builders