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     [CLOSED] Append hold file dynamically

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Append hold file dynamically
 Login/Join
 
Member
posted
I have a sceneario where hold files are created dynamically based on the user input and i need to APPNED them(i think using MORE).
For eg-if user select 5 countries in the drop down in the input screen,5 hold file are created ,and they have be Appeneded,if 3 countries then 3 hold files created and append.
How to MORE the hold files when the hold file names are created dynamically,and there could be maximum 5 of these hold files.
What type of loop i need to use before the more to retrive the hold file name created and append them.

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.69
Windows
Excel, HTML, PDF,AHTML
 
Posts: 14 | Registered: November 16, 2009Report This Post
Master
posted Hide Post
Here's some pseudo code to illustrate what I do:
-SET &NUMPASSES=5;
-SET &HOLD=HOLD
 SET HOLDFORMAT=ALPHA
-REPEAT ENDLOOP &NUMPASSES TIMES
 TABLE FILE XXXX
 PRINT FLDA FLDB FLDC
 WHERE XXXX
    ON TABLE &HOLD AS DATAOUT
 END
 FILEDEF DATAOUT DISK dataout.ftm ( LRECL XX RECFM V APPEND
-RUN
-SET &HOLD=SAVE;
-ENDLOOP


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Virtuoso
posted Hide Post
Here is a slightly different approach using MORE.

-* This first section determines how many hold files exist.
-* Be careful to use the correct case for HOLD file names at your installation.
-* Here I must use lower case files names for the STATE command because I am on UNIX.

-SET &COUNTER = 1 ;
-REPEAT :ENDREPEAT1 5 TIMES
-SET &HOLDFTM = 'hold' || '&COUNTER' || '...ftm';
STATE &HOLDFTM.EVAL
-RUN
-IF &RETCODE NE 0 GOTO :EXITREPEAT1 ;
-SET &COUNTER = &COUNTER + 1 ;
-:ENDREPEAT1
-:EXITREPEAT1
-SET &NUMREPEATS = &COUNTER - 2 ;

-* Concatenate the hold files.

 TABLE FILE HOLD1
  PRINT *
  ON TABLE HOLD AS FINALHLD
-SET &COUNTER = 2 ;
-REPEAT :ENDREPEAT2 &NUMREPEATS TIMES
-SET &HOLDNAME = 'HOLD' || '&COUNTER';
  MORE
  FILE &HOLDNAME.EVAL
-SET &COUNTER = &COUNTER + 1 ;
-:ENDREPEAT2
 END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report 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     [CLOSED] Append hold file dynamically

Copyright © 1996-2020 Information Builders