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] WebFocus master for non csv flat file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] WebFocus master for non csv flat file
 Login/Join
 
Gold member
posted
Hi,

I am new to webfocus. Any help would be appreciated.
I have a non csv flat file that contains header, data body and footer that needs to displayed as it is.
The data contained in it has no commas except for data in numeric fields.
The data has no double quotes either.

The report has to be displayed as it appears in the flat file.
I have the same flat file on my hard drive as well as a gdg on the mainframe.
How do i create a master file description for this file?


Flat File looke like this:


Monthly Report by State
TUESDAY 07/28/09 15:09:38

Empid Product Revenue
1234 ABC 1,000
4567 DEF 2,000

TOTAL usage==========> 123,456

Daily usage==========> 987,654



Thanks.

This message has been edited. Last edited by: Kerry,
 
Posts: 84 | Registered: July 28, 2009Report This Post
Guru
posted Hide Post
First, let us know what platform and release you are using.
Second, do you have access to the Describing Data manual?
I would suspect that you are trying to read a LRECL133 FBA file and are trying to 'pretty up' a file dump, right?


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Virtuoso
posted Hide Post
If you're just trying to display the contents of a flat file, the easiest way would just be to create fixed-format master file with a single field

FILE=FILE1 ,SUFFIX=FIX
DATASET=location of data file
SEGNAME=SEG1
FIELDNAME=FIELD1,E01,A255,A255,$


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
Hi Jim,
WebFocus 7.1, Developer studio on windows.Currently i am working on a standalone,so webfocus server is on the localhost.The flat file is on my windows hard drive.(I will be working with a gdg file on the mainframe soon on which the webfocus server would be running)

Yes, I found the technical documentation online but it does not say anything about non csv files.

Lets just say that the file contains a small report that needs to be displayed on the web including the header,footer and the data, more or less in the same way as it appears in the flat file.I have tried to describe it as one field in the master file but that throws off the alignment of the data and am unable to separate the header,footer and the data.

Thanks Jim.



quote:
Originally posted by jimster06:
First, let us know what platform and release you are using.
Second, do you have access to the Describing Data manual?
I would suspect that you are trying to read a LRECL133 FBA file and are trying to 'pretty up' a file dump, right?


WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
 
Posts: 84 | Registered: July 28, 2009Report This Post
Gold member
posted Hide Post
Hi Dan,
Yes, I am simply trying to display the contents.

create fixed-format master file with a single field -
That is exactly what i have been trying.
The actual report between the header and the footer is losing its alignment when i do that.

Thanks for responding.


quote:
Originally posted by Darin Lee:
If you're just trying to display the contents of a flat file, the easiest way would just be to create fixed-format master file with a single field

FILE=FILE1 ,SUFFIX=FIX
DATASET=location of data file
SEGNAME=SEG1
FIELDNAME=FIELD1,E01,A255,A255,$


WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
 
Posts: 84 | Registered: July 28, 2009Report This Post
Virtuoso
posted Hide Post
It's just a flat file - there is nothing in WF that is going to tell WF what is the header and what is not - regardless of how you create a master file to read it. In your TABLE request, you'll probably have to define some fields that check the content of the line so see if it is a heading, footing, etc. Also, if you use a fixed-format font, the alignment doesn't get messed up. If you're wanting to have separate columns for the data columns and create your own alignments, etc. your flat file will have to be in a fixed-position layout and then you can create separate fields because you know in which position each field begins. If it's not fixed-position, you're probably out of luck - go back and play with the single-field, fixed font option.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
Hi Darin,
Thanks for the info.

I know how to configure the data server to access the DB2 tables on the mainframe.webfocus server is running on the mainframe.
So, If I were to create a master file description for a gdg or a fixed format or csv dataset on the mainframe, how would i specify and access that file using developer studio which runs on windows? I am using version 7.1

Thanks.



quote:
Originally posted by Darin Lee:
It's just a flat file - there is nothing in WF that is going to tell WF what is the header and what is not - regardless of how you create a master file to read it. In your TABLE request, you'll probably have to define some fields that check the content of the line so see if it is a heading, footing, etc. Also, if you use a fixed-format font, the alignment doesn't get messed up. If you're wanting to have separate columns for the data columns and create your own alignments, etc. your flat file will have to be in a fixed-position layout and then you can create separate fields because you know in which position each field begins. If it's not fixed-position, you're probably out of luck - go back and play with the single-field, fixed font option.


WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
 
Posts: 84 | Registered: July 28, 2009Report This Post
Expert
posted Hide Post
That isn't what Darin is suggesting. He is suggesting that you decompose the flat file you already have. You will have to isolate the detail records and create DEFINE fields, using SUBSTR and a variety of other functions to extract the 3 detail columns. You could probably recalculate the footings. But regardless, if you know which records are the heading and footing, you could put the contents into other defined fields and put those in your WebFOCUS report heading and footing. This is fairly sophisticated stuff for someone new to WF. Unfortunately, I don't have time to mock up an example for you. But a pseudo-code version of the define to extract the empid might look like this:

