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.
I followed the steps from susannah Posted May 14, 2006 11:30 PM on HOW TO READ A FLAT FILE 101. Since this was the first use of a flat file, I used the exact example. The CHECK FILE is successful. However, the end results are 0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0 Any ideas on what to check next?
Master file: FILE=STATELST, SUFFIX=FIX SEGNAME=BASE, SEGTYPE=S1, $ FIELD=STABBR, ALIAS=E01, USAGE=A3, ACTUAL=A3, $ FIELD=FILL,,A1,A1,$ FIELD=STNAM, ALIAS=STNAM , USAGE=A16, ACTUAL=A16, $ DEFINE StateName/A16=LCWORD(16,STNAM,'A16');$ $$$ comment lines in a master file have $$$ to start them off
Flat file: AK 'ALASKA' AL 'ALABAMA' AR 'ARKANSAS' AS 'AUSTRALIA' AZ 'ARIZONA' CA 'CALIFORNIA' CN 'CANADA' CO 'COLORADO' CT 'CONNECTICUT' DC 'DIST COLUMBIA' DE 'DELAWARE' FL 'FLORIDA'
fex: FILEDEF MYSTATES DISK C:\IBI\APPS\STATELST.TXT
TABLE FILE MYSTATES PRINT * END
Thank you, GeriThis message has been edited. Last edited by: Kerry,
GamP, This is the actual location of the file at the moment. In the future, I will need it on the server. I began with a simple location for the beginning. Thank you, Geri
Posts: 102 | Location: Cincinnati, Oh USA area | Registered: November 02, 2006
Jim, Thank you for the info. This produces data on the screen. I do not see where the mas file and the txt file were written to although this shows the file can work. Geri
Posts: 102 | Location: Cincinnati, Oh USA area | Registered: November 02, 2006
In this example, the txt file named "your_statelst_data.txt" and the mas file named "statelst.mas" are written to a temporary directory that is created and used while your focexec is running. When the focexec is done, this temp directory is gone. Therefore, your STATELST file is only available while this fex is running.
If you need to access an existing flat file, then we need to figure out 1) where to put the flat file(and maybe the mas file) and 2) how to code the FILEDEF command to associate the master to the actual location/name of the flat file.
My webfocus server is a windows box so my experience is with that. Someone from the unix world may need to help in your case.
Jim
WebFocus 8.201M, Windows, App Studio
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008
Jim, That makes sense. Based on this information, it seems my problem is accessing the flat file. Ideally, the flat file will be place on the server. Thank you, Geri
Posts: 102 | Location: Cincinnati, Oh USA area | Registered: November 02, 2006
Geri, have you verified that the flat file is indeed on the server?
Also, if you use Developer Studio, there is a GUI "Upload Data File" tool you access by right-clicking the "Master Files" virtual folder of the Application folder where you wish to locate your file. You define the fields in the tool, it uploads the file and generates the master.
In my experience it works quite well and is very handy when you have no other way to access the server (FTP or mapped drive). It gets flaky when there is a huge amount of data.
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
Ideally, the flat file will be place on the server.
Which is running unix, correct? The DevStudio you're now using, does it communicate with the local server on your own PC or does it communicate with the unix server? If the first, then your setup should have worked. If the second then it is correct that it does not work, because it can't find your local file on the server. If that's the case, follow Francis' advise.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Hello, Our Dev Studio communicates with the server. I am able to create the master file. I can confirm the txt file is on the server. I can ftp the data file (.txt) to the server. I can create the fex. I created a folder named flat_files to store this data. However, when I run the fex, it does not seem to find the flat file. That seems to be my problem at this time. Thank you, Geri
Posts: 102 | Location: Cincinnati, Oh USA area | Registered: November 02, 2006