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.


Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Report Output
 Login/Join
 
Gold member
posted
Hi all,

Is there a way the output of the report to looks like this:

 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
*                                *                                                                * 
*                                *                      M  E  N  S  I  L  E                       * 
*                                *                                                                * 
* STABILIMENTO                   *================================================================*=
*                                *  BUDGET 2007 I CONSUNT. 2007 I CONSUNT. 2006 I    Delta (%)    * 
*                                *       1      I      2        I      3        I  2 su 1  2 su 3 * 
*================================*==============I===============I===============I=================*=
*                                *              I               I               I                 * 
* 00171  FINISSAGGIO LANA        *              I       111,111 I       111,111 I          -11.11 * 
*                    scamp/tagli *              I         1,111 I         1,111 I                 * 
*                                *              I               I               I                 * 
* 00176  TESSITURA LANA          *              I               I               I                 * 
* 00997  FORN.VARI LAVOR. INTERN *              I           111 I         1,111 I          -11.11 * 
*                    scamp/tagli *              I             1 I            11 I                 * 
*                                *              I               I               I                 * 
  


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
You'd have to play with headings, add a field with values containing '*'. Is this format a requirement or what the report looked like coming from another reporting type? Curious, reminds me a little of my MARK IV days.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Gold member
posted Hide Post
Yes that is the required format Frowner ......


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
And I suppose it needs to be printed on chaining paper in white and green with little holes on the left and right....

back to the late 70....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
Smiler yep

The heading I think is not a problem but i don't know how to represent the columns???


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
It is not really simple to align perfectly. The secret will be the PRE tag for horizontal alignment, but you really don't want a table because of vertical spacing.

It reminds me too much of Cobol days too many years ago. I would suggest, perhaps an approach like this, which needs much work but this gives the basics:
-SET &LINE01='* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ';
-SET &LINE02='*                                *                                                                * ';
-SET &LINE03='*                                *                      M  E  N  S  I  L  E                       * ';
-SET &LINE04='*                                *                                                                * ';
-SET &LINE05='* STABILIMENTO                   *================================================================*=';
-SET &LINE06='*                                *  BUDGET 2007 I CONSUNT. 2007 I CONSUNT. 2006 I    Delta (%)    * ';
-SET &LINE07='*                                *       1      I      2        I      3        I  2 su 1  2 su 3 * ';
-SET &LINE08='*================================*==============I===============I===============I=================*=';
-SET &LINE09='*                                *              I               I               I                 * ';
DEFINE FILE CAR
LINE10/A120='*'|COUNTRY|'                      *       '|EDIT(SALES)|' I';
END
TABLE FILE CAR
PRINT LINE10
ON TABLE SAVE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE>htmlpage
</TITLE>
</HEAD>
<BODY>
<DIV>
!IBI.AMP.LINE01;
!IBI.AMP.LINE02;
!IBI.AMP.LINE03;
!IBI.AMP.LINE04;
!IBI.AMP.LINE05;
!IBI.AMP.LINE06;
!IBI.AMP.LINE07;
!IBI.AMP.LINE08;
!IBI.AMP.LINE09;
-REPEAT :LOOP &LINES TIMES
-READ SAVE &LINE10.A120
!IBI.AMP.LINE10;
-:LOOP
</DIV>
</BODY>
</HTML>
-HTMLFORM END



Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Gold member
posted Hide Post
Thanks Alan,

How should be changed that Code if the output is a text file?


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
Change the -SETs to be DEFINEs and put the DEFINE fields into the HEADING, ignore everything after the TABLE.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
... or, persuade your end users to drag themselves out of the days of the clackity line printers of old (pre foam padded cabinets so very noisy Frowner) and tell them that they do not have to suffer reports like this anymore and that you can supply it in a format that will be so much easier to read!

There must be something wrong for users to want a report like this (unless it it for something like OCR?).

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
Virtuoso
posted Hide Post
Now I've seen some strange requirements but this one is high on the list. Like asking if we can make a new car that will ONLY go 15 MPH. Why would users require a report in this format?

I'm sure it could be done, though. Make sure you set the default font to FIXEDSYS. Smiler


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
Virtuoso
posted Hide Post
quote:
The heading I think is not a problem but i don't know how to represent the columns???


Are you summing and computing information that needs to show on the report? If they insist on the '*', it has to be put in a defined field you can print on the report, as well as the 'I'. Is the report going to be printed?


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Gold member
posted Hide Post
Yes I know that this is very strange requirement but I can not change it....
The report should be printed but I don't know what kind of printer will be used.

This reports are already implemented in another reporting software (AS - Application System) and it is needed to recreate this reports in WebFocus with the same output.

And another question.....is it possible to add data row to the Hold File.

For example if I have the following hold table:
  
Name   Value
----   -----
A      1
B      2

