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     Need to report on a flat .fex (text) file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Need to report on a flat .fex (text) file
 Login/Join
 
Platinum Member
posted
Hi all,

This is something I hope will be relatively straight forward...

We currently write out some program stats to a .fex file, with a comma separating each variable.

Example:

-* WRITE STATS TO LOG
FILEDEF LOG DISK /home/iadmindev/ibi/apps/log/log.fex (APPEND
-RUN
-WRITE LOG &LOG_USER, &TERRITORY, &RUNDATE, &STARTED, &ENDED, &RUNTIME

This is old code that has been running for ages and our .fex file now has many lines.

I now want to pick up this flat file using a WebFocus report and output in Excel.

My first problem is reading the file. Can I pick up a file without a .ACX definition file? I am reluctant to create a .ACX file as I am intending on writing many more lines to this file, some with 5 fields, some with up to 20 fields.

If I can resolve that first problem of picking up the file, can I get WebFocus to simply output all lines, using the comma as the separator?

I am worried that I have been asking the most obvious questions, but this is all well of the beaten path of my usual WebFocus escapades!

Thanks

Mark


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Expert
posted Hide Post
If a file is a squential file, as yours it, you never have an .acx file. But you will require a master and either a DATASET parameter in the master or an APP FI (FILEDEF) in the program.

Please do a search on the IBI website for comma-delimited data in order to find the best SUFFIX value for your master that most closely describes your data. Examples are COMMA and COMT. Read the description of each value and pick the one that most closely matches your data.

Once you have the master, you will be able to do your report.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Hi Ginny,

Thanks for your reply. I have read through quite a bit of the online documentation, and it does seem that what I am wanting to do should be very straight forward, but unfortunately I haven't been able to suceed yet!!

One problem is that I have no experience of creating Master files or File definitions etc. All our Master & ACX files are created outside of WebFocus in a complex Excel Macro and then they are uploaded to WebFocus.

Ok, this is what I have created so far

My flat file, log.fex containing some made up sample data:

USER,TERRITORY,RUNDATE,STARTTIME,ENDTIME,RUNTIME,$
Fred,UK,20070910,1000,1001,1,$
Sam,UK,20070912,1500,1501,1,$


I have then manually created the following Master file:

log.mas containing:

FILE=MARK_LOG, SUFFIX=COMMA,$


My program then consists of:

FILEDEF LOG DISK /home/iadmindev/ibi/apps/log/log.fex
-RUN
TABLE FILE LOG
PRINT *
END
-RUN


When I run the code I get the following error:

(FOC3601) ERROR AT OR NEAR LINE 2 IN PROCEDURE LOG
(FOC1822) WARNING. INVALID SYMBOL:
v
ÈÈÈ
BYPASSING TO END OF COMMAND


I have tried many variations of SUFFIX, changed the data and filedefs but without any luck!

Can someone point out where I am going wrong?

Thanks again,

Mark


WebFocus 765. iSeries v5r4
 
Posts: 175 | Location: England | Registered: April 11, 2006Report This Post
Expert
posted Hide Post
Mark,

Your master file is incomplete, all you have done is given it a name and a type!

Try this -
FILEDEF MARKLOG DISK MARK.log
FILEDEF LOGMAS DISK MARKLOG.MAS
-RUN

-WRITE MARKLOG USER,TERRITORY,RUNDATE,STARTTIME,ENDTIME,RUNTIME,$
-WRITE MARKLOG Fred,UK,20070910,1000,1001,1,$
-WRITE MARKLOG Sam,UK,20070912,1500,1501,1,$

-WRITE LOGMAS FILE=MARK_LOG, SUFFIX=COMT,$
-WRITE LOGMAS SEGMENT=SEG01,$
-WRITE LOGMAS FIELD=USER, FORMAT=A10V,$
-WRITE LOGMAS FIELD=RUNDATE, FORMAT=A10V,$
-WRITE LOGMAS FIELD=STARTTIME, FORMAT=A10V,$
-WRITE LOGMAS FIELD=ENDTIME, FORMAT=A10V,$
-WRITE LOGMAS FIELD=RUNTIME, FORMAT=A10V,$
-WRITE LOGMAS FIELD=TERM, FORMAT=A10V,$
-RUN

TABLE FILE MARKLOG
PRINT *
END

Just a suggestion, but I wouldn't suggest that you use the file extension of ".fex" for log files, I would always use ".log" to indicate what the usage is.

The only exceptance is that if it is an old system then you used to require the .fex extension to be able to INCLUDE a file in another fex.
This actually might point to the fact that this is used elsewhere (perhaps in a MODIFY process?) to be able to update a central database?

T

p.s. I am still contracting, you have my details Wink



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Master
posted Hide Post
Since this is a comma delimited file have you tried opening it in Excel without running it through WebFocus?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 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     Need to report on a flat .fex (text) file

Copyright © 1996-2020 Information Builders