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     Appending data from a series of different files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Appending data from a series of different files
 Login/Join
 
<Mirza>
posted
Hello,

I am trying to have my report read information from a series of files with a loop statment. The only problem is I'm not sure how to impliment a proper loop on a report whose paramater (to read a file) is a DATE and is constantly changing? Please see below for an example of this.


-*Loop 7 times (this will be a parameter for the user to enter)

-DEFAULT &FILE_NAME=20050504
-*The filenames are (20050504, 20050505, 20050506, etc.. up to the number of times looped - in this case it would there are 7 files to be read (up to 20050511))
-*Since the filename is a date, is there a way for WebFOCUS can understand to add days in case of an end of month scenario? (i.e. 20050426 + 7 loops =20050503)?

FILEDEF DATA_FILE DISK /stage/ftpdata/&FILE_NAME
APP HOLD TEMP
FILEDEF REQHOLD DISK C:\IBI\APPS\TEMP\REQHOLD.FTM (APPEND

TABLE FILE DATA_FILE
PRINT *
ON TABLE HOLD AS REQHOLD
END
-*REPEAT LOOP

-*PRINT EVERYTHING IN THE HOLD FILE
TABLE FILE REQHOLD
PRINT *
END

Any help will be appreciated!

Thanks.
 
Report This Post
<JG>
posted
Use the AYMD function as follows

-SET DATE='20050526';
-SET &COUNTER=-1;
-REPEAT ENDREPEAT 7 TIMES
-SET &COUNTER=&COUNTER+1;
-SET &NEWDATE=AYMD(&DATE.EVAL,&COUNTER,'I8');
-TYPE NEW DATE IS &NEWDATE
-ENDREPEAT
 
Report This Post
<Mirza>
posted
Hi JG,

WOW that code worked like a charm!

Thanks!
 
Report 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     Appending data from a series of different files

Copyright © 1996-2020 Information Builders