EMPID/A4=IF {row is a detail} THEN EDIT(LINE133,'9999') ELSE ' ';  


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
Gold member
posted Hide Post
Hi Ginny,
In your example, is LINE(in LINE133) a key word?

Thanks.

quote:
Originally posted by GinnyJakes:
That isn't what Darin is suggesting. He is suggesting that you decompose the flat file you already have. You will have to isolate the detail records and create DEFINE fields, using SUBSTR and a variety of other functions to extract the 3 detail columns. You could probably recalculate the footings. But regardless, if you know which records are the heading and footing, you could put the contents into other defined fields and put those in your WebFOCUS report heading and footing. This is fairly sophisticated stuff for someone new to WF. Unfortunately, I don't have time to mock up an example for you. But a pseudo-code version of the define to extract the empid might look like this:

EMPID/A4=IF {row is a detail} THEN EDIT(LINE133,'9999') ELSE ' ';  
 
Posts: 84 | Registered: July 28, 2009Report This Post
Expert
posted Hide Post
This may give you a helping hand.

EX -LINES 4 EDAPUT MASTER,tmp_rpt,CV,FILE
FILENAME=tmp_rpt, SUFFIX=FIX,$
SEGNAME=TMP_RPT, $
  FIELD=LINE255 ,ALIAS=  ,A255 ,A255 ,$

FILEDEF TMP_RPT DISK tmp_rpt.ftm

-RUN

-WRITE TMP_RPT Monthly Report by State
-WRITE TMP_RPT TUESDAY 07/28/09 15:09:38
-WRITE TMP_RPT
-WRITE TMP_RPT Empid Product Revenue
-WRITE TMP_RPT 1234  ABC     1,000
-WRITE TMP_RPT 4567  DEF     2,000
-WRITE TMP_RPT
-WRITE TMP_RPT TOTAL usage==========> 123,456
-WRITE TMP_RPT
-WRITE TMP_RPT Daily usage==========> 987,654
-WRITE TMP_RPT

TABLE FILE TMP_RPT
PRINT LINE255 AS ''
ON TABLE SET SHOWBLANKS ON
ON TABLE SET STYLE *
 FONT=COURIER NEW, $
ENDSTYLE
END


You can then chop the output up as per the suggestions above.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
quote:
the header and the footer is losing its alignment
I guess your output is HTML? If that is the case then what you are seeing is the browser reducing "white space" by reducing multiple spaces to a single one. What you need to do is to force a proportional font to be used (instead of the standard) and also get WF to use the HTML non blank space symbol -  .

Darin's suggestion above achieves both of these via the FONT in stylesheet and the SHOWBLANKS.

T



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
Expert
posted Hide Post
No, LINE133 is the name I made up for what I would call my field in the generic master I was using to read the file.

BTW, could you put your release number in your profile signature? Things change between maintenance releases and we don't want to tell you things you can't do with the release you are on.


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
Gold member
posted Hide Post
Hi

Using the command console,this works-
ON TABLE SET SHOWBLANKS ON
ON TABLE SET STYLE *
FONT=COURIER NEW, $

How do I set these in developer studio SET and DEFINE tools ? In the SET tool, i don't see those options. I am using WF 7.1.1

Thanks.



quote:
Originally posted by Waz:
This may give you a helping hand.

EX -LINES 4 EDAPUT MASTER,tmp_rpt,CV,FILE
FILENAME=tmp_rpt, SUFFIX=FIX,$
SEGNAME=TMP_RPT, $
  FIELD=LINE255 ,ALIAS=  ,A255 ,A255 ,$

FILEDEF TMP_RPT DISK tmp_rpt.ftm

-RUN

-WRITE TMP_RPT Monthly Report by State
-WRITE TMP_RPT TUESDAY 07/28/09 15:09:38
-WRITE TMP_RPT
-WRITE TMP_RPT Empid Product Revenue
-WRITE TMP_RPT 1234  ABC     1,000
-WRITE TMP_RPT 4567  DEF     2,000
-WRITE TMP_RPT
-WRITE TMP_RPT TOTAL usage==========> 123,456
-WRITE TMP_RPT
-WRITE TMP_RPT Daily usage==========> 987,654
-WRITE TMP_RPT

TABLE FILE TMP_RPT
PRINT LINE255 AS ''
ON TABLE SET SHOWBLANKS ON
ON TABLE SET STYLE *
 FONT=COURIER NEW, $
ENDSTYLE
END


You can then chop the output up as per the suggestions above.


WF 7.1.1, WF Developer studio 7.1.1, Windows & Mainframe, HTML
 
Posts: 84 | Registered: July 28, 2009Report This Post
Expert
posted Hide Post
SHOWBLANKS is a 7.6 option.

The font can be set in the stylesheet of the report, this should be obvious.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] WebFocus master for non csv flat file

Copyright © 1996-2020 Information Builders