I need to add another row
 
C      3
 

How I can do that?


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
for the first request use
FILEDEF HOLD1 DISK dir/output.txt

For the second use
FILEDEF HOLD2 DISK dir/ouput.txt (APPEND


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Yes, it is. Make sure you FILEDEF with (APPEND and then ...

use DM -WRITE to add the data.

OR ...

Table the additional data out and SAVE or HOLD using the same format as previously.

TABLE FILE CAR
SUM RCOST/I9
BY COUNTRY
ON TABLE HOLD AS MYCAR FORMAT ALPHA
END
-RUN
FILEDEF ADD_DATA DISK MYCAR.FTM (APPEND
-RUN
-WRITE ADD_DATA additional      123
-RUN
TABLE FILE MYCAR
PRINT *
END

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
Gold member
posted Hide Post
It works fine if I use a table...

Can you write me a code that adds a row to the table.For example, table with 2 columns: NAME, AGE. I just want to add row with the following values: "MY NAME" and 11

I have tried to use -WRITE but it works only if the table contains one column.


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
Well the example Tony kindly gave has 3 columns, so -WRITE does work for more than 1 column.

Please retry what you are doing using Tony's code as the basis.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
And I would suggest to ask the management to get some basic training so you can better understand what the trics we suggest exactly do and get your knowledge on a better level.

This is ment as an helpfull suggestion not as criticism to you personal.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
quote:
-WRITE ADD_DATA additional 123


I have tried to find the documentation about "-WRITE" Command but without success. Can you tell me where I can find that documentation?

btw the sample above does not append a row to the MYCAR table...The result with -WRITE and without it is the same.


PS: Thanks for the suggestion FrankDutch I appreciate it.


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
L_G,

The example I gave above is a working one and produces the following output -

COUNTRY    RETAIL_COST 
ENGLAND          45319 
FRANCE            5610 
ITALY            51065 
JAPAN             6478 
W GERMANY        64732 
additional         123

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
If you run this code to see what files are produced (using CMD TYPE) you can see that the data is appended and the synonym contains two columns -
TABLE FILE CAR
SUM RCOST/I9
BY COUNTRY
ON TABLE HOLD AS MYCAR FORMAT ALPHA
END
-RUN
FILEDEF ADD_DATA DISK MYCAR.FTM (APPEND
-RUN
-WRITE ADD_DATA additional      123
-RUN
CMD TYPE MYCAR.*

This is the output -
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=      5
 mycar.ftm
 ENGLAND       45319
 FRANCE         5610
 ITALY         51065
 JAPAN          6478
 W GERMANY     64732
 additional      123
 mycar.mas
 FILENAME=MYCAR   , SUFFIX=FIX     , $
 SEGMENT=MYCAR, SEGTYPE=S1, $
 FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A10, ACTUAL=A10,
 MISSING=ON, $
 FIELDNAME=RETAIL_COST, ALIAS=E02, USAGE=I9, ACTUAL=A09,
 MISSING=ON, $

You can see from this that 5 lines of output have been created from 18 lines of input (that is what CAR contains) but when the file MYCAR.FTM is typed to the console there are 6 lines. The original 5 lines plus the sixth one that was written using -WRITE.

T

p.s. I am available for remote consulting at the right price 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
Gold member
posted Hide Post
I copied and pasted your code but the output contains only 5 rows, the additional row is missing...


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Virtuoso
posted Hide Post
Try a search for dialog manager commands. I have an old document at work from mainframe days, it may still be available.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Master
posted Hide Post
L_G, I feel for you, I really do. Problem is I have a report very similar to what you are trying to do. It is for Foster Care and Adoption Claims. The report format is legislated so it cannot be changed. A paper copy has to be available for audit. (I sure wish some people would get into the current century.) Simply put, I use MacGyver to print my report. My Report looks like this:
PAGE:    1                                                      S T A T E   O F   O K L A H O M A
                                                       D E P A R T M E N T   O F   H U M A N   S E R V I C E S                             Month/Year: Dec, 2007
                                                                     CLAIM FOR FOSTER HOME CARE
  
                                                                                                
  
  In Account With: Lastname, First Name                              Soc. Sec. No.: xxx-xx-xxxx                             County of Service: NOWATA           
          Address: Address                                            Contract No.: cccccc                                         County No.: 53 
                   City, St  Zip                                      Resource Id : rrrrrrrr 
  
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  |            | Family |            |     |      |       |                             |           |             |  Service  |      |          |              |
  |   Service  | Member | C, M or D  |   P |   T  |  UN/  |      Child/Adult Name       |           |  Soc. Sec.  |   Dates   |  No. |   Rate   |    Amount    |
  |  Case No.  | Number |   Number   |   C |   C  |  IV-E | Last          First      MI | Birthdate |     No.     | From-Thru | Days |  of Pay  |   Claimed    |
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  | KKCCCCCCCC |    9   | HHHHHHH    |   1 |  B0  | CW/ER | Child 1                     | 01/21/1999| sss-ss-ssss |  19 - 20  |   1  |   14.33  |     14.33    |
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  | KKCCCCCCCC |   10   | HHHHHHH    |   3 |  B0  | CW/IN | Child 2                     | 08/31/2000| sss-ss-ssss |  19 - 20  |   1  |   14.33  |     14.33    |
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  | KKCCCCCCCC |   11   | HHHHHHH    |   4 |  B0  | CW/IN | Child 3                     | 05/02/2002| sss-ss-ssss |  19 - 20  |   1  |   12.16  |     12.17    |
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  | KKCCCCCCCC |   12   | HHHHHHH    |   5 |  B0  | CW/IN | Child 4                     | 08/12/2004| sss-ss-ssss |  19 - 20  |   1  |   12.16  |     12.17    |
  |------------+--------+------------+-----+------+-------+-----------------------------+-----------+-------------+-----------+------+----------+--------------|
  
 
                                                                                                                                  T O T A L:          53.00 
  

I can send you a copy of the code if you would like to use it to get some ideas. Just send me a PM with your email address.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
L_G,

If you do not get the additional line then you must have a problem writing to the temporary work area, and if that was the case then most if not all of your processes that used HOLD files wouldn't work.

Do you have any other messages within your output that might give a clue as to an underlying problem?

If not then get the Servlet trace turned on for the duration of your report run (via Client Server Cosnole) and check the output for any problems.

The code as given should run on any release and platform (with the exception of the CMD of course!) and add the additional data from the -WRITE.

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
Gold member
posted Hide Post
Here is the output of my report:

  
SET GRAPHSERVURL=http://localhost:8080/ibi_apps/IBIGraphServlet
 SET GRAPHENGINE=GRAPH53
 -INCLUDE lg
 -* File lg.fex
 TABLE FILE CAR
 SUM RCOST/I9
 BY COUNTRY
 ON TABLE HOLD AS MYCAR FORMAT ALPHA
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=      5
 FILEDEF ADD_DATA DISK MYCAR.FTM (APPEND
 -RUN
 -WRITE ADD_DATA additional      123
 -RUN
 CMD TYPE MYCAR.*
 MYCAR.FTM
 additional      123



As you can see it is different from your output...


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
L_G,

Issue another CMD TYPE MYCAR.* before the -WRITE line and see what output you get from that, as it would appear that the original file is being overwritten or not written.

Oh, why are you running it via an -INCLUDE?.

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

Here is the output:
  
 TABLE FILE CAR
 SUM RCOST/I9
 BY COUNTRY
 ON TABLE HOLD AS MYCAR FORMAT ALPHA
 END
 -RUN
 0 NUMBER OF RECORDS IN TABLE=       18  LINES=      5
 FILEDEF ADD_DATA DISK MYCAR.FTM (APPEND
 -RUN
 CMD TYPE MYCAR.*
 -RUN
 The system cannot find the file specified.
 -WRITE ADD_DATA additional      123
 -RUN
 CMD TYPE MYCAR.*
 MYCAR.FTM
 additional      123



WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Expert
posted Hide Post
Your initial file is not getting held - "The system cannot find the file specified" - so you need to identify why.

Do you have any other problems using HOLD files?

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
Gold member
posted Hide Post
No, I have not.


WebFOCUS 7.6
Windows 2000
Output: HTML, PDF
 
Posts: 72 | Registered: January 14, 2008Report This Post
Platinum Member
posted Hide Post
L_G:

This looks like the output FOCUS gives with FORMAT WP, as in ON TABLE HOLD aaa FORMAT WP.

I use WP all the time when I'm developing and debugging code because it is absolutely the fastest format to output. The roots of FOCUS go back to the '70s when almost all output was on 'line printers' and FOCUS supports WP almost "natively".

Create the vertical 'bars' with a 1-character define:
DEFINE TABLE CAR
BAR1/A1='+';
BAR2/A1='*';
END
TABLE FILE CAR
PRINT
BAR1 AS '+'
MAKE
BAR2 AS '*'
COUNTRY
ON TABLE PCHOLD FORMAT WP.
END

Other contributor's suggestions regarding the headings should be tried. The AS ' ' clause of the PRINT controls the content of the heading above the BARn column. Make the AS character match the DEFINEd value if you want the vertical lineing to extend into the captions. If you get into multi-line headings use something like this:
PRINT
BAR1 AS '+,+,+'
MAKE AS 'Make,of,Car'
ON TABLE ...

Chris Burtt


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
 
Posts: 154 | Location: NY | Registered: October 27, 2005Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders