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  iWay Software Product Forum on Focal Point    [CLOSED] How to pick files using synonym

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to pick files using synonym
 Login/Join
 
Silver Member
posted
Hi

I need get the data from file. Because my source information coming from file. My File naming conventions is "KFC_REPORT_161019862000.txt". Whenever i am getting the new file, file name will be changed. How can i proceed with file mask like "KFC_REPORT_**********.txt"

Can you help us to proceed further ?

Thanks
kalai

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 35 | Registered: February 17, 2017Report This Post
Virtuoso
posted Hide Post
Kalai

There is no wildcard for a file name, it will not find the file for processing without the exact name


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
You can use wildcards when mapping a MAS to flat files. Just remember that you will read all the files that match the pattern, so you will need to move the file when you have finished reading it. The GUI will walk you through how to do it, but below is the relevant components of the MAS and ACX

MAS
FILENAME=ALLORDERS, SUFFIX=DFIX    ,
 CODEPAGE=1252, $
 VARIABLE NAME=&&FL_DIRECTORY,  PROMPT='Application directory name to poll for files', DEFAULT='C:\iDM\8201m\ibi\apps\infiles', $
 VARIABLE NAME=&&FL_NAME,  PROMPT='File name pattern', USAGE=A80, DEFAULT='orders_*', $
 VARIABLE NAME=&&FL_EXTENSION,  PROMPT='Data File Extension', USAGE=A80, DEFAULT='ftm', $
 VARIABLE NAME=&&FL_CONNECTION,  PROMPT='Connection to local or remote data files location', DEFAULT='<local>', $  


ACX
SEGNAME=ALLORDERS, 
  DELIMITER=TAB, 
  HEADER=NO, 
  CDN=COMMAS_DOT, 
  CONNECTION=&&FL_CONNECTION, 
  DATA_ORIGIN=FILE, 
  DIRECTORY=&&FL_DIRECTORY, 
  NAME=&&FL_NAME, 
  EXTENSION=&&FL_EXTENSION, $  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Platinum Member
posted Hide Post
Something like the following should do what you want. You can place the following three files in an application folder, set the &AppFolder variable, and run the fex.

&AppFolder = Application folder where your files are located.

This will report on the kfc_report_*.txt with the highest serial number. You can change HIGHEST to LOWEST to flip that behavior.

kfc_report_161019862000.txt
———————————————————————————
Midwest    11400665
Northeast  11392300
Southeast  11710379
West       11652946

kfc_report.mas
——————————————
FILENAME=KFC_REPORT, SUFFIX=FIX     , IOTYPE=STREAM, $
  SEGMENT=KFC_REPO, SEGTYPE=S1, $
    FIELDNAME=REGION, ALIAS=E01, USAGE=A11, ACTUAL=A11, $
    FIELDNAME=DOLLARS, ALIAS=E02, USAGE=I08, ACTUAL=A08, $

kfc_report.fex
——————————————
-DEFAULTH &AppFolder = 'baseapp/1metadata',&FILENAME = ' ';
 SET PAGE-NUM=OFF,HOLDLIST=PRINTONLY
 APP QUERY &AppFolder HOLD
 TABLE FILE FOCAPPQ
 PRINT FILENAME 
 BY HIGHEST FILENAME NOPRINT
 WHERE LOWER(FILENAME) LIKE 'kfc_report%.txt'
 ON TABLE HOLD AS kfcfile
 END
-RUN
-READFILE kfcfile
 
 FILEDEF kfc_report DISK &AppFolder../&FILENAME
 TABLE FILE kfc_report
 "&AppFolder../&FILENAME"
 PRINT REGION DOLLARS
 END 


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] How to pick files using synonym

Copyright © 1996-2020 Information Builders